summaryrefslogtreecommitdiff
path: root/src/map/script-parse.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-11-03 13:35:54 -0800
committerBen Longbons <b.r.longbons@gmail.com>2014-11-04 20:10:50 -0800
commit1853e964e96c41e762ca0ab97259ee4e79d86ec7 (patch)
treeedc76f58ed786263a28da79564786f4d75400092 /src/map/script-parse.cpp
parent1a00fe4ea75924bfe594c4d92073cc95eaa2f32d (diff)
downloadtmwa-1853e964e96c41e762ca0ab97259ee4e79d86ec7.tar.gz
tmwa-1853e964e96c41e762ca0ab97259ee4e79d86ec7.tar.bz2
tmwa-1853e964e96c41e762ca0ab97259ee4e79d86ec7.tar.xz
tmwa-1853e964e96c41e762ca0ab97259ee4e79d86ec7.zip
Use the new ASTs
Diffstat (limited to 'src/map/script-parse.cpp')
-rw-r--r--src/map/script-parse.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/script-parse.cpp b/src/map/script-parse.cpp
index 7956831..85e29a5 100644
--- a/src/map/script-parse.cpp
+++ b/src/map/script-parse.cpp
@@ -33,6 +33,8 @@
#include "../mmo/cxxstdio_enums.hpp"
+#include "../ast/script.hpp"
+
#include "map.t.hpp"
#include "script-buffer.hpp"
#include "script-call.hpp"
@@ -692,10 +694,10 @@ void add_builtin_functions(void)
}
}
-std::unique_ptr<const ScriptBuffer> parse_script(ZString src, int line, bool implicit_end)
+std::unique_ptr<const ScriptBuffer> compile_script(const ast::script::ScriptBody& body, bool implicit_end)
{
auto script_buf = make_unique<ScriptBuffer>();
- script_buf->parse_script(src, line, implicit_end);
+ script_buf->parse_script(body.braced_body, body.span.begin.line, implicit_end);
return std::move(script_buf);
}