Skip to content

Commit

Permalink
Handle var keyword versioning.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyBlakey committed May 2, 2023
1 parent 1cc99ae commit f248e07
Show file tree
Hide file tree
Showing 36 changed files with 20,182 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,17 @@
notFollowedBy:
reference: "IdentifierPart"

- name: "VarKeyword"
kind: "Scanner"
versioned:
0.4.11:
trailingContext:
expression:
terminal: "var"
notFollowedBy:
reference: "IdentifierPart"
0.5.0: null

- name: "ViewKeyword"
kind: "Scanner"
unversioned:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,38 @@

- name: "VariableDeclarationStatement"
kind: "Parser"
unversioned:
terminatedBy:
expression:
sequence:
- reference: "TypeName"
- optional:
reference: "DataLocation"
- reference: "Identifier"
- optional:
sequence:
- reference: "Equal"
- reference: "Expression"
terminator:
reference: "Semicolon"
versioned:
0.4.11:
terminatedBy:
expression:
sequence:
- choice:
- sequence:
- reference: "TypeName"
- optional:
reference: "DataLocation"
- reference: "VarKeyword"
- reference: "Identifier"
- optional:
sequence:
- reference: "Equal"
- reference: "Expression"
terminator:
reference: "Semicolon"
0.5.0: # removed "VarKeyword"
terminatedBy:
expression:
sequence:
- reference: "TypeName"
- optional:
reference: "DataLocation"
- reference: "Identifier"
- optional:
sequence:
- reference: "Equal"
- reference: "Expression"
terminator:
reference: "Semicolon"

- name: "DataLocation"
kind: "Parser"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

263 changes: 261 additions & 2 deletions crates/solidity/outputs/cargo/crate/src/syntax/generated/parsers.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f248e07

Please sign in to comment.