Top level attributes
This commit is contained in:
@@ -23,6 +23,10 @@ attribute = {
|
||||
"#" ~ "[" ~ meta ~ "]"
|
||||
}
|
||||
|
||||
mod_attribute = {
|
||||
"#" ~ "!" ~ "[" ~ meta ~ "]"
|
||||
}
|
||||
|
||||
meta = {
|
||||
static_path ~ ("=" ~ primary | "(" ~ meta_list? ~ ")")?
|
||||
}
|
||||
@@ -33,7 +37,7 @@ meta_list = {
|
||||
|
||||
attributes = { attribute* }
|
||||
|
||||
top_level = { attributes ~ (import | function_decl | struct_decl) }
|
||||
top_level = { (attributes ~ (import | function_decl | struct_decl)) | mod_attribute }
|
||||
|
||||
import = { sharp ~ "include" ~ "<" ~ static_path ~ ">" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user