pub enum Mapping {
Emit(Shape),
Native(&'static str),
ExprStmt,
Error,
Transparent,
}Expand description
How one CST node maps onto the IR.
Variants§
Emit(Shape)
Emit a node with this shape and recurse into children.
Native(&'static str)
Emit a Shape::Native node under this grammar kind name.
ExprStmt
A statement wrapper: unwrap when the inner expression emits a node.
Error
A parser error region: emit Shape::Error and record its range.
Transparent
No node of its own; children are still visited.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mapping
impl RefUnwindSafe for Mapping
impl Send for Mapping
impl Sync for Mapping
impl Unpin for Mapping
impl UnsafeUnpin for Mapping
impl UnwindSafe for Mapping
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