mamba 0.3.6

A transpiler which converts Mamba files to Python 3 files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::parse::lex::pass::docstring::DocString;
use crate::parse::lex::token::Lex;

mod docstring;

pub fn pass(input: &[Lex]) -> Vec<Lex> {
    let passes: Vec<Box<dyn Pass>> = vec![Box::from(DocString::new())];

    let mut input = input.to_vec();
    for mut pass in passes {
        input = pass.modify(&input);
    }
    input
}

trait Pass {
    fn modify(&mut self, input: &[Lex]) -> Vec<Lex>;
}