lib: derive Clone for Parser

should now be safe to do
This commit is contained in:
Noah Hellman 2023-03-19 15:32:46 +01:00
commit 8382fe122f
2 changed files with 9 additions and 1 deletions

View file

@ -73,6 +73,7 @@ pub struct Event {
pub span: Span,
}
#[derive(Clone)]
pub struct Input<'s> {
/// Lexer, hosting source.
lexer: lex::Lexer<'s>,
@ -175,13 +176,15 @@ impl<'s> Input<'s> {
}
}
pub struct VerbatimState {
#[derive(Clone)]
struct VerbatimState {
event_opener: usize,
len_opener: u8,
non_whitespace_encountered: bool,
non_whitespace_last: Option<(lex::Kind, usize)>,
}
#[derive(Clone)]
pub struct Parser<'s> {
input: Input<'s>,
/// Stack with kind and index of _potential_ openers for containers.