frg 2.1.0

Compiled programming language with frogs!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::{Expression, TreeCursor, expressions};

pub fn parse(cursor: &mut TreeCursor, code: &str) -> Box<Expression> {
    cursor.goto_first_child();

    let inner = expressions::parse(cursor, code);

    cursor.goto_parent();
    Box::new(inner)
}

pub fn transpile(inner: &Expression) -> String {
    let inner_str = expressions::transpile(inner);
    format!("*{inner_str}")
}