diff --git a/docs/grammar/Solidity.g4 b/docs/grammar/Solidity.g4 index 3d66df9b6..82b58a88e 100644 --- a/docs/grammar/Solidity.g4 +++ b/docs/grammar/Solidity.g4 @@ -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.