pub struct Ast { /* private fields */ }Expand description
Abstract Syntax Tree representing parsed C code.
Implementations§
Source§impl Ast
impl Ast
Sourcepub fn add_function(&mut self, function: Function)
pub fn add_function(&mut self, function: Function)
Add a function to the AST.
Sourcepub fn add_typedef(&mut self, typedef: Typedef)
pub fn add_typedef(&mut self, typedef: Typedef)
Add a typedef to the AST.
Sourcepub fn add_struct(&mut self, struct_def: Struct)
pub fn add_struct(&mut self, struct_def: Struct)
Add a struct to the AST.
Sourcepub fn macros(&self) -> &[MacroDefinition]
pub fn macros(&self) -> &[MacroDefinition]
Get the macro definitions in the AST.
Sourcepub fn add_macro(&mut self, macro_def: MacroDefinition)
pub fn add_macro(&mut self, macro_def: MacroDefinition)
Add a macro definition to the AST.
Sourcepub fn add_variable(&mut self, variable: Variable)
pub fn add_variable(&mut self, variable: Variable)
Add a variable to the AST.
Trait Implementations§
impl StructuralPartialEq for Ast
Auto Trait Implementations§
impl Freeze for Ast
impl RefUnwindSafe for Ast
impl Send for Ast
impl Sync for Ast
impl Unpin for Ast
impl UnwindSafe for Ast
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