pub enum TokenKind {
Show 19 variants
LBrace,
RBrace,
LParen,
RParen,
Comma,
Gt,
At,
BareScalar,
QuotedScalar,
RawScalar,
HeredocStart,
HeredocContent,
HeredocEnd,
LineComment,
DocComment,
Whitespace,
Newline,
Eof,
Error,
}Expand description
The kind of a token.
Variants§
LBrace
{
RBrace
}
LParen
(
RParen
)
Comma
,
Gt
>
At
@
BareScalar
Bare (unquoted) scalar: hello, 42, true
QuotedScalar
Quoted scalar: "hello world"
RawScalar
Raw scalar: r#"..."#
HeredocStart
Heredoc start marker: <<DELIM (includes the newline)
HeredocContent
Heredoc content (the actual text)
HeredocEnd
Heredoc end marker: the closing delimiter
LineComment
Line comment: // ...
DocComment
Doc comment line: /// ...
Whitespace
Horizontal whitespace: spaces and tabs
Newline
Newline: \n or \r\n
Eof
End of file
Error
Lexer error (unrecognized input)
Implementations§
Trait Implementations§
impl Copy for TokenKind
impl Eq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnwindSafe for TokenKind
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