diff options
-rw-r--r-- | docs/grammar.txt | 9 | ||||
-rw-r--r-- | docs/miscellaneous.rst | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/docs/grammar.txt b/docs/grammar.txt index da9e27d6..6c041460 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -77,10 +77,11 @@ IdentifierList = '(' ( Identifier? ',' )* Identifier? ')' // Precedence by order (see github.com/ethereum/solidity/pull/732) Expression = Expression ('++' | '--') - | FunctionCall | NewExpression - | MemberAccess | IndexAccess + | MemberAccess + | FunctionCall + | '(' Expression ')' | ('!' | '~' | 'delete' | '++' | '--' | '+' | '-') Expression | Expression '**' Expression | Expression ('*' | '/' | '%') Expression @@ -97,12 +98,12 @@ Expression | Expression ('=' | '|=' | '^=' | '&=' | '<<=' | '>>=' | '+=' | '-=' | '*=' | '/=' | '%=') Expression | PrimaryExpression -PrimaryExpression = Identifier - | BooleanLiteral +PrimaryExpression = BooleanLiteral | NumberLiteral | HexLiteral | StringLiteral | TupleExpression + | Identifier | ElementaryTypeNameExpression ExpressionList = Expression ( ',' Expression )* diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 2e0ccf45..17f2dcf9 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -394,12 +394,14 @@ The following is the order of precedence for operators, listed in order of evalu +============+=====================================+============================================+ | *1* | Postfix increment and decrement | ``++``, ``--`` | + +-------------------------------------+--------------------------------------------+ -| | Function-like call | ``<func>(<args...>)`` | +| | New expression | ``new <typename>`` | + +-------------------------------------+--------------------------------------------+ | | Array subscripting | ``<array>[<index>]`` | + +-------------------------------------+--------------------------------------------+ | | Member access | ``<object>.<member>`` | + +-------------------------------------+--------------------------------------------+ +| | Function-like call | ``<func>(<args...>)`` | ++ +-------------------------------------+--------------------------------------------+ | | Parentheses | ``(<statement>)`` | +------------+-------------------------------------+--------------------------------------------+ | *2* | Prefix increment and decrement | ``++``, ``--`` | |