]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
parser: Don't bail parsing of yield expression on error
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 17 Oct 2021 07:15:58 +0000 (09:15 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 17 Oct 2021 07:18:38 +0000 (09:18 +0200)
Reporting the error is enough to handle this properly.

vala/valaparser.vala

index 4bd0114c9beb80da581a2a9a69e065aa5d58a813..afbf9bf898623d29ea789041cf1490e80fb43183 100644 (file)
@@ -1114,7 +1114,7 @@ public class Vala.Parser : CodeVisitor {
                unowned ObjectCreationExpression? object_creation = expr as ObjectCreationExpression;
                if (call == null && object_creation == null) {
                        Report.error (expr.source_reference, "syntax error, expected method call");
-                       throw new ParseError.SYNTAX ("expected method call");
+                       expr.error = true;
                }
 
                if (call != null) {