mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-22 04:27:25 +03:00
Merge pull request #2009 from AleoHQ/abnf-annotations
[ABNF] Add annotations.
This commit is contained in:
commit
a26c452de2
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user