summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-03-27 16:57:04 +0100
committerGitHub <noreply@github.com>2019-03-27 16:57:04 +0100
commit492153878f9748e84311d1f01a590d24993cd05e (patch)
tree6ab8b767eecbb4cae0aff8e2d7d13a9fb8f37895 /modules/gdscript/gdscript_compiler.h
parente02c7612e575523dbd40fad7783b6501f210acfe (diff)
parent466a76ac2c7c6634ed1d78fde4ac011e2e70b710 (diff)
Merge pull request #27128 from bojidar-bg/27111-gdscript-confounding-class
Fix GDScriptCompiler bugging out with identically-named inner class
Diffstat (limited to 'modules/gdscript/gdscript_compiler.h')
-rw-r--r--modules/gdscript/gdscript_compiler.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h
index 8440807a56..2cf630ba72 100644
--- a/modules/gdscript/gdscript_compiler.h
+++ b/modules/gdscript/gdscript_compiler.h
@@ -38,9 +38,8 @@
class GDScriptCompiler {
const GDScriptParser *parser;
- Map<StringName, Ref<GDScript> > class_map;
- Set<StringName> parsed_classes;
- Set<StringName> parsing_classes;
+ Set<GDScript *> parsed_classes;
+ Set<GDScript *> parsing_classes;
GDScript *main_script;
struct CodeGen {
@@ -149,9 +148,9 @@ class GDScriptCompiler {
int _parse_expression(CodeGen &codegen, const GDScriptParser::Node *p_expression, int p_stack_level, bool p_root = false, bool p_initializer = false);
Error _parse_block(CodeGen &codegen, const GDScriptParser::BlockNode *p_block, int p_stack_level = 0, int p_break_addr = -1, int p_continue_addr = -1);
Error _parse_function(GDScript *p_script, const GDScriptParser::ClassNode *p_class, const GDScriptParser::FunctionNode *p_func, bool p_for_ready = false);
- Error _parse_class_level(GDScript *p_script, GDScript *p_owner, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
+ Error _parse_class_level(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
Error _parse_class_blocks(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
- void _make_scripts(const GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
+ void _make_scripts(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
int err_line;
int err_column;
StringName source;