mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add errors to grammar.
This commit is contained in:
parent
2deb2b370f
commit
b07d071904
@ -19,6 +19,7 @@ sourceUnit: (
|
||||
| constantVariableDeclaration
|
||||
| structDefinition
|
||||
| enumDefinition
|
||||
| errorDefinition
|
||||
)* EOF;
|
||||
|
||||
//@doc: inline
|
||||
@ -90,6 +91,7 @@ contractBodyElement:
|
||||
| enumDefinition
|
||||
| stateVariableDeclaration
|
||||
| eventDefinition
|
||||
| errorDefinition
|
||||
| usingDirective;
|
||||
//@doc:inline
|
||||
namedArgument: name=identifier Colon value=expression;
|
||||
@ -289,6 +291,14 @@ eventDefinition:
|
||||
Anonymous?
|
||||
Semicolon;
|
||||
|
||||
/**
|
||||
* Definition of an error.
|
||||
*/
|
||||
errorDefinition:
|
||||
'error' name=identifier
|
||||
LParen (parameters=parameterList)? RParen
|
||||
Semicolon;
|
||||
|
||||
/**
|
||||
* Using directive to bind library functions to types.
|
||||
* Can occur within contracts and libraries.
|
||||
|
Loading…
Reference in New Issue
Block a user