aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-13 21:40:46 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 06:41:55 +0200
commit0a02268b163db620c9e3d2b4f22da6d4bb67adf2 (patch)
tree5a65d1696995a68fdf3ed98ab8cb63cf6d5f3fff /src/tokenizer.rs
parent69fdbee250ebfce135bff2671226097bc536d953 (diff)
refactor: proxy essential Emitter methods through Tokenizer
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r--src/tokenizer.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index 62cc6a4..78d4fc4 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -116,6 +116,31 @@ impl<R: Reader, E: Emitter<R>> Tokenizer<R, E> {
}
#[inline]
+ pub(crate) fn current_end_tag_is_appropriate(&mut self) -> bool {
+ self.emitter.current_is_appropriate_end_tag_token()
+ }
+
+ #[inline]
+ pub(crate) fn init_start_tag(&mut self) {
+ self.emitter.init_start_tag(&self.reader);
+ }
+
+ #[inline]
+ pub(crate) fn init_end_tag(&mut self) {
+ self.emitter.init_end_tag(&self.reader);
+ }
+
+ #[inline]
+ pub(crate) fn push_tag_name(&mut self, s: &str) {
+ self.emitter.push_tag_name(s);
+ }
+
+ #[inline]
+ pub(crate) fn emit_current_tag(&mut self) {
+ self.emitter.emit_current_tag();
+ }
+
+ #[inline]
pub(crate) fn unread_char(&mut self, c: Option<char>) {
self.to_reconsume.push(c);
}