Merge pull request #8115 from GNSPS/develop

Change grammar to reflect optionality of parameter list in catch clause
This commit is contained in:
chriseth 2020-01-10 08:44:51 +01:00 committed by GitHub
commit d577a768ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ Statement = IfStatement | TryStatement | WhileStatement | ForStatement | Block |
ExpressionStatement = Expression
IfStatement = 'if' '(' Expression ')' Statement ( 'else' Statement )?
TryStatement = 'try' Expression ( 'returns' ParameterList )? Block CatchClause+
CatchClause = 'catch' Identifier? ParameterList Block
CatchClause = 'catch' ( Identifier? ParameterList )? Block
WhileStatement = 'while' '(' Expression ')' Statement
PlaceholderStatement = '_'
SimpleStatement = VariableDefinition | ExpressionStatement