When parsing for loops with variable declarations, the type attribute is incorrectly set.
AST Output:
{
"type": "VariableDeclaration",
"kind": 32,
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "x"
},
"init": null
}
]
}
Expected:
{
"type": "VariableDeclaration",
"kind": "const",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "x"
},
"init": null
}
]
}
```
When parsing for loops with variable declarations, the
typeattribute is incorrectly set.AST Output:
{ "type": "VariableDeclaration", "kind": 32, "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x" }, "init": null } ] }Expected:
{ "type": "VariableDeclaration", "kind": "const", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x" }, "init": null } ] } ```