diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-15 17:54:11 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-15 17:54:11 +0200 |
commit | aa9cd3bf805e63c40b4a4fa9fc8fdeef8eac844f (patch) | |
tree | 91cf739655eecbec7f45ccebf27443cb591d2c3e | |
parent | 1664955ab70531b5a479ca9f81040af87a3b6f8b (diff) |
Fix non-initial import statements being valid according to grammar
Import statements are only allowed at the beginning of a file.
No further imports are allowed after the first non-import statement.
-rw-r--r-- | doc/grammar.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt index 7532af7..398f137 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -1,5 +1,5 @@ -root := toplevel* -toplevel := import* ( externfunc | function | constant ) +root := import* toplevel* +toplevel := externfunc | function | constant import := "import" path [ NAME ] ";" |