class TOML::Parser

Overview

Parses a TOML v1.0 document into a Document AST.

The parser is a thin layer over Lexer: it consumes the token stream, builds AST nodes, and decodes value text through ValueDecoder. Trivia tokens (Whitespace, Newline, Comment) are not skipped — they are folded into the surrounding node's raw_* fields so that Document#to_toml produces byte-identical output for unmodified documents.

Scope of the current MVP

Implemented:

Not yet implemented (planned for the next iteration):

Defined in:

toml/parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(source : String) #

[View source]

Instance Method Detail

def parse : Document #

[View source]