aboutsummaryrefslogtreecommitdiff
path: root/doc/grammar.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/grammar.txt')
-rw-r--r--doc/grammar.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index d3c9829..0e2f002 100644
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -1,5 +1,5 @@
root := import* toplevel*
-toplevel := externfunc | function | constant
+toplevel := externfunc | function | constant | typedef
import := "import" path [ NAME ] ";"
@@ -12,7 +12,9 @@ param := NAME type
externfunc := "extern" "func" NAME "(" ( type ), ")" [ type ] ";"
constant := [ COMMENT ]
- "const" NAME "=" ( NUMBER | bool | STRING* | type ) ";"
+ "const" NAME "=" ( NUMBER | bool | STRING* ) ";"
+
+typedef := [ COMMENT ] "type" NAME type
block := [ ":" NAME ] "{" command* "}"