pub enum CstNode {
List {
tag: Option<String>,
open: Option<String>,
close: Option<String>,
children: Vec<CstNode>,
},
Token {
tag: Option<String>,
text: String,
},
Trivia {
tag: Option<String>,
text: String,
},
}Expand description
A CST node. Three kinds: List (with optional open/close delimiters),
Token (significant lexeme), Trivia (whitespace or comment).
Variants§
List
A list node with an optional dialect tag and optional open/close
delimiter strings (e.g. (, )).
Token
A non-trivia lexeme. text holds the original source bytes.
Trivia
Whitespace or comment trivia. text holds the original source bytes.
Implementations§
Trait Implementations§
impl Eq for CstNode
impl StructuralPartialEq for CstNode
Auto Trait Implementations§
impl Freeze for CstNode
impl RefUnwindSafe for CstNode
impl Send for CstNode
impl Sync for CstNode
impl Unpin for CstNode
impl UnsafeUnpin for CstNode
impl UnwindSafe for CstNode
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