[3.x] [Mono] Add support for file-scoped namespace declaration.
This commit is contained in:
parent
08ce24a3c4
commit
d5ad76a3c8
1 changed files with 3 additions and 0 deletions
|
@ -483,6 +483,9 @@ Error ScriptClassParser::_parse_namespace_name(String &r_name, int &r_curly_stac
|
||||||
} else if (tk == TK_CURLY_BRACKET_OPEN) {
|
} else if (tk == TK_CURLY_BRACKET_OPEN) {
|
||||||
r_curly_stack++;
|
r_curly_stack++;
|
||||||
return OK;
|
return OK;
|
||||||
|
} else if (tk == TK_SYMBOL && String(value) == ";") {
|
||||||
|
// for file-scoped namespace declaration
|
||||||
|
return OK;
|
||||||
} else {
|
} else {
|
||||||
error_str = "Unexpected token: " + get_token_name(tk);
|
error_str = "Unexpected token: " + get_token_name(tk);
|
||||||
error = true;
|
error = true;
|
||||||
|
|
Loading…
Reference in a new issue