[vala/0.46] parser: Extend source_reference of parenthesized expr to cover "( ... )"



commit 2d3b8d2682dff282f85f8e019bf60dca6d9d8853
Author: Princeton Ferro <princetonferro gmail com>
Date:   Sat Jan 11 22:33:05 2020 -0500

    parser: Extend source_reference of parenthesized expr to cover "( ... )"

 vala/valaparser.vala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 5bf0e341f..87bd67e37 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -716,8 +716,11 @@ public class Vala.Parser : CodeVisitor {
                                tuple.add_expression (expr);
                        }
                        return tuple;
+               } else {
+                       var expr = expr_list.get (0);
+                       expr.source_reference = get_src (begin);
+                       return expr;
                }
-               return expr_list.get (0);
        }
 
        Expression parse_template () throws ParseError {


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