Syntax: Tuples as ()

This commit is contained in:
2026-06-16 03:32:45 +02:00
parent aadccb7f38
commit d7e5e72bbb
2 changed files with 4 additions and 6 deletions
+3 -3
View File
@@ -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 = {