mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add pure to grammar
This commit is contained in:
parent
504e6285f3
commit
23c791e4df
@ -53,7 +53,7 @@ ArrayTypeName = TypeName '[' Expression? ']'
|
|||||||
FunctionTypeName = 'function' TypeNameList ( 'internal' | 'external' | StateMutability )*
|
FunctionTypeName = 'function' TypeNameList ( 'internal' | 'external' | StateMutability )*
|
||||||
( 'returns' TypeNameList )?
|
( 'returns' TypeNameList )?
|
||||||
StorageLocation = 'memory' | 'storage'
|
StorageLocation = 'memory' | 'storage'
|
||||||
StateMutability = 'constant' | 'view' | 'payable'
|
StateMutability = 'pure' | 'constant' | 'view' | 'payable'
|
||||||
|
|
||||||
Block = '{' Statement* '}'
|
Block = '{' Statement* '}'
|
||||||
Statement = IfStatement | WhileStatement | ForStatement | Block | InlineAssemblyStatement |
|
Statement = IfStatement | WhileStatement | ForStatement | Block | InlineAssemblyStatement |
|
||||||
|
@ -337,7 +337,7 @@ be passed via and returned from external function calls.
|
|||||||
|
|
||||||
Function types are notated as follows::
|
Function types are notated as follows::
|
||||||
|
|
||||||
function (<parameter types>) {internal|external} [constant|view|payable] [returns (<return types>)]
|
function (<parameter types>) {internal|external} [pure|constant|view|payable] [returns (<return types>)]
|
||||||
|
|
||||||
In contrast to the parameter types, the return types cannot be empty - if the
|
In contrast to the parameter types, the return types cannot be empty - if the
|
||||||
function type should not return anything, the whole ``returns (<return types>)``
|
function type should not return anything, the whole ``returns (<return types>)``
|
||||||
|
Loading…
Reference in New Issue
Block a user