DocumentSyntax Class

Root TOML syntax tree

public sealed class DocumentSyntax : SyntaxNode
Inheritance
SyntaxNode DocumentSyntax

Constructors

NameDescription
DocumentSyntax()Creates an instance of a DocumentSyntax

DocumentSyntax()

DocumentSyntax.cs

Creates an instance of a DocumentSyntax

public DocumentSyntax()

Properties

NameDescription
ChildrenCountGets the number of children.
DiagnosticsGets the diagnostics attached to this document.
HasByteOrderMarkGets or sets a value indicating whether the document starts with a byte order mark (U+FEFF).
HasErrorsGets a boolean indicating if the DocumentSyntax.Diagnostics has any errors.
KeyValuesGets the list of KeyValueSyntax
TablesGets the list of tables (either TableSyntax or TableArraySyntax)

ChildrenCount

DocumentSyntax.cs

Gets the number of children.

public override int ChildrenCount { get; }

Property value

int

Gets the diagnostics attached to this document.

public DiagnosticsBag Diagnostics { get; }

Property value

DiagnosticsBag

HasByteOrderMark

DocumentSyntax.cs

Gets or sets a value indicating whether the document starts with a byte order mark (U+FEFF).

public bool HasByteOrderMark { get; set; }

Property value

bool

Remarks

The byte order mark is written by SyntaxNode.WriteTo, before any trivia.

Gets a boolean indicating if the DocumentSyntax.Diagnostics has any errors.

public bool HasErrors { get; }

Property value

bool

Gets the list of KeyValueSyntax

public SyntaxList<KeyValueSyntax> KeyValues { get; }

Gets the list of tables (either TableSyntax or TableArraySyntax)

public SyntaxList<TableSyntaxBase> Tables { get; }

Methods

NameDescription
Accept(SyntaxVisitor)Allow to visit this instance with the specified visitor.

Accept(SyntaxVisitor)

DocumentSyntax.cs

Allow to visit this instance with the specified visitor.

public override void Accept(SyntaxVisitor visitor)

Parameters

visitor SyntaxVisitor
The visitor