pub struct Ast<S = ()> {
pub ty: AstNode<S>,
pub span: S,
}Expand description
A p-code statement with a byte-range span.
Fields§
§ty: AstNode<S>What kind of statement this is, and its operands.
span: SWhere it came from in the preprocessed source, or () once the
compiler is done with it.
Implementations§
Source§impl Ast
impl Ast
Sourcepub fn pretty_print(&self, spec: &impl PcodeResolver) -> String
pub fn pretty_print(&self, spec: &impl PcodeResolver) -> String
Renders this statement in a SLEIGH-like syntax, resolving identifiers
against spec. For diagnostics and tests; not a stable format.
Trait Implementations§
Source§impl<'de, S> Deserialize<'de> for Ast<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for Ast<S>where
S: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<S: Eq> Eq for Ast<S>
impl<S: PartialEq> StructuralPartialEq for Ast<S>
Auto Trait Implementations§
impl<S> Freeze for Ast<S>
impl<S> RefUnwindSafe for Ast<S>
impl<S> Send for Ast<S>
impl<S> Sync for Ast<S>
impl<S> Unpin for Ast<S>
impl<S> UnsafeUnpin for Ast<S>
impl<S> UnwindSafe for Ast<S>
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