pub enum Role {
Decl {
starts: Starts,
parse: fn(&mut Parser<'_, '_, '_>) -> PResult<DeclKind>,
},
Stmt {
parse: fn(&mut Parser<'_, '_, '_>) -> PResult<Stmt>,
},
Prefix {
starts: Starts,
parse: fn(&mut Parser<'_, '_, '_>) -> PResult<Expr>,
},
Infix {
level: Level,
parse: fn(&mut Parser<'_, '_, '_>, Expr) -> PResult<Expr>,
},
Modifier(Modifier),
BuiltinType,
PatchItem {
parse: fn(&mut Parser<'_, '_, '_>) -> PResult<PatchItem>,
},
Point {
parse: fn(&mut Parser<'_, '_, '_>) -> PResult<Point>,
},
Part,
}Expand description
What a word does where the parser meets it.
Variants§
Decl
Starts a declaration.
Stmt
Starts a statement.
Prefix
Starts an expression (a literal, a prefix, new).
Infix
Joins the expression before it with what follows.
Modifier(Modifier)
Marks the declaration after it.
BuiltinType
A built-in type (i32, string, void).
PatchItem
Starts an item of a patch (before, add, …).
Point
Starts a point inside a patched method (around, at, …).
Part
Only part of another word’s form (else, was, when).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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