/*
* 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();

// All internal allocator memory is guaranteed to be free range and 32bit
u32 flisp_alloc(size_t size);

void flisp_free(u32 pos);

void *flisp_realloc(u32 pos, size_t size);

void *get_addr(u32 pos);

Value is(Tag tag, Value b);

Value cast(Tag tag, Value b);

void symbol_map_add_bi(HashMap *map);