From 07ac3874b602fa31d6c1196c6a9748eaff29bad1 Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Sun, 16 Apr 2023 13:51:05 -0500 Subject: [PATCH] Fix incompatibilities with Golang parser generation --- docs/grammar/SolidityParser.g4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/grammar/SolidityParser.g4 b/docs/grammar/SolidityParser.g4 index d2ef74cff..ed8651ae7 100644 --- a/docs/grammar/SolidityParser.g4 +++ b/docs/grammar/SolidityParser.g4 @@ -378,7 +378,7 @@ dataLocation: Memory | Storage | Calldata; */ expression: expression LBrack index=expression? RBrack # IndexAccess - | expression LBrack start=expression? Colon end=expression? RBrack # IndexRangeAccess + | expression LBrack startIndex=expression? Colon endIndex=expression? RBrack # IndexRangeAccess | expression Period (identifier | Address) # MemberAccess | expression LBrace (namedArgument (Comma namedArgument)*)? RBrace # FunctionCallOptions | expression callArgumentList # FunctionCall @@ -399,7 +399,7 @@ expression: | expression Or expression # OrOperation | expression Conditional expression Colon expression # Conditional | expression assignOp expression # Assignment - | New typeName # NewExpression + | New typeName # NewExpr | tupleExpression # Tuple | inlineArrayExpression # InlineArray | (