pub enum GrammarState {
Show 14 variants
Start,
CellExpr,
KeywordOrIdent,
Whitespace,
Ident,
Number,
String,
Iri,
Block,
Triple,
Reified,
List,
Paren,
Unconstrained,
}Expand description
VibeScript 0.1 grammar parse states. These correspond to the non-terminals
in vibe-0.1.gbnf that determine which characters are valid next.
Variants§
Start
Start of input — expects a cell (=) or module keyword.
CellExpr
After = — expects an expression.
KeywordOrIdent
Expecting a keyword: module, import, prefix, requires, fn,
on, let, return, or an identifier (statement/expression).
Whitespace
Inside whitespace — any amount of whitespace is consumed.
Ident
Inside an identifier — [A-Za-z0-9_] continue, anything else ends it.
Number
Inside a number — [0-9.] continue.
String
Inside a string literal — [^"\\] or escape sequences continue.
Iri
Inside an IRI — [^<>\s] continue.
Block
Inside a block — { entered, statements expected.
Triple
Inside a triple — <<( entered, three expressions expected.
Reified
Inside a reified triple — << entered.
List
Inside a list — [ entered.
Paren
Inside a parenthesized expression.
Unconstrained
Unconstrained — no grammar active (free generation).
Trait Implementations§
Source§impl Clone for GrammarState
impl Clone for GrammarState
impl Copy for GrammarState
Source§impl Debug for GrammarState
impl Debug for GrammarState
Source§impl Default for GrammarState
impl Default for GrammarState
impl Eq for GrammarState
Source§impl PartialEq for GrammarState
impl PartialEq for GrammarState
impl StructuralPartialEq for GrammarState
Auto Trait Implementations§
impl Freeze for GrammarState
impl RefUnwindSafe for GrammarState
impl Send for GrammarState
impl Sync for GrammarState
impl Unpin for GrammarState
impl UnsafeUnpin for GrammarState
impl UnwindSafe for GrammarState
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 more