]> git.lizzy.rs Git - nothing.git/blob - src/game/level/script.h
Merge pull request #1093 from tsoding/1092
[nothing.git] / src / game / level / script.h
1 #ifndef SCRIPT_H_
2 #define SCRIPT_H_
3
4 #include <stdbool.h>
5 #include "ebisp/expr.h"
6
7 typedef struct Script Script;
8 typedef struct LineStream LineStream;
9 typedef struct Broadcast Broadcast;
10
11 Script *create_script_from_string(Broadcast *broadcast, const char *source);
12 Script *create_script_from_line_stream(LineStream *line_stream,
13                                        Broadcast *broadcast);
14 void destroy_script(Script *script);
15
16 // TODO(#881): script_eval should return EvalResult and it should be handled properly everywhere
17 int script_eval(Script *script, struct Expr expr);
18
19 bool script_has_scope_value(const Script *script, const char *name);
20
21 Gc *script_gc(const Script *script);
22
23 #endif  // SCRIPT_H_