From 2c67d4e316819978db00ab49c68eb5af75c10ea7 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Sun, 17 May 2026 02:37:18 +0200 Subject: [PATCH] Tuple fix --- mist-test/src/main.mist | 2 -- parser/src/parser/common/expr.rs | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mist-test/src/main.mist b/mist-test/src/main.mist index 222415d..853e686 100644 --- a/mist-test/src/main.mist +++ b/mist-test/src/main.mist @@ -12,6 +12,4 @@ void main() { app_instance.boot(); app_instance.run(); - - 1+(1*2); } \ No newline at end of file diff --git a/parser/src/parser/common/expr.rs b/parser/src/parser/common/expr.rs index a6d7545..77d7c9a 100644 --- a/parser/src/parser/common/expr.rs +++ b/parser/src/parser/common/expr.rs @@ -102,6 +102,14 @@ impl<'a> TryFrom> 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::static_path => ast_expr!(Expression::Path(pair.try_into())), Rule::literal => ast_expr!(Expression::Literal(pair.try_into())),