diff options
-rw-r--r-- | src/machine.rs | 8 | ||||
-rw-r--r-- | src/tokenizer.rs | 6 | ||||
-rw-r--r-- | src/utils.rs | 5 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/machine.rs b/src/machine.rs index 007f22f..c5bf021 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -2,11 +2,15 @@ use crate::attr::AttrValueSyntax; use crate::entities::try_read_character_reference; use crate::offset::{Offset, Position}; use crate::utils::{ - ascii_digit_pat, control_pat, ctostr, noncharacter_pat, surrogate_pat, whitespace_pat, - ControlToken, State, + ascii_digit_pat, control_pat, ctostr, noncharacter_pat, surrogate_pat, whitespace_pat, State, }; use crate::{reader::Reader, Emitter, Error, Tokenizer}; +pub enum ControlToken { + Eof, + Continue, +} + // Note: This is not implemented as a method on Tokenizer because there's fields on Tokenizer that // should not be available in this method, such as Tokenizer.to_reconsume or the Reader instance #[inline] diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 05c1165..6384544 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -1,10 +1,8 @@ -use crate::machine; +use crate::machine::{self, ControlToken}; use crate::naive_parser::naive_next_state; use crate::offset::{Offset, Position}; use crate::reader::{IntoReader, Reader}; -use crate::utils::{ - control_pat, noncharacter_pat, surrogate_pat, ControlToken, State as InternalState, -}; +use crate::utils::{control_pat, noncharacter_pat, surrogate_pat, State as InternalState}; use crate::{Emitter, Error}; // this is a stack that can hold 0 to 2 Ts diff --git a/src/utils.rs b/src/utils.rs index c3d2f1a..7d220cf 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -158,11 +158,6 @@ pub enum State { NumericCharacterReferenceEnd, } -pub enum ControlToken { - Eof, - Continue, -} - macro_rules! ctostr { ($c:expr) => { &*$c.encode_utf8(&mut [0; 4]) |