aboutsummaryrefslogtreecommitdiff
path: root/lib/mozilla-ast.js
diff options
context:
space:
mode:
authorIngvar Stepanyan <me@rreverser.com>2014-08-08 14:54:34 +0300
committerRichard van Velzen <rvanvelzen@experty.com>2015-01-06 11:32:41 +0100
commitf16033aafdd7f88da6b53c58f86b8effd1fb2a3d (patch)
treeafe18da297d141b7433a551797a333f9ee9e68d7 /lib/mozilla-ast.js
parentae5366a31de7d65964400ffc7b2f05132e2538b6 (diff)
downloadtracifyjs-f16033aafdd7f88da6b53c58f86b8effd1fb2a3d.tar.gz
tracifyjs-f16033aafdd7f88da6b53c58f86b8effd1fb2a3d.zip
Location fix for Mozilla AST start token.
Diffstat (limited to 'lib/mozilla-ast.js')
-rw-r--r--lib/mozilla-ast.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/mozilla-ast.js b/lib/mozilla-ast.js
index 5056ffed..1deb18e2 100644
--- a/lib/mozilla-ast.js
+++ b/lib/mozilla-ast.js
@@ -373,11 +373,13 @@
var loc = moznode.loc, start = loc && loc.start;
var range = moznode.range;
return new AST_Token({
- file : loc && loc.source,
- line : start && start.line,
- col : start && start.column,
- pos : range ? range[0] : moznode.start,
- endpos : range ? range[0] : moznode.start
+ file : loc && loc.source,
+ line : start && start.line,
+ col : start && start.column,
+ pos : range ? range[0] : moznode.start,
+ endline : start && start.line,
+ endcol : start && start.column,
+ endpos : range ? range[0] : moznode.start
});
};