diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-21 11:50:32 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-21 11:50:32 +0200 |
commit | f86b5fe5aef43c189587f025b99ec4b933ac8929 (patch) | |
tree | 45142964ee9e8d34ec2a7e5edf3f9dc0231c6644 | |
parent | 7a92d175d0fe762253e00473b7d4d832f4caaae7 (diff) |
Reorder type variants in grammar
-rw-r--r-- | doc/grammar.txt | 8 |
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" |