pub enum OriginalNode {
Expression(Box<Expression>),
Statement(Box<Statement>),
Pattern(Box<PatternLike>),
}Expand description
An original source AST node preserved verbatim for re-emission when the
compiler bails on a construct it does not model (UnsupportedNode).
Holding the typed node directly — rather than a serde_json::Value — lets
lowering stash it and codegen restore it without round-tripping through
serde, which is what kept the AST (de)serializers out of the generated
binary. The variant records which syntactic position the node came from, so
codegen can dispatch without re-parsing a type tag.
Variants§
Trait Implementations§
Source§impl Clone for OriginalNode
impl Clone for OriginalNode
Source§fn clone(&self) -> OriginalNode
fn clone(&self) -> OriginalNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OriginalNode
impl RefUnwindSafe for OriginalNode
impl Send for OriginalNode
impl Sync for OriginalNode
impl Unpin for OriginalNode
impl UnsafeUnpin for OriginalNode
impl UnwindSafe for OriginalNode
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