parser property

Parser<TomlDocument> parser
final

Parser for TOML documents.

If an expression is just a blank line or comment, TomlExpression.parser returns null. These expressions are not part of the AST and must be filtered out.

Implementation

static final Parser<TomlDocument> parser = TomlExpression.parser
    .plusSeparated(tomlNewline)
    .map(discardSeparators)
    .map((expressions) => TomlDocument(expressions.whereNotNull()));