Location fix for Mozilla AST start token.
authorIngvar Stepanyan <me@rreverser.com>
Fri, 8 Aug 2014 11:54:34 +0000 (14:54 +0300)
committerRichard van Velzen <rvanvelzen@experty.com>
Tue, 6 Jan 2015 10:32:41 +0000 (11:32 +0100)
lib/mozilla-ast.js

index 5056ffe..1deb18e 100644 (file)
         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
         });
     };