diff options
Diffstat (limited to 'src/construct/hard_break_escape.rs')
-rw-r--r-- | src/construct/hard_break_escape.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/construct/hard_break_escape.rs b/src/construct/hard_break_escape.rs index 85a64f7..d45d685 100644 --- a/src/construct/hard_break_escape.rs +++ b/src/construct/hard_break_escape.rs @@ -50,12 +50,12 @@ use crate::tokenizer::{Code, State, Tokenizer}; /// ^ /// | b /// ``` -pub fn start(tokenizer: &mut Tokenizer, code: Code) -> State { - match code { +pub fn start(tokenizer: &mut Tokenizer) -> State { + match tokenizer.current { Code::Char('\\') if tokenizer.parse_state.constructs.hard_break_escape => { tokenizer.enter(Token::HardBreakEscape); tokenizer.enter(Token::HardBreakEscapeMarker); - tokenizer.consume(code); + tokenizer.consume(); tokenizer.exit(Token::HardBreakEscapeMarker); State::Fn(Box::new(inside)) } @@ -70,8 +70,8 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> State { /// ^ /// | b /// ``` -fn inside(tokenizer: &mut Tokenizer, code: Code) -> State { - match code { +fn inside(tokenizer: &mut Tokenizer) -> State { + match tokenizer.current { Code::CarriageReturnLineFeed | Code::Char('\n' | '\r') => { tokenizer.exit(Token::HardBreakEscape); State::Ok |