struct

TOML::Token

Inherits Struct < Value < Object

A lexed token.

raw is the verbatim slice of source consumed by this token, including delimiters for strings and including the leading # for comments. The serializer can re-emit raw as-is to achieve byte-identical round-trips for unmodified documents.

line and column are 1-based and point at the start of the token, useful for error messages.

Constructors

new(kind : TokenKind, raw : String, line : Int32, column : Int32)
Source

Instance methods

column
Source
kind
Source
line
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source