Etc pattern
This commit is contained in:
@@ -134,12 +134,14 @@ literal = {
|
||||
// PATTERNS
|
||||
// ======================================================
|
||||
|
||||
etc_pattern = { ".." }
|
||||
|
||||
multi_pat_template = _{
|
||||
(pattern ~ ("," ~ pattern)*)?
|
||||
((pattern | etc_pattern) ~ ("," ~ (pattern | etc_pattern))*)?
|
||||
}
|
||||
|
||||
tuple_pattern = {
|
||||
"[" ~ pattern ~ "," ~ multi_pat_template ~ "]"
|
||||
"[" ~ (pattern | etc_pattern) ~ "," ~ multi_pat_template ~ "]"
|
||||
}
|
||||
|
||||
named_tuple_pattern = {
|
||||
@@ -151,7 +153,7 @@ struct_destruct = {
|
||||
}
|
||||
|
||||
struct_pattern = {
|
||||
static_path ~ "{" ~ (struct_destruct ~ ("," ~ struct_destruct)*)? ~ "}"
|
||||
static_path ~ "{" ~ ((struct_destruct | etc_pattern) ~ ("," ~ (struct_destruct | etc_pattern))*)? ~ "}"
|
||||
}
|
||||
|
||||
path_pattern = {
|
||||
|
||||
Reference in New Issue
Block a user