Parse conditional access

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-15 12:34:35 +01:00
parent beac224f5b
commit 9b87e7089f
3 changed files with 41 additions and 1 deletions

View file

@ -1,9 +1,9 @@
use std::collections::BTreeMap;
use crate::parser::TemplateAstExpr;
use crate::input::NomoInput;
use crate::lexer::TemplateToken;
use crate::lexer::TokenOperator;
use crate::parser::TemplateAstExpr;
use crate::value::NomoValue;
pub struct EmitMachine {
@ -424,6 +424,7 @@ fn emit_ast_expr(
| TemplateAstExpr::Literal { .. }
| TemplateAstExpr::FunctionCall { .. }
| TemplateAstExpr::Operation { .. }
| TemplateAstExpr::ConditionalAccess { .. }
| TemplateAstExpr::VariableAccess { .. } => eval.push(Instruction::Abort),
}
}
@ -475,6 +476,7 @@ fn emit_expr_load(
slot: emit_slot,
});
}
TemplateAstExpr::ConditionalAccess { .. } => todo!(),
TemplateAstExpr::Invalid { .. } => eval.push(Instruction::Abort),
TemplateAstExpr::StaticContent { .. } | TemplateAstExpr::Interpolation { .. } => {
unreachable!("Invalid AST here")