diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-20 11:03:15 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-20 11:03:15 +0200 |
commit | 52c028b48a501c0fc8f51049c27500e3df923080 (patch) | |
tree | 54140cb57c63046eecdab84db63c38ba87523e29 | |
parent | 68effb746fc33f90b6fe537893f18ac0aac4e7f0 (diff) |
Make (extern) function return types optional
-rw-r--r-- | doc/grammar.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt index 6ccf3ba..9e0fdde 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -6,10 +6,11 @@ import := "import" path [ NAME ] ";" path := NAME ( "::" NAME )* function := [ COMMENT ] - [ "pub" ] [ "export" ] "func" NAME "(" ( param ), ")" type block + [ "pub" ] [ "export" ] + "func" NAME "(" ( param ), ")" [ type ] block param := NAME type -externfunc := "extern" "func" NAME "(" ( type ), ")" type ";" +externfunc := "extern" "func" NAME "(" ( type ), ")" [ type ] ";" constant := [ COMMENT ] [ "pub" ] "const" NAME "=" |