pub enum TokenKind {
Show 43 variants
Eof,
Newline,
Indent,
Dedent,
Ident,
String(Vec<(u32, u32)>),
SingleString,
MlString(Vec<(u32, u32)>),
MlSingleString,
Integer,
Float,
True,
False,
Null,
Let,
Env,
Secret,
Assign,
Dot,
Comma,
QuestionColon,
Plus,
Minus,
Star,
Slash,
EqEq,
NotEq,
Lt,
LtEq,
Gt,
GtEq,
AndAnd,
OrOr,
Bang,
LBracket,
RBracket,
LBrace,
RBrace,
LParen,
RParen,
Colon,
At,
Unit(String),
}Variants§
Eof
Newline
Indent
Opened an indented block (spec/dual-syntax.md §4).
Dedent
Closed an indented block.
Ident
String(Vec<(u32, u32)>)
Double-quoted string: escapes processed, ${…} interpolated.
Carries the source position (line offset, column) of every decoded
character, exactly like MlString: nested interpolation inside
sub-lexed expression text needs the same position fidelity.
SingleString
Single-quoted string: escapes processed, ${…} literal (spec §2.5).
MlString(Vec<(u32, u32)>)
Triple-double-quoted multi-line string: escapes processed, ${…}
interpolated, common-indent stripping at parse time (spec §1.4.1).
Carries the source position (line offset, column) of every decoded
character: escapes decode to characters of different source width
(\n is two source columns becoming one decoded newline on the
same physical line), so only a per-character map keeps diagnostics
on their true positions.
MlSingleString
Triple-single-quoted multi-line string: fully literal — backslashes
kept verbatim, ${…} never interpolated (spec §1.4.1).
Integer
Float
True
False
Null
Let
Env
Secret
Assign
Dot
Comma
QuestionColon
Plus
Minus
Star
Slash
EqEq
NotEq
Lt
LtEq
Gt
GtEq
AndAnd
OrOr
Bang
LBracket
RBracket
LBrace
RBrace
LParen
RParen
Colon
At
Unit(String)
Trait Implementations§
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 UnsafeUnpin 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
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
key and return true if they are equal.