From 1936e1d2be1bd4d31803c0ad64cc44951ddda35b Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Fri, 31 Mar 2017 20:28:34 +0300 Subject: Make GDScript allow some keywords as identifiers Fixes #8085 Added some comments around the use of is_token_literal, as discussed. --- modules/gdscript/gd_tokenizer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/gdscript/gd_tokenizer.h') 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; -- cgit v1.2.3