Add location tracking to sexpr

This commit is contained in:
kpdecker
2013-12-31 13:31:47 -06:00
parent a2ca31bb19
commit f2df220a1f
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -72,7 +72,9 @@ var AST = {
this.isHelper = this.sexpr.isHelper;
},
SexprNode: function(rawParams, hash) {
SexprNode: function(rawParams, hash, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "sexpr";
this.hash = hash;
+2 -2
View File
@@ -71,8 +71,8 @@ simpleInverse
;
sexpr
: path param* hash? -> new yy.SexprNode([$1].concat($2), $3)
| dataName -> new yy.SexprNode([$1], null)
: path param* hash? -> new yy.SexprNode([$1].concat($2), $3, @$)
| dataName -> new yy.SexprNode([$1], null, @$)
;
param