Enum ra_ap_parser::PrefixEntryPoint
source · [−]pub enum PrefixEntryPoint {
Vis,
Block,
Stmt,
Pat,
Ty,
Expr,
Path,
Item,
MetaItem,
}
Expand description
Parse a prefix of the input as a given syntactic construct.
This is used by macro-by-example parser to implement things like $i:item
and the naming of variants follows the naming of macro fragments.
Note that this is generally non-optional – the result is intentionally not
Option<Output>
. The way MBE work, by the time we try to parse $e:expr
we already commit to expression. In other words, this API by design can’t be
used to implement “rollback and try another alternative” logic.
Variants
Vis
Block
Stmt
Pat
Ty
Expr
Path
Item
MetaItem
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PrefixEntryPoint
impl Send for PrefixEntryPoint
impl Sync for PrefixEntryPoint
impl Unpin for PrefixEntryPoint
impl UnwindSafe for PrefixEntryPoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more