JavaScript example: Add "kind" to VariableDeclaration nodes

The JavaScript example grammar's VariableDeclaration nodes were missing
the "kind" member (which is always set to "var", according to the
ESTree spec).
redux
Ali Tavakoli 8 years ago
parent 671166bbe8
commit 5f9bc6ed4d

@ -1016,7 +1016,8 @@ VariableStatement
= VarToken __ declarations:VariableDeclarationList EOS { = VarToken __ declarations:VariableDeclarationList EOS {
return { return {
type: "VariableDeclaration", type: "VariableDeclaration",
declarations: declarations declarations: declarations,
kind: "var"
}; };
} }
@ -1124,7 +1125,8 @@ IterationStatement
type: "ForStatement", type: "ForStatement",
init: { init: {
type: "VariableDeclaration", type: "VariableDeclaration",
declarations: declarations declarations: declarations,
kind: "var"
}, },
test: extractOptional(test, 0), test: extractOptional(test, 0),
update: extractOptional(update, 0), update: extractOptional(update, 0),
@ -1158,7 +1160,8 @@ IterationStatement
type: "ForInStatement", type: "ForInStatement",
left: { left: {
type: "VariableDeclaration", type: "VariableDeclaration",
declarations: declarations declarations: declarations,
kind: "var"
}, },
right: right, right: right,
body: body body: body

Loading…
Cancel
Save