mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #99887 from JackErb/gdscript-parser-error-fix
Improve misleading `Unexpected "x" in class body.` GDScript parser error
This commit is contained in:
commit
79dd5179e3
5 changed files with 20 additions and 1 deletions
|
@ -1073,8 +1073,8 @@ void GDScriptParser::parse_class_body(bool p_is_multiline) {
|
|||
default:
|
||||
// Display a completion with identifiers.
|
||||
make_completion_context(COMPLETION_IDENTIFIER, nullptr);
|
||||
push_error(vformat(R"(Unexpected "%s" in class body.)", current.get_name()));
|
||||
advance();
|
||||
push_error(vformat(R"(Unexpected %s in class body.)", previous.get_debug_name()));
|
||||
break;
|
||||
}
|
||||
if (token.type != GDScriptTokenizer::Token::STATIC) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue