Macro calls
This commit is contained in:
@@ -79,6 +79,11 @@ path_type = { static_path ~ ("<" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ">")? }
|
||||
ref_type = { mutable? ~ "*" }
|
||||
type_expr = { (path_type | tuple_type) ~ ref_type* }
|
||||
|
||||
macro_inner_v = {
|
||||
"(" ~ macro_inner_v* ~ ")"
|
||||
| (!("(" | ")") ~ ANY)
|
||||
}
|
||||
|
||||
primary = {
|
||||
integer
|
||||
| float
|
||||
@@ -90,6 +95,7 @@ primary = {
|
||||
postfix = {
|
||||
field_px
|
||||
| call_px
|
||||
| macro_call_px
|
||||
| struct_px
|
||||
| index_px
|
||||
| binary_px
|
||||
@@ -97,6 +103,7 @@ postfix = {
|
||||
|
||||
field_px = { "." ~ identifier }
|
||||
call_px = { "(" ~ (expr ~ ("," ~ expr)*)? ~ ")" }
|
||||
macro_call_px = { "!" ~ "(" ~ macro_inner_v* ~ ")" }
|
||||
struct_px = { "{" ~ (struct_field_decl ~ ("," ~ struct_field_decl)*)? ~ "}" }
|
||||
index_px = { "[" ~ expr ~ "]" }
|
||||
binary_px = { bin_op ~ expr }
|
||||
|
||||
Reference in New Issue
Block a user