mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Mono/C#: Fix class parser incorrectly handling nested namespaces
It would incorrectly error thinking the nested namespace is being declared inside a struct/class. This was because of an incorrect nesting level being used for classes and structs.
This commit is contained in:
parent
c1ab956dd0
commit
f2a2293709
@ -509,7 +509,7 @@ Error ScriptClassParser::parse(const String &p_code) {
|
||||
|
||||
if (tk == TK_IDENTIFIER) {
|
||||
String name = value;
|
||||
int at_level = type_curly_stack;
|
||||
int at_level = curly_stack;
|
||||
|
||||
ClassDecl class_decl;
|
||||
|
||||
@ -582,7 +582,7 @@ Error ScriptClassParser::parse(const String &p_code) {
|
||||
if (full_name.length())
|
||||
full_name += ".";
|
||||
full_name += class_decl.name;
|
||||
OS::get_singleton()->print("Ignoring generic class declaration: %s\n", class_decl.name.utf8().get_data());
|
||||
OS::get_singleton()->print("Ignoring generic class declaration: %s\n", full_name.utf8().get_data());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user