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 }