Skip to content

Commit

Permalink
Grammar for unchecked.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Sep 23, 2020
1 parent 7da4500 commit d286dfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/grammar/Solidity.g4
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,11 @@ numberLiteral: (DecimalNumber | HexNumber) NumberUnit?;
*/
block: LBrace statement* RBrace;

uncheckedBlock: Unchecked block;

statement:
block
| uncheckedBlock
| simpleStatement
| ifStatement
| forStatement
Expand Down
3 changes: 2 additions & 1 deletion docs/grammar/SolidityLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ReservedKeywords:
'after' | 'alias' | 'apply' | 'auto' | 'case' | 'copyof' | 'default' | 'define' | 'final'
| 'implements' | 'in' | 'inline' | 'let' | 'macro' | 'match' | 'mutable' | 'null' | 'of'
| 'partial' | 'promise' | 'reference' | 'relocatable' | 'sealed' | 'sizeof' | 'static'
| 'supports' | 'switch' | 'typedef' | 'typeof' | 'unchecked' | 'var';
| 'supports' | 'switch' | 'typedef' | 'typeof' | 'var';

Pragma: 'pragma' -> pushMode(PragmaMode);
Abstract: 'abstract';
Expand Down Expand Up @@ -87,6 +87,7 @@ True: 'true';
Try: 'try';
Type: 'type';
Ufixed: 'ufixed' | ('ufixed' [0-9]+ 'x' [0-9]+);
Unchecked: 'unchecked';
/**
* Sized unsigned integer types.
* uint is an alias of uint256.
Expand Down

0 comments on commit d286dfe

Please sign in to comment.