valkyrie-parser 0.2.5

The hand write parser of valkyrie language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

impl crate::IfGuardNode {
    pub(crate) fn build(&self, ctx: &mut ProgramState) -> Option<ExpressionKind> {
        match &self.condition {
            Some(s) => match s.build(ctx) {
                Ok(o) => Some(o),
                Err(e) => {
                    ctx.add_error(e);
                    None
                }
            },
            None => None,
        }
    }
}