Skip to content

Commit

Permalink
[3.x] [Mono] Add support for file-scoped namespace declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
zaevi committed Jan 2, 2022
1 parent 08ce24a commit d5ad76a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/mono/editor/script_class_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ Error ScriptClassParser::_parse_namespace_name(String &r_name, int &r_curly_stac
} else if (tk == TK_CURLY_BRACKET_OPEN) {
r_curly_stack++;
return OK;
} else if (tk == TK_SYMBOL && String(value) == ";") {
// for file-scoped namespace declaration
return OK;
} else {
error_str = "Unexpected token: " + get_token_name(tk);
error = true;
Expand Down

0 comments on commit d5ad76a

Please sign in to comment.