Implement escaping

This commit is contained in:
Juno Takano 2026-01-07 01:02:57 -03:00
commit c6b43b2c48
4 changed files with 18 additions and 2 deletions

View file

@ -8,7 +8,7 @@ use crate::{
Inline, context,
lexeme::Lexeme,
state::{AnchorBuffer, State},
token::{Token, anchor::Anchor, code::Code},
token::{Token, anchor::Anchor, code::Code, literal::Literal},
},
},
};
@ -48,6 +48,9 @@ pub fn parse(
state.context.inline = Inline::None;
tokens.push(Token::Code(Code::new(false)));
return true;
} else {
tokens.push(Token::Literal(Literal::lex(lexeme)));
return true;
}
},
Inline::Anchor => {