aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-13 19:35:43 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 06:39:08 +0200
commit9892c726fb212a1af36737d5741ff8421ff20829 (patch)
tree736f26042b91bfa5a76fd7481a65e9b7063512f2 /src/tokenizer.rs
parentb48e5c3b99fd537d223cb899e8675177d77e650c (diff)
break!: remove set_last_start_tag from Emitter
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r--src/tokenizer.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index 6e928e9..44793a5 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -128,14 +128,6 @@ impl<R: Reader, E: Emitter<R>> Tokenizer<R, E> {
self.emitter.emit_error(error, &self.reader);
}
- /// Test-internal function to override internal state.
- ///
- /// Only available with the `integration-tests` feature which is not public API.
- #[cfg(feature = "integration-tests")]
- pub fn set_last_start_tag(&mut self, last_start_tag: Option<&str>) {
- self.emitter.set_last_start_tag(last_start_tag);
- }
-
#[inline]
pub(crate) fn unread_char(&mut self, c: Option<char>) {
self.to_reconsume.push(c);
@@ -306,3 +298,13 @@ impl<R: Reader<Error = Never>, E: Emitter<R>> DerefMut for InfallibleTokenizer<R
&mut self.0
}
}
+
+impl<S: crate::spans::Span<R>, R: Reader> Tokenizer<R, DefaultEmitter<R, S>> {
+ /// Test-internal function to override internal state.
+ ///
+ /// Only available with the `integration-tests` feature which is not public API.
+ #[cfg(feature = "integration-tests")]
+ pub fn set_last_start_tag(&mut self, last_start_tag: &str) {
+ self.emitter.set_last_start_tag(Some(last_start_tag));
+ }
+}