From dac1ae7fbc73d44274fe77e4c74cdac9bb0d440e Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 5 Oct 2025 22:07:38 +0800 Subject: ast: more sensible Decision::cond data type --- src/ast.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/ast.rs b/src/ast.rs index a23c688..fb648e0 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -6,7 +6,7 @@ use crate::parser::{Expr, ExprT, Metadata, Scope}; #[derive(Clone, Debug)] pub enum DepthExpr<'a> { Decision { - cond: Box>, + cond: Box<&'a str>, // TODO: take DepthExpr t: Scope, then_branch: Box>>, else_branch: Option>>>, @@ -25,8 +25,6 @@ pub fn parse<'a>(vec: &Vec>) -> Vec> { while let Some(e) = it.next() { match e.expr { ExprT::Decision((cond, scope)) => { - let cond = DepthExpr::Process(cond); - let then_branch = parse(&entire_scopes(&mut it)); let else_branch = if let Some(n) = it.peek() { -- cgit v1.2.3