summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-09 20:38:51 +0200
committerMartin Fischer <martin@push-f.com>2023-09-28 10:36:08 +0200
commita4846482707412f3cbacabeb082f25762a2636d5 (patch)
treebbde44d58c0e1f63110e008ac3001acc11de84cf /src
parent595985f5e17fafedc1cf6a72691ea7eb7dc20174 (diff)
refactor: move machine module under tokenizer
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs1
-rw-r--r--src/tokenizer.rs4
-rw-r--r--src/tokenizer/machine.rs (renamed from src/machine.rs)0
3 files changed, 3 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 194add9..baacb38 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -11,7 +11,6 @@ mod default_emitter;
mod emitter;
mod entities;
mod error;
-mod machine;
mod naive_parser;
mod tokenizer;
mod utils;
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index 270d3d0..b46bf45 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -1,9 +1,11 @@
-use crate::machine::{self, ControlToken};
+mod machine;
+
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, State as InternalState};
use crate::{Emitter, Error};
+use machine::ControlToken;
// this is a stack that can hold 0 to 2 Ts
#[derive(Debug, Default, Clone, Copy)]
diff --git a/src/machine.rs b/src/tokenizer/machine.rs
index fd4b36b..fd4b36b 100644
--- a/src/machine.rs
+++ b/src/tokenizer/machine.rs