Importing

This commit is contained in:
2026-05-04 19:29:10 +02:00
parent 544074c26e
commit c717a57f99
4 changed files with 12 additions and 12 deletions
+5 -4
View File
@@ -12,15 +12,16 @@ string_lit = { "\"" ~ inner_str ~ "\"" }
inner_str = @{ (!"\"" ~ ANY)* }
static_path = { identifier ~ ("::" ~ identifier)* }
export = { "public" }
mutable = { "mut" }
var_decl = { type_expr ~ mutable? ~ identifier }
export = { "public" }
mutable = { "mut" }
sharp = _{ "#" }
var_decl = { type_expr ~ mutable? ~ identifier }
// ================= TOP LEVEL =================
top_level = _{ import | function_decl | struct_decl }
import = { "import" ~ string_lit ~ ";" }
import = { sharp ~ "include" ~ "<" ~ static_path ~ ">" }
field_list = { field ~ ("," ~ field)* ~ ","? }
field = { export? ~ type_expr ~ identifier }