49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
/*
|
|
* The fLisp parser and interpreter
|
|
* Copyright (C) 2025 Fcalva
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see
|
|
* <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "types.h"
|
|
#include "code_defs.h"
|
|
#include "byte_defs.h"
|
|
|
|
#pragma once
|
|
|
|
void runtime_err(char *s);
|
|
|
|
int evaluate(Value val);
|
|
|
|
|
|
int alloc_init();
|
|
|
|
void alloc_clean();
|
|
|
|
// All internal allocator memory is guaranteed to be free range
|
|
u32 flisp_alloc(u32 size);
|
|
|
|
u32 flisp_realloc(u32 pos, u32 size);
|
|
|
|
void flisp_free(u32 pos);
|
|
|
|
void *get_addr(u32 pos);
|
|
|
|
|
|
Value is(Tag tag, Value b);
|
|
|
|
Value cast(Tag tag, Value b);
|
|
|
|
void symbol_map_add_bi(HashMap *map);
|