pub enum CellTokenTree {
Group(CellTokenGroup),
Literal(LiteralToken),
Punct(Punct),
Ident(IdentToken),
Adj(Span),
}Expand description
One token tree in a framed Macaulay2 cell.
Lexical atoms retain their raw token types. Delimiter groups recursively
contain CellTokenStream, while Self::Adj represents the inferred
application boundary that does not exist in TokenTree.
Variants§
Group(CellTokenGroup)
A recursively framed delimiter group.
Literal(LiteralToken)
A lexical literal.
Punct(Punct)
Lexical punctuation.
Ident(IdentToken)
A lexical identifier or keyword.
Adj(Span)
Inferred same-line adjacency at its zero-width source position.
Implementations§
Source§impl CellTokenTree
impl CellTokenTree
Sourcepub fn spelling(&self) -> Option<&str>
pub fn spelling(&self) -> Option<&str>
Returns the lexical spelling of a flat token or the empty adjacency spelling.
Sourcepub fn leading_trivia(&self) -> &[Trivia]
pub fn leading_trivia(&self) -> &[Trivia]
Returns comments attached before this cell token.
Sourcepub fn trailing_trivia(&self) -> &[Trivia]
pub fn trailing_trivia(&self) -> &[Trivia]
Returns comments attached after this cell token.
Trait Implementations§
Source§impl Clone for CellTokenTree
impl Clone for CellTokenTree
Source§impl Debug for CellTokenTree
impl Debug for CellTokenTree
impl Eq for CellTokenTree
Source§impl PartialEq for CellTokenTree
impl PartialEq for CellTokenTree
Source§impl Spanned for CellTokenTree
impl Spanned for CellTokenTree
impl StructuralPartialEq for CellTokenTree
Auto Trait Implementations§
impl Freeze for CellTokenTree
impl RefUnwindSafe for CellTokenTree
impl Send for CellTokenTree
impl Sync for CellTokenTree
impl Unpin for CellTokenTree
impl UnsafeUnpin for CellTokenTree
impl UnwindSafe for CellTokenTree
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