aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/grammar.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index 95bd62c..937fc06 100644
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -5,12 +5,15 @@ import := "import" path [ NAME ] ";"
path := NAME ( "::" NAME )*
-function := [ "pub" ] [ "export" ] "func" NAME "(" ( param ), ")" type block
+function := [ COMMENT ]
+ [ "pub" ] [ "export" ] "func" NAME "(" ( param ), ")" type block
param := NAME type
externfunc := "extern" "func" NAME "(" ( type ), ")" type ";"
-constant := [ "pub" ] "const" NAME "=" ( type | bool | INTEGER | FLOAT | STRING* ) ";"
+constant := [ COMMENT ]
+ [ "pub" ] "const" NAME "="
+ ( type | bool | INTEGER | FLOAT | STRING* ) ";"
block := "{" body* "}"