vihaco_parser::impls
impls¶
vihaco_parser::impls
classBareToken¶source
vihaco_parser::impls::BareToken
Bases: Debug, Clone, StructuralPartialEq, PartialEq, Eq, PartialOrd, Ord, Hash, AsRef<str>, Borrow<str>, Display, From<BareToken>, Parse<'src>
Rust struct. An unquoted SST token whose interpretation is deferred to a resolver.
classIdent¶source
vihaco_parser::impls::Ident
Bases: Debug, Clone, StructuralPartialEq, PartialEq, Eq, PartialOrd, Ord, Hash, AsRef<str>, Borrow<str>, Display, From<Ident>, Parse<'src>
Rust struct. An unquoted SST identifier, without a leading `@` sigil.
classQuotedString¶source
vihaco_parser::impls::QuotedString
Bases: Debug, Clone, StructuralPartialEq, PartialEq, Eq, PartialOrd, Ord, Hash, AsRef<str>, Borrow<str>, Display, From<QuotedString>, Parse<'src>
Rust struct. The decoded contents of a quoted SST string literal.
functionbare_token¶source
vihaco_parser::impls::bare_token
Signature
pub fn bare_token<'src>() -> impl Parser<'src, &'src str, String, Err<Simple<'src, char>>> + CloneReturns
impl Parser<'src, &'src str, String, Err<Simple<'src, char>>> + Clone
Parse an unquoted token without wrapping it in BareToken.
Unlike ident, this accepts `@` because a resolver may need to interpret the token later. Quotes, pattern metacharacters, whitespace, and structural delimiters are rejected.
sourcefunctionident¶source
vihaco_parser::impls::ident
Signature
pub fn ident<'src>() -> impl Parser<'src, &'src str, String, Err<Simple<'src, char>>> + CloneReturns
impl Parser<'src, &'src str, String, Err<Simple<'src, char>>> + Clone
Parse the text of an unquoted SST identifier without wrapping it in Ident.
Dots and colons are accepted for hardware and namespaced identifiers. The `@` sigil, quotes, pattern metacharacters, whitespace, and structural delimiters are rejected.
source