Implement escaping
This commit is contained in:
parent
0d910634c6
commit
c6b43b2c48
4 changed files with 18 additions and 2 deletions
|
|
@ -31,6 +31,13 @@ fn lex(text: &str, map: LexMap, config: &Config) -> Vec<Token> {
|
|||
|
||||
let mut iterator = lexemes.iter().peekable();
|
||||
while let Some(lexeme) = iterator.next() {
|
||||
if lexeme.match_as_char('\\') {
|
||||
if let Some(next) = iterator.next() {
|
||||
tokens.push(Token::Literal(Literal::lex(next)));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if context::block::parse(
|
||||
lexeme,
|
||||
&mut state,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue