#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum StringPart {
Literal(String),
Tokens(Vec<Token>),
}
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub enum TokenKind {
Ident(String),
StringLit(String),
InterpolatedString(Vec<StringPart>),
IntLit(i64),
FloatLit(f64),
BoolLit(bool),
Null,
LBrace, RBrace, LParen, RParen, LBracket, RBracket, Comma, Semicolon, Dot, DotDotDot, Equals, Colon, QuestionMark, QuestionQuestion, QuestionDot, Bang, BangBang, Pipe, PipeGt, Caret, At,
Plus,
Minus,
Star,
Slash,
Percent,
EqEq,
BangEq,
Lt,
Gt,
LtEq,
GtEq,
TildeSlash, StarStar, AmpAmp,
PipePipe,
Arrow, ThinArrow,
KwAmends,
KwImport,
KwAs,
KwLocal,
KwConst,
KwFixed,
KwHidden,
KwNew,
KwExtends,
KwAbstract,
KwOpen,
KwExternal,
KwClass,
KwTypeAlias,
KwFunction,
KwThis,
KwSuper,
KwModule,
KwImportStar,
KwIf,
KwElse,
KwWhen,
KwIs,
KwLet,
KwThrow,
KwTrace,
KwRead,
KwReadOrNull,
KwFor,
KwIn,
Eof,
}
#[derive(Debug, Clone, PartialEq)]
pub struct Token {
pub kind: TokenKind,
pub line: usize,
pub col: usize,
pub offset: usize,
}