Expand description
Parsers and utility types for parsing KDL strings and identifiers.
Structs§
- KdlString
- A KDL string, parsed from an identifier, escaped string, or raw string. Exists in either Owned or Borrowed form, depending on whether there were escapes in the string. Doesn’t track the origin of the string (identifier, escaped, or raw), because KDL semantics treat them all identically.
Traits§
- String
Builder - Helper trait for parsing strings with escape sequences. Allows for returning borrowed strings without any allocation if there are no escape sequences, or for recognizing strings without doing actual parsing / allocation.
Functions§
- is_
identifier - Returns true if this is not considered a “non-identifier character”
- is_
initial_ identifier - Returns true if this is not considered a “non-initial character”
- parse_
bare_ identifier - Parse a KDL bare identifier.
- parse_
escaped_ string - Parse a regular, quoted string (with escape sequences)
- parse_
identifier - Parse a KDL identifier, which is either a bare identifer or a string
- parse_
raw_ string - Parse a raw string, resembling
r##"abc"## - parse_
string - Parse a KDL string, which is either a raw or escaped string