mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-11 04:49:15 +03:00
Merge pull request #1752 from AleoHQ/abnf-bin-expr
[ABNF] Add rule for binary expressions.
This commit is contained in:
commit
7ffc640718
@ -148,6 +148,7 @@ keyword = %s"address"
|
||||
/ %s"char"
|
||||
/ %s"console"
|
||||
/ %s"const"
|
||||
/ %s"constant"
|
||||
/ %s"else"
|
||||
/ %s"field"
|
||||
/ %s"for"
|
||||
@ -637,13 +638,21 @@ disjunctive-expression = conjunctive-expression
|
||||
Go to: _[conjunctive-expression](#user-content-conjunctive-expression), [disjunctive-expression](#user-content-disjunctive-expression)_;
|
||||
|
||||
|
||||
<a name="conditional-expression"></a>
|
||||
<a name="binary-expression"></a>
|
||||
```abnf
|
||||
conditional-expression = disjunctive-expression
|
||||
/ disjunctive-expression "?" expression ":" expression
|
||||
binary-expression = disjunctive-expression
|
||||
```
|
||||
|
||||
Go to: _[disjunctive-expression](#user-content-disjunctive-expression), [expression](#user-content-expression)_;
|
||||
Go to: _[disjunctive-expression](#user-content-disjunctive-expression)_;
|
||||
|
||||
|
||||
<a name="conditional-expression"></a>
|
||||
```abnf
|
||||
conditional-expression = binary-expression
|
||||
/ binary-expression "?" expression ":" expression
|
||||
```
|
||||
|
||||
Go to: _[binary-expression](#user-content-binary-expression), [expression](#user-content-expression)_;
|
||||
|
||||
|
||||
<a name="expression"></a>
|
||||
@ -805,7 +814,7 @@ Go to: _[function-parameter](#user-content-function-parameter)_;
|
||||
|
||||
<a name="function-parameter"></a>
|
||||
```abnf
|
||||
function-parameter = [ %s"public" / %s"const" ] identifier ":" type
|
||||
function-parameter = [ %s"public" / %s"constant" / %s"const" ] identifier ":" type
|
||||
```
|
||||
|
||||
Go to: _[identifier](#user-content-identifier), [type](#user-content-type)_;
|
||||
|
@ -265,8 +265,10 @@ conjunctive-expression = equality-expression
|
||||
disjunctive-expression = conjunctive-expression
|
||||
/ disjunctive-expression "||" conjunctive-expression
|
||||
|
||||
conditional-expression = disjunctive-expression
|
||||
/ disjunctive-expression "?" expression ":" expression
|
||||
binary-expression = disjunctive-expression
|
||||
|
||||
conditional-expression = binary-expression
|
||||
/ binary-expression "?" expression ":" expression
|
||||
|
||||
expression = conditional-expression
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user