Implement bold token
This commit is contained in:
parent
36e2b5925c
commit
1faa0d5c3b
6 changed files with 84 additions and 11 deletions
|
|
@ -4,7 +4,7 @@ use crate::{
|
|||
Parseable as _,
|
||||
parser::{
|
||||
lexeme::Lexeme,
|
||||
token::{Token, oblique::Oblique},
|
||||
token::{Token, oblique::Oblique, bold::Bold},
|
||||
state::State,
|
||||
},
|
||||
},
|
||||
|
|
@ -20,6 +20,11 @@ pub fn parse(
|
|||
tokens.push(Token::Oblique(Oblique::new(!state.switches.oblique)));
|
||||
state.switches.oblique = !state.switches.oblique;
|
||||
return true;
|
||||
} else if Bold::probe(lexeme) {
|
||||
log!("Bold probed {lexeme}");
|
||||
tokens.push(Token::Bold(Bold::new(!state.switches.bold)));
|
||||
state.switches.bold = !state.switches.bold;
|
||||
return true;
|
||||
}
|
||||
false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue