mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Updated ANTLR grammar to include user defined value types.
This commit is contained in:
parent
fbb1b884b2
commit
7e95555325
@ -19,6 +19,7 @@ sourceUnit: (
|
|||||||
| constantVariableDeclaration
|
| constantVariableDeclaration
|
||||||
| structDefinition
|
| structDefinition
|
||||||
| enumDefinition
|
| enumDefinition
|
||||||
|
| userDefinedValueTypeDefinition
|
||||||
| errorDefinition
|
| errorDefinition
|
||||||
)* EOF;
|
)* EOF;
|
||||||
|
|
||||||
@ -89,6 +90,7 @@ contractBodyElement:
|
|||||||
| receiveFunctionDefinition
|
| receiveFunctionDefinition
|
||||||
| structDefinition
|
| structDefinition
|
||||||
| enumDefinition
|
| enumDefinition
|
||||||
|
| userDefinedValueTypeDefinition
|
||||||
| stateVariableDeclaration
|
| stateVariableDeclaration
|
||||||
| eventDefinition
|
| eventDefinition
|
||||||
| errorDefinition
|
| errorDefinition
|
||||||
@ -247,6 +249,11 @@ structMember: type=typeName name=identifier Semicolon;
|
|||||||
* Definition of an enum. Can occur at top-level within a source unit or within a contract, library or interface.
|
* Definition of an enum. Can occur at top-level within a source unit or within a contract, library or interface.
|
||||||
*/
|
*/
|
||||||
enumDefinition: Enum name=identifier LBrace enumValues+=identifier (Comma enumValues+=identifier)* RBrace;
|
enumDefinition: Enum name=identifier LBrace enumValues+=identifier (Comma enumValues+=identifier)* RBrace;
|
||||||
|
/**
|
||||||
|
* Definition of a user defined value type. Can occur at top-level within a source unit or within a contract, library or interface.
|
||||||
|
*/
|
||||||
|
userDefinedValueTypeDefinition:
|
||||||
|
Type name=identifier Is elementaryTypeName[true] Semicolon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The declaration of a state variable.
|
* The declaration of a state variable.
|
||||||
|
Loading…
Reference in New Issue
Block a user