Prevent unnecessary additional parser error

This commit is contained in:
cdemirer 2022-07-11 03:32:28 +03:00
parent d26442e709
commit 5a906a33d9

View File

@ -1646,8 +1646,9 @@ GDScriptParser::Node *GDScriptParser::parse_statement() {
} else {
push_error(vformat(R"(Expected statement, found "%s" instead.)", previous.get_name()));
}
} else {
end_statement("expression");
}
end_statement("expression");
lambda_ended = lambda_ended || has_ended_lambda;
result = expression;