]> git.lizzy.rs Git - nothing.git/blob - src/ebisp/interpreter.h
Merge pull request #597 from tsoding/412
[nothing.git] / src / ebisp / interpreter.h
1 #ifndef INTERPRETER_H_
2 #define INTERPRETER_H_
3
4 #include <stdbool.h>
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include "expr.h"
8
9 struct Scope;
10 struct Gc;
11
12
13 struct EvalResult eval_success(struct Expr expr);
14 struct EvalResult eval_failure(struct Expr expr);
15 struct EvalResult
16 wrong_argument_type(Gc *gc, const char *type, struct Expr obj);
17 struct EvalResult
18 wrong_number_of_arguments(Gc *gc, long int count);
19 struct EvalResult
20 not_implemented(Gc *gc);
21 struct EvalResult
22 read_error(Gc *gc, const char *error_message, long int character);
23
24 struct EvalResult
25 car(void *param, Gc *gc, struct Scope *scope, struct Expr args);
26
27 struct EvalResult eval(Gc *gc, struct Scope *scope, struct Expr expr);
28 struct EvalResult eval_block(Gc *gc, struct Scope *scope, struct Expr block);
29
30 struct EvalResult
31 match_list(struct Gc *gc, const char *format, struct Expr args, ...);
32
33 #endif  // INTERPRETER_H_