Slang::Token
Inherits Struct < Value < Object
A single token.
value carries the token's payload (the tag name, attribute name,
Crystal expression, literal text, ...). Empty for tokens whose
meaning is fully captured by kind.
line and column point at the first byte of the token in the
source. Both are 1-based.
escape is meaningful for text tokens (TextLiteral, InterpExpr)
and tells the codegen whether to apply HTML escaping. The lexer
sets it from context. Default true.
Constructors
new(kind : TokenKind, value : String = "", line : Int32 = 0, column : Int32 = 0, escape : Bool = true)
SourceInstance methods
column
Sourceescape
Sourcekind
Sourceline
Sourcevalue
Source