summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorcdemirer <41021322+cdemirer@users.noreply.github.com>2022-07-11 03:32:28 +0300
committercdemirer <41021322+cdemirer@users.noreply.github.com>2022-07-11 03:32:28 +0300
commit5a906a33d997aae5f6420f29b16922fe310f8386 (patch)
tree4d3318a50e6e3d7599721723c239004bca4f80d2 /modules/gdscript/gdscript_parser.cpp
parentd26442e709f6361af9ac755ec9291bb43f2cd69b (diff)
Prevent unnecessary additional parser error
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 233da87aee..3066664cce 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -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;