ASParser: array contents start after [ and before ], and ArrayLiteralNode includes them
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/b2bfa2c9 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/b2bfa2c9 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/b2bfa2c9 Branch: refs/heads/feature/maven-migration-test Commit: b2bfa2c9a6a7da9ebe5363117f6e6438e5ddc6a4 Parents: c22e5a0 Author: Josh Tynjala <[email protected]> Authored: Sun Apr 17 19:39:31 2016 -0700 Committer: Josh Tynjala <[email protected]> Committed: Sun Apr 17 19:39:31 2016 -0700 ---------------------------------------------------------------------- .../src/org/apache/flex/compiler/internal/parsing/as/ASParser.g | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b2bfa2c9/compiler/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g ---------------------------------------------------------------------- diff --git a/compiler/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g b/compiler/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g index 34cb240..4d4936b 100644 --- a/compiler/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g +++ b/compiler/src/org/apache/flex/compiler/internal/parsing/as/ASParser.g @@ -2481,9 +2481,9 @@ arrayInitializer [ArrayLiteralNode node] { final ContainerNode contents = node.getContentsNode(); } - : open:TOKEN_SQUARE_OPEN { contents.startBefore(open); } + : open:TOKEN_SQUARE_OPEN { node.startBefore(open); contents.startAfter(open); } arrayElements[contents] - close:TOKEN_SQUARE_CLOSE { contents.endAfter(close); } + close:TOKEN_SQUARE_CLOSE { node.endAfter(close); contents.endBefore(close); } ; exception catch [RecognitionException ex] {
