Merge pull request #1995 from AleoHQ/abnf-compound-asg

[ABNF] Add compound assignments.
This commit is contained in:
d0cd 2022-08-05 08:38:58 -07:00 committed by GitHub
commit a43e35cbde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ";"