mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
Merge pull request #1995 from AleoHQ/abnf-compound-asg
[ABNF] Add compound assignments.
This commit is contained in:
commit
a43e35cbde
@ -184,13 +184,18 @@ atomic-literal = numeric-literal
|
||||
/ address-literal
|
||||
/ string-literal
|
||||
|
||||
symbol = "!" / "&&" / "||"
|
||||
symbol = "!"
|
||||
/ "&&" / "||"
|
||||
/ "==" / "!="
|
||||
/ "<" / "<=" / ">" / ">="
|
||||
/ "&" / "|" / "^"
|
||||
/ "<<" / ">>"
|
||||
/ "+" / "-" / "*" / "/" / "%" / "**"
|
||||
/ "="
|
||||
/ "+=" / "-=" / "*=" / "/=" / "%=" / "**="
|
||||
/ "<<=" / ">>="
|
||||
/ "&=" / "|=" / "^="
|
||||
/ "&&=" / "||="
|
||||
/ "(" / ")"
|
||||
/ "[" / "]"
|
||||
/ "{" / "}"
|
||||
@ -375,6 +380,19 @@ loop-statement = %s"for" identifier ":" type
|
||||
block
|
||||
|
||||
assignment-operator = "="
|
||||
/ "+="
|
||||
/ "-="
|
||||
/ "*="
|
||||
/ "/="
|
||||
/ "%="
|
||||
/ "**="
|
||||
/ "<<="
|
||||
/ ">>="
|
||||
/ "&="
|
||||
/ "|="
|
||||
/ "^="
|
||||
/ "&&="
|
||||
/ "||="
|
||||
|
||||
assignment-statement = expression assignment-operator expression ";"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user