ParseStrict(TomlLexer, TomlSerializerOptions, Boolean) Method

Definition

Namespace Tomlyn.Parsing
Assembly Tomlyn.dll

Parses a TOML payload into a syntax tree and throws on any parse/validation error.

public static DocumentSyntax ParseStrict(TomlLexer lexer, TomlSerializerOptions options, bool validate = true)

Parameters

lexer
TomlLexer

A TOML lexer positioned before the first token.

options
TomlSerializerOptions

Serializer options supplying shared behaviors such as MaxDepth.

validate
Boolean

When true, runs semantic validation after parsing.

Returns

DocumentSyntax
The parsed syntax tree.