tangibl 0.1.0

A parser for generating an AST from a set of predefined TopCodes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::ast::{BooleanMethod, Command, Conditional, Flow, IntegerMethod, Start};

/// The trait for defining a struct which can walk a Tangibl AST.
pub trait Visitor {
    type Result;

    fn visit_start(&mut self, start: &Start) -> Self::Result;
    fn visit_flow(&mut self, flow: &Flow) -> Self::Result;
    fn visit_command(&mut self, command: &Command) -> Self::Result;
    fn visit_boolean_method(&mut self, boolean_method: &BooleanMethod) -> Self::Result;
    fn visit_integer_method(&mut self, integer_method: &IntegerMethod) -> Self::Result;
    fn visit_conditional(&mut self, conditional: &Conditional) -> Self::Result;
}