]> git.lizzy.rs Git - nothing.git/blob - src/script/interpreter.h
(#311) implement eval_funcall
[nothing.git] / src / script / interpreter.h
1 #ifndef INTERPRETER_H_
2 #define INTERPRETER_H_
3
4 #include <stdbool.h>
5 #include "expr.h"
6
7 struct EvalResult
8 {
9     bool is_error;
10     struct Expr expr;
11     const char *error;
12 };
13
14 struct EvalResult eval_success(struct Expr expr);
15 struct EvalResult eval_failure(const char *error, struct Expr expr);
16
17 struct EvalResult eval(struct Expr scope, struct Expr expr);
18
19 #endif  // INTERPRETER_H_