From 1d495ed0e53dd1a300c9eab3c91a0bba58071421 Mon Sep 17 00:00:00 2001
From: Kubat <maelle.martin@proton.me>
Date: Thu, 1 May 2025 11:58:20 +0200
Subject: [PATCH] [PARSER] Export the expression parser

---
 grimoire/src/parser/expr.rs |  3 +--
 grimoire/src/parser/mod.rs  | 10 ++++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/grimoire/src/parser/expr.rs b/grimoire/src/parser/expr.rs
index 4fde857..33f4c0b 100644
--- a/grimoire/src/parser/expr.rs
+++ b/grimoire/src/parser/expr.rs
@@ -115,8 +115,7 @@ fn logic_comp(s: Span) -> ParserResult<Expression> {
     Ok((s, fold_exprs(initial, remainder)))
 }
 
-#[allow(dead_code)]
-pub(crate) fn expression(s: Span) -> ParserResult<Expression> {
+pub fn expression(s: Span) -> ParserResult<Expression> {
     let (s, initial) = logic_comp(s)?;
     let (s, remainder) = many0(alt((
         binop(BinOp::CompEQ, logic_comp),
diff --git a/grimoire/src/parser/mod.rs b/grimoire/src/parser/mod.rs
index ea673b9..b2746c8 100644
--- a/grimoire/src/parser/mod.rs
+++ b/grimoire/src/parser/mod.rs
@@ -1,10 +1,12 @@
 mod error;
 mod expr;
-pub mod keywords;
 mod location;
 mod span;
+
+pub mod keywords;
 pub mod utils;
 
-pub use error::*;
-pub use location::*;
-pub use span::*;
+pub use error::{ParserError, ParserResult};
+pub use expr::expression;
+pub use location::Location;
+pub use span::Span;
-- 
GitLab