Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer tokenizes DTL source code.
type TokenType ¶
type TokenType int
TokenType identifies a lexer token.
const ( // Special TokenEOF TokenType = iota TokenNewline TokenIndent TokenDedent // Literals TokenInt // 42 TokenFloat // 3.14 TokenString // "hello" TokenIdent // variable_name TokenTrue // true TokenFalse // false TokenNull // null // String interpolation TokenStringStart // opening " before first interpolation TokenStringPart // string fragment between interpolations TokenStringEnd // closing " after last interpolation TokenInterpStart // { inside string TokenInterpEnd // } inside string // Keywords TokenFn TokenLet TokenReturn TokenIf TokenThen TokenElse TokenMatch TokenWhen TokenTry TokenCatch TokenAnd TokenOr TokenNot TokenQuery TokenFor TokenIn TokenRaise TokenUse TokenRecord TokenTypeKw // 'type' keyword for named type definitions // Operators TokenPlus // + TokenMinus // - TokenStar // * TokenSlash // / TokenPercent // % TokenEq // == TokenNe // != TokenGt // > TokenLt // < TokenGe // >= TokenLe // <= TokenAmpAmp // && TokenPipePipe // || TokenBang // ! TokenPipe // | TokenArrow // => TokenThinArrow // -> TokenDotDot // .. TokenQQ // ?? TokenQDot // ?. TokenPlusPlus // ++ TokenDot // . TokenColon // : TokenColonColon // :: TokenQuestion // ? // Delimiters TokenLParen // ( TokenRParen // ) TokenLBracket // [ TokenRBracket // ] TokenLBrace // { TokenRBrace // } TokenComma // , TokenEllipsis // ... TokenAssign // = )
Click to show internal directories.
Click to hide internal directories.