mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-18 23:02:35 +03:00
[ABNF] Re-classify function call expressions.
This mirrors, in pre-testnet3, the change in PR #1699 in testnet3. Since in pre-testnet3 we have fewer kinds expressions, the category of postfix expressions disappears altogether with this re-classification.
This commit is contained in:
parent
d388b74b7f
commit
7b13ba58e4
@ -210,14 +210,8 @@ starting with a letter.
|
||||
It must not be a keyword or a boolean literal,
|
||||
and it must not be or start with `aleo1`;
|
||||
these are extra-grammatical requirements, indicated in the comment.
|
||||
<a name="identifier"></a>
|
||||
```abnf
|
||||
identifier = letter *( letter / decimal-digit / "_" )
|
||||
; but not a keyword or a boolean literal or aleo1...
|
||||
```
|
||||
|
||||
Go to: _[letter](#user-content-letter)_;
|
||||
|
||||
|
||||
<a name="numeral"></a>
|
||||
```abnf
|
||||
@ -485,6 +479,7 @@ scalar-type = boolean-type / arithmetic-type / address-type / character-type
|
||||
|
||||
Go to: _[address-type](#user-content-address-type), [arithmetic-type](#user-content-arithmetic-type), [boolean-type](#user-content-boolean-type), [character-type](#user-content-character-type)_;
|
||||
|
||||
|
||||
<a name="type"></a>
|
||||
```abnf
|
||||
type = scalar-type
|
||||
@ -530,9 +525,10 @@ Go to: _[affine-group-literal](#user-content-affine-group-literal), [product-gro
|
||||
primary-expression = identifier
|
||||
/ literal
|
||||
/ "(" expression ")"
|
||||
/ identifier function-arguments
|
||||
```
|
||||
|
||||
Go to: _[expression](#user-content-expression), [identifier](#user-content-identifier), [literal](#user-content-literal)_;
|
||||
Go to: _[expression](#user-content-expression), [function-arguments](#user-content-function-arguments), [identifier](#user-content-identifier), [literal](#user-content-literal)_;
|
||||
|
||||
|
||||
<a name="function-arguments"></a>
|
||||
@ -543,23 +539,14 @@ function-arguments = "(" [ expression *( "," expression ) [ "," ] ] ")"
|
||||
Go to: _[expression](#user-content-expression)_;
|
||||
|
||||
|
||||
<a name="postfix-expression"></a>
|
||||
```abnf
|
||||
postfix-expression = primary-expression
|
||||
/ identifier function-arguments
|
||||
```
|
||||
|
||||
Go to: _[function-arguments](#user-content-function-arguments), [identifier](#user-content-identifier), [primary-expression](#user-content-primary-expression)_;
|
||||
|
||||
|
||||
<a name="unary-expression"></a>
|
||||
```abnf
|
||||
unary-expression = postfix-expression
|
||||
unary-expression = primary-expression
|
||||
/ "!" unary-expression
|
||||
/ "-" unary-expression
|
||||
```
|
||||
|
||||
Go to: _[postfix-expression](#user-content-postfix-expression), [unary-expression](#user-content-unary-expression)_;
|
||||
Go to: _[primary-expression](#user-content-primary-expression), [unary-expression](#user-content-unary-expression)_;
|
||||
|
||||
|
||||
<a name="exponential-expression"></a>
|
||||
@ -787,6 +774,7 @@ print-call = print-function print-arguments
|
||||
|
||||
Go to: _[print-arguments](#user-content-print-arguments), [print-function](#user-content-print-function)_;
|
||||
|
||||
|
||||
<a name="function-declaration"></a>
|
||||
```abnf
|
||||
function-declaration = %s"function" identifier
|
||||
|
@ -228,13 +228,11 @@ group-literal = product-group-literal / affine-group-literal
|
||||
primary-expression = identifier
|
||||
/ literal
|
||||
/ "(" expression ")"
|
||||
/ identifier function-arguments
|
||||
|
||||
function-arguments = "(" [ expression *( "," expression ) [ "," ] ] ")"
|
||||
|
||||
postfix-expression = primary-expression
|
||||
/ identifier function-arguments
|
||||
|
||||
unary-expression = postfix-expression
|
||||
unary-expression = primary-expression
|
||||
/ "!" unary-expression
|
||||
/ "-" unary-expression
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user