diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-30 11:59:33 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-30 11:59:33 -0300 |
commit | b4d5f7e154973e8fb93a9a0af6ffa0b065e2c50c (patch) | |
tree | 67551f833464dc31c7d48e68e93b68c161e404b2 /modules/gdscript/gd_script.cpp | |
parent | 4613a3f2c0d8f060cac610e2a7a401aee2ece78f (diff) | |
parent | 55b34e05b3d735a84e1af9833e19c0b816c18252 (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
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) { |