Parse(String, String?, Boolean) Method

Definition

Namespace Tomlyn.Parsing
Assembly Tomlyn.dll

Parses a TOML payload into a syntax tree.

public static DocumentSyntax Parse(string toml, string? sourceName = null, bool validate = true)

Parameters

toml
String

The TOML payload.

sourceName
String

An optional source name used in diagnostics.

validate
Boolean

When true, runs semantic validation after parsing.

Returns

DocumentSyntax
The parsed syntax tree, possibly containing diagnostics.