mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 02:01:54 +03:00
[ABNF] Remove expression statements.
Since we do not have tuple in this version of Leo, we cannot have expression statements, because normally expressions used as statements would have to return the empty tuple, since we disallow throwing away values in Leo.
This commit is contained in:
parent
88c1bfd8a3
commit
d08a4f814a
@ -637,8 +637,7 @@ Go to: _[conditional-expression](#user-content-conditional-expression)_;
|
||||
|
||||
<a name="statement"></a>
|
||||
```abnf
|
||||
statement = expression-statement
|
||||
/ return-statement
|
||||
statement = return-statement
|
||||
/ variable-declaration
|
||||
/ constant-declaration
|
||||
/ conditional-statement
|
||||
@ -648,7 +647,7 @@ statement = expression-statement
|
||||
/ block
|
||||
```
|
||||
|
||||
Go to: _[assignment-statement](#user-content-assignment-statement), [block](#user-content-block), [conditional-statement](#user-content-conditional-statement), [console-statement](#user-content-console-statement), [constant-declaration](#user-content-constant-declaration), [expression-statement](#user-content-expression-statement), [loop-statement](#user-content-loop-statement), [return-statement](#user-content-return-statement), [variable-declaration](#user-content-variable-declaration)_;
|
||||
Go to: _[assignment-statement](#user-content-assignment-statement), [block](#user-content-block), [conditional-statement](#user-content-conditional-statement), [console-statement](#user-content-console-statement), [constant-declaration](#user-content-constant-declaration), [loop-statement](#user-content-loop-statement), [return-statement](#user-content-return-statement), [variable-declaration](#user-content-variable-declaration)_;
|
||||
|
||||
|
||||
<a name="block"></a>
|
||||
|
@ -262,8 +262,7 @@ conditional-expression = disjunctive-expression
|
||||
|
||||
expression = conditional-expression
|
||||
|
||||
statement = expression-statement
|
||||
/ return-statement
|
||||
statement = return-statement
|
||||
/ variable-declaration
|
||||
/ constant-declaration
|
||||
/ conditional-statement
|
||||
|
Loading…
Reference in New Issue
Block a user