pub enum LineLexState {
Normal,
BlockComment {
depth: u16,
doc: bool,
},
XmlComment,
XmlCdata,
TripleString {
quote: u8,
},
RustRawString {
hashes: u8,
},
MarkdownFence {
fence_char: u8,
fence_len: u8,
embedded: Language,
},
ShellHeredoc {
delimiter: String,
},
YamlBlockScalar {
base_indent: usize,
},
}Expand description
Persistent cross-line lexer state stored per line for O(delta) incremental re-tokenization.
Variants§
Normal
BlockComment
Inside /* ... */ block comment (Rust, C/C++, JS/TS) with nesting depth for Rust.
XmlComment
Inside <!-- ... --> XML/SDF/HTML/Markdown comment.
XmlCdata
Inside <![CDATA[ ... ]]> XML/SDF section.
TripleString
Inside Python/TOML triple-quoted string (""" or ''').
RustRawString
Inside Rust raw string r###"..."###.
MarkdownFence
Inside Markdown fenced code block with optional embedded language.
ShellHeredoc
Inside Shell heredoc <<EOF ... EOF.
YamlBlockScalar
Inside YAML block scalar (| or >) indented deeper than base_indent.
Trait Implementations§
Source§impl Clone for LineLexState
impl Clone for LineLexState
Source§impl Debug for LineLexState
impl Debug for LineLexState
Source§impl Default for LineLexState
impl Default for LineLexState
impl Eq for LineLexState
Source§impl PartialEq for LineLexState
impl PartialEq for LineLexState
impl StructuralPartialEq for LineLexState
Auto Trait Implementations§
impl Forget for LineLexState
impl Freeze for LineLexState
impl Move for LineLexState
impl RefUnwindSafe for LineLexState
impl Send for LineLexState
impl Sync for LineLexState
impl Unpin for LineLexState
impl UnsafeUnpin for LineLexState
impl UnwindSafe for LineLexState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.