Documentation
¶
Overview ¶
Package syntax holds LKAL text helpers shared by the root package and schema. schema imports this package; the root package does too. Neither imports the other through these helpers, so the schema dependency stays one-way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBareKey ¶
IsBareKey reports whether k can be written as an unquoted key. "true" and "false" are quoted, matching the formatter.
func IsControlChar ¶
IsControlChar reports a byte-or-rune that LKAL rejects in strings, comments, and raw lines. Tab is allowed.
func IsNameChar ¶
IsNameChar reports a character that may continue a bare name.
func IsRadixPrefix ¶
IsRadixPrefix reports the first byte of a radix prefix LKAL rejects after 0.
func NormalizeNumber ¶
NormalizeNumber returns the canonical spelling of a base-10 integer or decimal. "-0" becomes "0". A decimal keeps one fractional digit when the fraction is zero, so "1.0" and "1.00" both become "1.0".
func QuoteString ¶
QuoteString returns s as an LKAL quoted string.
Types ¶
This section is empty.