소스 검색

Merge pull request #56427 from zaevi/3.x_csharp_file-scoped_namespace

Rémi Verschelde 3 년 전
부모
커밋
ccbfe8563e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      modules/mono/editor/script_class_parser.cpp

+ 3 - 0
modules/mono/editor/script_class_parser.cpp

@@ -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;