Skip to content

Instantly share code, notes, and snippets.

@lukehoban
Last active October 9, 2017 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukehoban/75564c03690a98023663023e28ce6f9f to your computer and use it in GitHub Desktop.
Save lukehoban/75564c03690a98023663023e28ce6f9f to your computer and use it in GitHub Desktop.
@@ -459,8 +466,12 @@ StatementList:
| Statement { [$1]}
// See 12.2
VariableStatement:
- | VAR VariableDeclarationList SEMICOLON { VariableStatement(List.rev($2)) }
- | VAR VariableDeclarationList { VariableStatement(List.rev($2)) }
+ | Type VariableDeclarationList SEMICOLON { VariableStatement([], false, $1,List.rev($2)) }
+ | Type VariableDeclarationList { VariableStatement([], false, $1, List.rev($2)) }
+ | READONLY Type VariableDeclarationList SEMICOLON { VariableStatement([], true, $2,List.rev($3)) }
+ | READONLY Type VariableDeclarationList { VariableStatement([], true, $2, List.rev($3)) }
// See 12.2
VariableDeclarationList:
| VariableDeclaration { [$1]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment