aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-09-12 13:20:46 +0200
committerHimbeer <himbeer@disroot.org>2024-09-12 13:20:46 +0200
commitab096f2a2410c9660333377411aa84838db05ac4 (patch)
treebb9457996239e36a8e34eda3b35e441b9cf8ffde /doc
parent26510b572c625df21d697d627a0149002c07078e (diff)
Accomodate doc comments in grammar
Diffstat (limited to 'doc')
-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* "}"