diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2023-03-08 22:06:29 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-03-13 01:40:13 +0200 |
commit | 4e34cf238aeff209f5823685d7b66ae8d66118cb (patch) | |
tree | f1baec0d9450fc2c550f2a8ad9c9a8012802d9d6 /modules/gdscript/gdscript_parser.cpp | |
parent | 550a7798510810d238b733a54f69da71b2a2d152 (diff) | |
download | redot-engine-4e34cf238aeff209f5823685d7b66ae8d66118cb.tar.gz |
GDScript: Change parser representation of class extends
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 00a3e41c2b..e2a37ab6e9 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -712,14 +712,14 @@ void GDScriptParser::parse_extends() { if (!consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected superclass name after "extends".)")) { return; } - current_class->extends.push_back(previous.literal); + current_class->extends.push_back(parse_identifier()); while (match(GDScriptTokenizer::Token::PERIOD)) { make_completion_context(COMPLETION_INHERIT_TYPE, current_class, chain_index++); if (!consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected superclass name after ".".)")) { return; } - current_class->extends.push_back(previous.literal); + current_class->extends.push_back(parse_identifier()); } } @@ -4479,7 +4479,7 @@ void GDScriptParser::TreePrinter::print_class(ClassNode *p_class) { } else { first = false; } - push_text(p_class->extends[i]); + push_text(p_class->extends[i]->name); } } |