Merge pull request #2009 from AleoHQ/abnf-annotations

[ABNF] Add annotations.
This commit is contained in:
d0cd 2022-08-10 11:36:43 -07:00 committed by GitHub
commit a26c452de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,6 +184,8 @@ atomic-literal = numeric-literal
/ address-literal / address-literal
/ string-literal / string-literal
annotation = "@" identifier
symbol = "!" symbol = "!"
/ "&&" / "||" / "&&" / "||"
/ "==" / "!=" / "==" / "!="
@ -207,6 +209,7 @@ token = keyword
/ identifier / identifier
/ atomic-literal / atomic-literal
/ numeral / numeral
/ annotation
/ symbol / symbol
lexeme = token / comment / whitespace lexeme = token / comment / whitespace
@ -409,7 +412,7 @@ print-arguments = "(" string-literal *( "," expression ) [ "," ] ")"
print-call = print-function print-arguments print-call = print-function print-arguments
function-declaration = %s"function" identifier function-declaration = *annotation %s"function" identifier
"(" [ function-parameters ] ")" "->" type "(" [ function-parameters ] ")" "->" type
block block