mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-01 02:08:31 +03:00
Merge pull request #2024 from AleoHQ/abnf-console
[ABNF] Revise console statements.
This commit is contained in:
commit
297128af6d
@ -402,15 +402,14 @@ assignment-statement = expression assignment-operator expression ";"
|
||||
console-statement = %s"console" "." console-call ";"
|
||||
|
||||
console-call = assert-call
|
||||
/ print-call
|
||||
/ assert-equal-call
|
||||
/ assert-not-equal-call
|
||||
|
||||
assert-call = %s"assert" "(" expression ")"
|
||||
|
||||
print-function = %s"error" / %s"log"
|
||||
assert-equal-call = %s"assert_eq" "(" expression "," expression [ "," ] ")"
|
||||
|
||||
print-arguments = "(" string-literal *( "," expression ) [ "," ] ")"
|
||||
|
||||
print-call = print-function print-arguments
|
||||
assert-not-equal-call = %s"assert_neq" "(" expression "," expression [ "," ] ")"
|
||||
|
||||
function-declaration = *annotation %s"function" identifier
|
||||
"(" [ function-parameters ] ")" "->" type
|
||||
@ -441,26 +440,6 @@ file = *declaration
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Format String Grammar
|
||||
; ---------------------
|
||||
|
||||
not-brace = %x0-7A / %x7C / %x7E-10FFFF ; anything but { or }
|
||||
|
||||
format-string-container = "{}"
|
||||
|
||||
format-string-open-brace = "{{"
|
||||
|
||||
format-string-close-brace = "}}"
|
||||
|
||||
format-string-element = not-brace
|
||||
/ format-string-container
|
||||
/ format-string-open-brace
|
||||
/ format-string-close-brace
|
||||
|
||||
format-string = *format-string-element
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Input Grammar
|
||||
; -------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user