You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2016/04/06 01:56:37 UTC
[19/33] git commit: [flex-falcon] [refs/heads/develop] - fixed source
map for object and array literals now that all [] and {} are included in AST
fixed source map for object and array literals now that all [] and {} are included in AST
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/847dc159
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/847dc159
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/847dc159
Branch: refs/heads/develop
Commit: 847dc159f4921c7ffb8e65f9786900ecbece8321
Parents: ea51f07
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Mar 30 16:33:23 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Mar 30 16:33:23 2016 -0700
----------------------------------------------------------------------
.../org/apache/flex/compiler/internal/codegen/js/JSEmitter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/847dc159/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java
index aae2cfd..e42056c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java
@@ -236,7 +236,7 @@ public class JSEmitter extends ASEmitter implements IJSEmitter
//we're mapping the comma to the literal container, but we use
//the child line/column in case the comma is not on the same
//line as the opening { or [
- startMapping(node, child.getLine(), child.getColumn() + child.getEnd() - child.getStart());
+ startMapping(node, child.getLine(), child.getColumn() + child.getAbsoluteEnd() - child.getAbsoluteStart());
writeToken(ASEmitterTokens.COMMA);
endMapping(node);
}
@@ -244,7 +244,7 @@ public class JSEmitter extends ASEmitter implements IJSEmitter
if (postFix != null)
{
- startMapping(node, node.getAbsoluteEnd() - node.getAbsoluteStart());
+ startMapping(node, node.getAbsoluteEnd() - node.getAbsoluteStart() - 1);
write(postFix);
endMapping(node);
}