Update solidity grammar parser

This commit is contained in:
wechman 2022-07-08 13:17:40 +02:00
parent d3d28e96a8
commit f9a6da293f

View File

@ -311,11 +311,16 @@ errorDefinition:
LParen (parameters+=errorParameter (Comma parameters+=errorParameter)*)? RParen LParen (parameters+=errorParameter (Comma parameters+=errorParameter)*)? RParen
Semicolon; Semicolon;
/**
* User type operators.
*/
userOp: Add | Sub | Mul | Div | Mod | BitAnd | BitOr | BitXor | BitNot | Equal | NotEqual | LessThan | GreaterThan | LessThanOrEqual | GreaterThanOrEqual;
/** /**
* Using directive to bind library functions and free functions to types. * Using directive to bind library functions and free functions to types.
* Can occur within contracts and libraries and at the file level. * Can occur within contracts and libraries and at the file level.
*/ */
usingDirective: Using (identifierPath | (LBrace identifierPath (Comma identifierPath)* RBrace)) For (Mul | typeName) Global? Semicolon; usingDirective: Using (identifierPath (As userOp)? | (LBrace identifierPath (As userOp)? (Comma identifierPath (As userOp)?)* RBrace)) For (Mul | typeName) Global? Semicolon;
/** /**
* A type name can be an elementary type, a function type, a mapping type, a user-defined type * A type name can be an elementary type, a function type, a mapping type, a user-defined type
* (e.g. a contract or struct) or an array type. * (e.g. a contract or struct) or an array type.