diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-03-31 20:28:34 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-07-23 23:34:31 +0300 |
commit | 1936e1d2be1bd4d31803c0ad64cc44951ddda35b (patch) | |
tree | 213d454a909517e351b9c055c52d9e56971969d4 /modules/gdscript/gd_tokenizer.h | |
parent | aa798ebf8fcc0a72c837c7daea63e6d9ef51ff30 (diff) |
Make GDScript allow some keywords as identifiers
Fixes #8085
Added some comments around the use of is_token_literal, as discussed.
Diffstat (limited to 'modules/gdscript/gd_tokenizer.h')
-rw-r--r-- | modules/gdscript/gd_tokenizer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gd_tokenizer.h b/modules/gdscript/gd_tokenizer.h index c051176097..4e868301a3 100644 --- a/modules/gdscript/gd_tokenizer.h +++ b/modules/gdscript/gd_tokenizer.h @@ -149,6 +149,9 @@ protected: public: static const char *get_token_name(Token p_token); + bool is_token_literal(int p_offset = 0, bool variable_safe = false) const; + StringName get_token_literal(int p_offset = 0) const; + virtual const Variant &get_token_constant(int p_offset = 0) const = 0; virtual Token get_token(int p_offset = 0) const = 0; virtual StringName get_token_identifier(int p_offset = 0) const = 0; |