frg 2.1.0

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

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

    // skip the "&"
    cursor.goto_next_sibling();

    let var_type = types::parse(cursor, code);

    cursor.goto_parent();
    VarType::Reference(Box::new(var_type))
}