[vala/wip/proper-source-references] parser: Don't include initializer in src-ref of array-creation-expression



commit d792297833eb791050fcf8ee6d99608db5555281
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Mar 8 19:25:03 2019 +0100

    parser: Don't include initializer in src-ref of array-creation-expression

 vala/valaparser.vala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 2049adea6..d552dfc09 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -956,11 +956,13 @@ public class Vala.Parser : CodeVisitor {
                        expect (TokenType.CLOSE_BRACKET);
                } while (accept (TokenType.OPEN_BRACKET));
 
+               var src = get_src (begin);
+
                InitializerList initializer = null;
                if (current () == TokenType.OPEN_BRACE) {
                        initializer = parse_initializer ();
                }
-               var expr = new ArrayCreationExpression (element_type, size_specifier_list.size, initializer, 
get_src (begin));
+               var expr = new ArrayCreationExpression (element_type, size_specifier_list.size, initializer, 
src);
                if (size_specified) {
                        foreach (Expression size in size_specifier_list) {
                                expr.append_size (size);


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