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 = { tuple_type = {
"[" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ","? ~ "]" "(" ~ (type_expr ~ ("," ~ type_expr)*)? ~ ","? ~ ")"
} }
path_type = { path_type = {
@@ -142,11 +142,11 @@ multi_pat_template = _{
} }
tuple_pattern = { tuple_pattern = {
"[" ~ (pattern | etc_pattern) ~ "," ~ multi_pat_template ~ "]" "(" ~ (pattern | etc_pattern) ~ "," ~ multi_pat_template ~ ")"
} }
named_tuple_pattern = { named_tuple_pattern = {
static_path ~ "[" ~ multi_pat_template ~ "]" static_path ~ "(" ~ multi_pat_template ~ ")"
} }
struct_destruct = { struct_destruct = {
+1 -3
View File
@@ -1,5 +1,3 @@
fn Result<[], String> main() { fn void main() {
println!("running common tests..."); println!("running common tests...");
Ok(())
} }