Syntax: Tuples as ()
This commit is contained in:
@@ -97,7 +97,7 @@ generics = { "<" ~ (generic ~ ("," ~ generic)*)? ~ ">" }
|
||||
// ======================================================
|
||||
|
||||
tuple_type = {
|
||||
"[" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ","? ~ "]"
|
||||
"(" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ","? ~ ")"
|
||||
}
|
||||
|
||||
path_type = {
|
||||
@@ -142,11 +142,11 @@ multi_pat_template = _{
|
||||
}
|
||||
|
||||
tuple_pattern = {
|
||||
"[" ~ (pattern | etc_pattern) ~ "," ~ multi_pat_template ~ "]"
|
||||
"(" ~ (pattern | etc_pattern) ~ "," ~ multi_pat_template ~ ")"
|
||||
}
|
||||
|
||||
named_tuple_pattern = {
|
||||
static_path ~ "[" ~ multi_pat_template ~ "]"
|
||||
static_path ~ "(" ~ multi_pat_template ~ ")"
|
||||
}
|
||||
|
||||
struct_destruct = {
|
||||
|
||||
Reference in New Issue
Block a user