aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-09-15 17:54:11 +0200
committerHimbeer <himbeer@disroot.org>2024-09-15 17:54:11 +0200
commitaa9cd3bf805e63c40b4a4fa9fc8fdeef8eac844f (patch)
tree91cf739655eecbec7f45ccebf27443cb591d2c3e /doc
parent1664955ab70531b5a479ca9f81040af87a3b6f8b (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.
Diffstat (limited to 'doc')
-rw-r--r--doc/grammar.txt4
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 ] ";"