diff options
author | Martin Fischer <martin@push-f.com> | 2023-08-13 19:35:43 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-08-19 06:39:08 +0200 |
commit | 9892c726fb212a1af36737d5741ff8421ff20829 (patch) | |
tree | 736f26042b91bfa5a76fd7481a65e9b7063512f2 /src/emitter.rs | |
parent | b48e5c3b99fd537d223cb899e8675177d77e650c (diff) |
break!: remove set_last_start_tag from Emitter
Diffstat (limited to 'src/emitter.rs')
-rw-r--r-- | src/emitter.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/emitter.rs b/src/emitter.rs index e872b1f..fba1f6a 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -36,12 +36,6 @@ pub trait Emitter<R> { /// yields when used as an iterator. type Token; - /// Set the name of the _last start tag_. - /// - /// This is primarily for testing purposes. This is *not* supposed to override the tag name of - /// the current tag. - fn set_last_start_tag(&mut self, last_start_tag: Option<&str>); - /// The state machine has reached the end of the file. It will soon call `pop_token` for the /// last time. fn emit_eof(&mut self); @@ -252,16 +246,16 @@ impl<R, S: Span<R>> DefaultEmitter<R, S> { // that exact self.emitted_tokens.push_front(Token::Error { error, span }); } -} - -impl<R, S: Span<R>> Emitter<R> for DefaultEmitter<R, S> { - type Token = Token<S>; - fn set_last_start_tag(&mut self, last_start_tag: Option<&str>) { + pub(crate) fn set_last_start_tag(&mut self, last_start_tag: Option<&str>) { self.last_start_tag.clear(); self.last_start_tag .push_str(last_start_tag.unwrap_or_default()); } +} + +impl<R, S: Span<R>> Emitter<R> for DefaultEmitter<R, S> { + type Token = Token<S>; fn emit_eof(&mut self) { self.flush_current_characters(); |