Importing
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user