Add errors to grammar.

This commit is contained in:
chriseth 2021-02-01 18:29:17 +01:00
parent 2deb2b370f
commit b07d071904

View File

@ -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.