pub struct Metadata {
pub includes: Vec<String>,
pub mappings: BTreeMap<String, SpannableNode<Atom>>,
}
Expand description
The metadata of the WAG.
§Grammar
Metadata -> Meta* MetaDelim;
MetaDelim ->
"=="
"="
+;
Meta -> Include | Config;
Include -> "include"
Path;
Config -> Identifier ":"
Expression ";"
;
Fields§
§includes: Vec<String>
All imports for this grammar.
mappings: BTreeMap<String, SpannableNode<Atom>>
Any extra key-value mappings.
Implementations§
Trait Implementations§
Source§impl Parse for Metadata
impl Parse for Metadata
Source§fn parse(lexer: &mut LexerBridge<'_>) -> ParseResult<Self>
fn parse(lexer: &mut LexerBridge<'_>) -> ParseResult<Self>
Given a lexer, try to parse a valid instance of this node. Read more
Source§fn parse_sep(
lexer: &mut LexerBridge<'_>,
join: Tokens,
) -> ParseResult<Vec<Self>>where
Self: Sized,
fn parse_sep(
lexer: &mut LexerBridge<'_>,
join: Tokens,
) -> ParseResult<Vec<Self>>where
Self: Sized,
Source§fn parse_sep_end(
lexer: &mut LexerBridge<'_>,
join: Tokens,
end: Tokens,
) -> ParseResult<Vec<Self>>where
Self: Sized,
fn parse_sep_end(
lexer: &mut LexerBridge<'_>,
join: Tokens,
end: Tokens,
) -> ParseResult<Vec<Self>>where
Self: Sized,
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> WrapSpannable<T, SpannableNode<T>> for Twhere
T: Parse,
impl<T> WrapSpannable<T, SpannableNode<T>> for Twhere
T: Parse,
Source§fn wrap_spannable(self) -> SpannableNode<T>
fn wrap_spannable(self) -> SpannableNode<T>
Wrap dummy span information around the node.
Source§fn into_spanned(self, span: Range<usize>) -> SpannableNode<T>
fn into_spanned(self, span: Range<usize>) -> SpannableNode<T>
Convert the node into a
SpannableNode
with the specified Span
.