BareKeySyntax Class

A TOML bare key syntax node.

public sealed class BareKeySyntax : BareKeyOrStringValueSyntax
Inheritance
BareKeyOrStringValueSyntax BareKeySyntax

Constructors

NameDescription
BareKeySyntax()Creates a new instance of a BareKeySyntax
BareKeySyntax(string)Creates a new instance of a BareKeySyntax

BareKeySyntax overloads

BareKeySyntax()

BareKeySyntax.cs

Creates a new instance of a BareKeySyntax

public BareKeySyntax()

BareKeySyntax(string)

BareKeySyntax.cs

Creates a new instance of a BareKeySyntax

public BareKeySyntax(string name)
Parameters
name string
The name used for this key

Properties

NameDescription
ChildrenCountGets the number of children.
KeyA textual representation of the key

ChildrenCount

BareKeySyntax.cs

Gets the number of children.

public override int ChildrenCount { get; }

Property value

int

A textual representation of the key

public SyntaxToken? Key { get; set; }

Property value

SyntaxToken?

Methods

NameDescription
Accept(SyntaxVisitor)Allow to visit this instance with the specified visitor.
IsBareKey(string)Determines whether the specified string is a valid bare key.

Accept(SyntaxVisitor)

BareKeySyntax.cs

Allow to visit this instance with the specified visitor.

public override void Accept(SyntaxVisitor visitor)

Parameters

visitor SyntaxVisitor
The visitor

IsBareKey(string)

BareKeySyntax.cs

Determines whether the specified string is a valid bare key.

public static bool IsBareKey(string name)

Parameters

name string
The candidate key.

Returns

bool true if the string is a valid bare key; otherwise false.