[vala/0.48] parser: Don't bail parsing of yield expression on error



commit e8d6d6e3f12e28ed4e34d7344c7591a6e23b4644
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Oct 17 09:15:58 2021 +0200

    parser: Don't bail parsing of yield expression on error
    
    Reporting the error is enough to handle this properly.

 vala/valaparser.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 1424d3e2c..97406a957 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -1069,7 +1069,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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]