mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
GDScript: Reintroduce binary tokenization on export
This adds back a function available in 3.x: exporting the GDScript files in a binary form by converting the tokens recognized by the tokenizer into a data format. It is enabled by default on export but can be manually disabled. The format helps with loading times since, the tokens are easily reconstructed, and with hiding the source code, since recovering it would require a specialized tool. Code comments are not stored in this format. The `--test` command can also include a `--use-binary-tokens` flag which will run the GDScript tests with the binary format instead of the regular source code by converting them in-memory before the test runs.
This commit is contained in:
parent
41564aaf77
commit
b4d0a09f15
26 changed files with 1010 additions and 119 deletions
|
|
@ -99,6 +99,7 @@ public:
|
|||
static void remove_script(const String &p_path);
|
||||
static Ref<GDScriptParserRef> get_parser(const String &p_path, GDScriptParserRef::Status status, Error &r_error, const String &p_owner = String());
|
||||
static String get_source_code(const String &p_path);
|
||||
static Vector<uint8_t> get_binary_tokens(const String &p_path);
|
||||
static Ref<GDScript> get_shallow_script(const String &p_path, Error &r_error, const String &p_owner = String());
|
||||
static Ref<GDScript> get_full_script(const String &p_path, Error &r_error, const String &p_owner = String(), bool p_update_from_disk = false);
|
||||
static Ref<GDScript> get_cached_script(const String &p_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue