enum Rule {
Attribute,
VariableDecl,
TypeDecl,
FunctionDecl,
Block,
Statement,
PrimaryExpr,
SingularExpr,
UnaryExpr,
GeneralExpr,
Directive,
}
Expand description
Which grammar rule we are in the midst of parsing.
This is used for error checking. Parser
maintains a stack of
these and (occasionally) checks that it is being pushed and popped
as expected.
Variants§
Attribute
VariableDecl
TypeDecl
FunctionDecl
Block
Statement
PrimaryExpr
SingularExpr
UnaryExpr
GeneralExpr
Directive
Trait Implementations§
source§impl PartialEq for Rule
impl PartialEq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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