aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/grammar.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index f83c389..486fefd 100644
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -12,7 +12,7 @@ param := NAME type
externfunc := "extern" "func" NAME "(" ( type ), ")" [ type ] ";"
constant := [ COMMENT ]
- "const" NAME "=" ( type | bool | NUMBER | STRING* ) ";"
+ "const" NAME "=" ( NUMBER | bool | STRING* | type ) ";"
block := "{" command* "}"
@@ -50,8 +50,10 @@ call := path "(" ( expression ), ")"
defer := "defer" call
-type := integer | float | array | slice | struct | enum | union
- | "*" type | "?" type | "!" type | path
+type := "*" type | "?" type | "!" type
+ | integer | float | struct | enum | union
+ | array | slice
+ | path
numtype := integer | float
integer := "int8" | "uint8"
| "int16" | "uint16"