struct TOML::Token

Overview

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.

Defined in:

toml/token.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(kind : TokenKind, raw : String, line : Int32, column : Int32) #

[View source]

Instance Method Detail

def column : Int32 #

[View source]
def kind : TokenKind #

[View source]
def line : Int32 #

[View source]
def raw : String #

[View source]
def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]