This commit is contained in:
2026-05-07 18:15:48 +02:00
parent 2ccec652da
commit 27c6eb74c3
5 changed files with 10 additions and 15 deletions
+3 -1
View File
@@ -37,7 +37,7 @@ class_decl = {
// ================= TOP LEVEL =================
top_level = { (attributes ~ (import | function_decl | struct_decl | class_decl)) | mod_attribute }
top_level = { (attributes ~ (import | function_decl | struct_decl | class_decl | mod_package)) | mod_attribute }
attribute = {
"#" ~ "[" ~ meta ~ "]"
@@ -59,6 +59,8 @@ attributes = { attribute* }
import = { "use" ~ "<" ~ static_path ~ ">" ~ semicolon }
mod_package = { "mod" ~ identifier ~ semicolon }
field_list = { field ~ ("," ~ field)* ~ ","? }
field = { export? ~ type_expr ~ identifier }