Merge pull request #510 from Mingun/group-location

Add location information to group AST node
master
Futago-za Ryuu 7 years ago committed by GitHub
commit 1afe682c65

@ -236,7 +236,7 @@ function peg$parse(input, options) {
// nodes that already isolate label scope themselves. This leaves us with
// "labeled" and "sequence".
return expression.type === "labeled" || expression.type === "sequence"
? { type: "group", expression: expression }
? { type: "group", expression: expression, location: location() }
: expression;
};
var peg$c32 = function(name) {

@ -180,7 +180,7 @@ PrimaryExpression
// nodes that already isolate label scope themselves. This leaves us with
// "labeled" and "sequence".
return expression.type === "labeled" || expression.type === "sequence"
? { type: "group", expression: expression }
? { type: "group", expression: expression, location: location() }
: expression;
}

Loading…
Cancel
Save