]> git.lizzy.rs Git - nothing.git/blobdiff - src/game/level/script.h
(#819) Integrate LevelEditor Regions with Level
[nothing.git] / src / game / level / script.h
index d5b1d66b40637a5351e563158037dd0230d6dd8d..f9a1e17bfd1d381c6ebd86c5b498493436f35762 100644 (file)
@@ -2,18 +2,24 @@
 #define SCRIPT_H_
 
 #include <stdbool.h>
+#include "ebisp/expr.h"
 
 typedef struct Script Script;
 typedef struct LineStream LineStream;
 typedef struct Broadcast Broadcast;
 
+Script *create_script_from_string(Broadcast *broadcast, const char *source);
 Script *create_script_from_line_stream(LineStream *line_stream,
                                        Broadcast *broadcast);
 void destroy_script(Script *script);
 
-// TODO(#470): script_eval accepting string instead of expr is very error prone
-int script_eval(Script *script, const char *source_code);
+// TODO(#881): script_eval should return EvalResult and it should be handled properly everywhere
+int script_eval(Script *script, struct Expr expr);
 
 bool script_has_scope_value(const Script *script, const char *name);
 
+const char *script_source_code(const Script *script);
+
+Gc *script_gc(const Script *script);
+
 #endif  // SCRIPT_H_