Tuple fix

This commit is contained in:
2026-05-17 02:37:18 +02:00
parent bfaaa4006b
commit 2c67d4e316
2 changed files with 8 additions and 2 deletions
-2
View File
@@ -12,6 +12,4 @@ void main() {
app_instance.boot(); app_instance.boot();
app_instance.run(); app_instance.run();
1+(1*2);
} }
+8
View File
@@ -102,6 +102,14 @@ impl<'a> TryFrom<pest::iterators::Pair<'a, Rule>> for Expression {
} }
} }
Rule::tuple => {
ast_expr!(Expression::Literal(
collect_recovered(pair.into_inner())
.map(Literal::Tuple)
.get_map(Literal::Tuple)
))
}
Rule::primary => pair.into_inner().next().unwrap().try_into(), Rule::primary => pair.into_inner().next().unwrap().try_into(),
Rule::static_path => ast_expr!(Expression::Path(pair.try_into())), Rule::static_path => ast_expr!(Expression::Path(pair.try_into())),
Rule::literal => ast_expr!(Expression::Literal(pair.try_into())), Rule::literal => ast_expr!(Expression::Literal(pair.try_into())),