diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-30 11:28:43 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-30 11:28:43 -0300 |
commit | 55b34e05b3d735a84e1af9833e19c0b816c18252 (patch) | |
tree | a2e5e0020bf68a2b3ea66010dfe5f54b83403d7b /modules/gdscript/gd_script.cpp | |
parent | 95047562d743b1c1fdc007432c8a0c145a455c5d (diff) | |
download | redot-engine-55b34e05b3d735a84e1af9833e19c0b816c18252.tar.gz |
-some changes by okam
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
-rw-r--r-- | modules/gdscript/gd_script.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 63bb44784d..53ae0c8702 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1977,9 +1977,17 @@ void GDScript::_bind_methods() { ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"new",&GDScript::_new,MethodInfo("new")); + ObjectTypeDB::bind_method(_MD("get_as_byte_code"),&GDScript::get_as_byte_code); + } +Vector<uint8_t> GDScript::get_as_byte_code() const { + + GDTokenizerBuffer tokenizer; + return tokenizer.parse_code_string(source); +}; + Error GDScript::load_byte_code(const String& p_path) { |