TomlTokenType Enum
Definition
Identifies the kind of token a forward-only TOML reader is positioned on.
public enum TomlTokenType
- Extension Methods
Fields
None = 0No token; the reader is positioned before the first token or after the last.
StartTable = 1The start of a table in the normalized stream (a header-defined table, a dotted-key table, or an inline table).
EndTable = 2The end of a table in the normalized stream.
StartArray = 3The start of an array, or - in the normalized stream - of an array-of-tables surfaced as an array whose elements are tables.
EndArray = 4The end of an array, or - in the normalized stream - of an array-of-tables surfaced as an array whose elements are tables.
PropertyName = 5A key naming the value that follows, in the normalized stream.
String = 6A string value.
Integer = 7A 64-bit signed integer value.
Float = 8An IEEE 754 binary64 floating-point value.
Boolean = 9A Boolean value.
OffsetDateTime = 10An RFC 3339 date-time that carries an explicit time offset from UTC.
LocalDateTime = 11A date-time without any offset or time-zone relation.
LocalDate = 12A calendar date without any time-of-day, offset, or time-zone relation.
LocalTime = 13A time of day without any date, offset, or time-zone relation.
TableHeader = 14A
[table]header in the source-order stream, emitted before the header's Key segments.ArrayTableHeader = 15An
[[array-of-tables]]header in the source-order stream, emitted before the header's Key segments.Key = 16One segment of a dotted key in the source-order stream, in a header or in a key/value pair.
Comment = 17A comment in the source-order stream, from after the
#to the end of the line.StartInlineTable = 18The start of an inline table value (
{) in the source-order stream.EndInlineTable = 19The end of an inline table value (
}) in the source-order stream.
Remarks
The vocabulary serves the library's two readers. Utf8TomlReader follows the document's surface syntax in source order: a header surfaces as TableHeader or ArrayTableHeader followed by one Key per dotted segment, a key/value pair as its Key segments followed by the value's tokens, an inline table as StartInlineTable / EndInlineTable, and comments as Comment tokens.
TomlDocumentReader projects the parsed document onto a single, normalized,
nested token stream. TOML expresses table structure in several different ways - out-of-line [table] and
[[array-of-tables]] headers, dotted keys, and inline { … } tables - yet all of them describe the same
logical shape. The normalized stream collapses these forms so that a caller sees a uniform sequence of
StartTable / EndTable and StartArray / EndArray
boundaries with intervening PropertyName and scalar tokens, regardless of how the source spelled the
structure; an array-of-tables is surfaced as a StartArray whose elements are each a
StartTable.
The scalar members are shared by both readers; the header, key, comment, and inline-table members appear only in the source-order stream, and the table and property-name members only in the normalized stream.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |