valkyrie-parser 0.2.5

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

impl crate::TryStatementNode {
    pub(crate) fn build(&self, ctx: &mut ProgramState) -> Result<TryStatement> {
        let handler = match &self.type_expression {
            Some(s) => Some(s.build(ctx)?),
            None => None,
        };
        Ok(TryStatement { handler, body: self.continuation.build(ctx), span: self.span.clone() })
    }
}