From 8e8aa2552393ae14d5649d7d59a375860332221c Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Feb 2021 11:25:16 +0100 Subject: [PATCH] fixup! Add errors to grammar. --- docs/grammar/Solidity.g4 | 4 ++-- docs/grammar/SolidityLexer.g4 | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/grammar/Solidity.g4 b/docs/grammar/Solidity.g4 index 82b58a88e..cabf10bba 100644 --- a/docs/grammar/Solidity.g4 +++ b/docs/grammar/Solidity.g4 @@ -295,7 +295,7 @@ eventDefinition: * Definition of an error. */ errorDefinition: - 'error' name=identifier + Error name=identifier LParen (parameters=parameterList)? RParen Semicolon; @@ -377,7 +377,7 @@ inlineArrayExpression: LBrack (expression ( Comma expression)* ) RBrack; /** * Besides regular non-keyword Identifiers, the 'from' keyword can also occur as identifier outside of import statements. */ -identifier: Identifier | From; +identifier: Identifier | From | Error; literal: stringLiteral | numberLiteral | booleanLiteral | hexStringLiteral | unicodeStringLiteral; booleanLiteral: True | False; diff --git a/docs/grammar/SolidityLexer.g4 b/docs/grammar/SolidityLexer.g4 index d8e89b278..560d78e6a 100644 --- a/docs/grammar/SolidityLexer.g4 +++ b/docs/grammar/SolidityLexer.g4 @@ -29,12 +29,13 @@ Do: 'do'; Else: 'else'; Emit: 'emit'; Enum: 'enum'; +Error: 'error'; // not a real keyword Event: 'event'; External: 'external'; Fallback: 'fallback'; False: 'false'; Fixed: 'fixed' | ('fixed' [1-9][0-9]* 'x' [1-9][0-9]*); -From: 'from'; +From: 'from'; // not a real keyword /** * Bytes types of fixed length. */