[vala/0.40] parser: Don't include initializer in src-ref of array-creation-expression
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] parser: Don't include initializer in src-ref of array-creation-expression
- Date: Tue, 9 Apr 2019 13:48:51 +0000 (UTC)
commit a1249c7f827bb470b1dcbd96926f769d3a13c4f6
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 62921f3d1..577111110 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -965,11 +965,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]