~lattis/muon

ref: f9a8cbad39b665a9496cd3adb4756e85ee5ec97c muon/include/lang/interpreter.h -rw-r--r-- 692 bytes
f9a8cbadStone Tickle print stdout/stderr of failing test 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef MUON_LANG_INTERPRETER_H
#define MUON_LANG_INTERPRETER_H

#include <stdbool.h>
#include <stddef.h>

#include "parser.h"
#include "workspace.h"
#include "object.h"

bool interp_node(struct workspace *wk, uint32_t n_id, uint32_t *obj_id);
void interp_error(struct workspace *wk, uint32_t n_id, const char *fmt, ...)
__attribute__ ((format(printf, 3, 4)));

bool typecheck_simple_err(struct workspace *wk, uint32_t obj_id, enum obj_type type);
bool typecheck(struct workspace *wk, uint32_t n_id, uint32_t obj_id, enum obj_type type);
bool boundscheck(struct workspace *wk, uint32_t n_id, uint32_t obj_id, int64_t *i);
bool bounds_adjust(struct workspace *wk, obj arr, int64_t *i);
#endif