pub enum TokenContent {
Text(String),
Token(Box<Token>),
Tokens(Vec<CodeToken>),
}Expand description
TokenContent: what a Token holds.
Variants§
Text(String)
A string, typed by the token (by its alias for a prefix).
Token(Box<Token>)
A token on its own, which $mapTokensToLexicalStructure leaves out,
as JS does.
Tokens(Vec<CodeToken>)
Tokens, typed by the token unless it is unchanged (a diff’s
unchanged line, whose text has no type).
Trait Implementations§
Source§impl Clone for TokenContent
impl Clone for TokenContent
Source§impl Debug for TokenContent
impl Debug for TokenContent
Source§impl PartialEq for TokenContent
impl PartialEq for TokenContent
impl StructuralPartialEq for TokenContent
Auto Trait Implementations§
impl Forget for TokenContent
impl Freeze for TokenContent
impl Move for TokenContent
impl RefUnwindSafe for TokenContent
impl Send for TokenContent
impl Sync for TokenContent
impl Unpin for TokenContent
impl UnsafeUnpin for TokenContent
impl UnwindSafe for TokenContent
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