mysz-core 0.3.0

The main compiler for the Mysz language project
1
2
3
4
5
6
7
8
9
10
11
use crate::{lex::lexing::Token, parse::parsing::Identifier};

pub fn to_ident(token: Option<Token>) -> Option<Identifier> {
    if let Some(tk) = token {
        return Some(Identifier {
            value: tk.value,
            location: tk.location,
        });
    }
    None
}