Struct scilla_parser::ast::nodes::NodeProgram
source · pub struct NodeProgram {
pub version: WithMetaData<String>,
pub import_declarations: Option<WithMetaData<NodeImportDeclarations>>,
pub library_definition: Option<WithMetaData<NodeLibraryDefinition>>,
pub contract_definition: WithMetaData<NodeContractDefinition>,
}Expand description
NodeProgram represents a program node in the AST It contains a version, optional import declarations, optional library definition and a contract definition
Fields§
§version: WithMetaData<String>The version of the program
import_declarations: Option<WithMetaData<NodeImportDeclarations>>The import declarations of the program
library_definition: Option<WithMetaData<NodeLibraryDefinition>>The library definition of the program
contract_definition: WithMetaData<NodeContractDefinition>The contract definition of the program
Trait Implementations§
source§impl AstVisitor for NodeProgram
impl AstVisitor for NodeProgram
fn visit( &self, emitter: &mut dyn AstConverting ) -> Result<TraversalResult, String>
source§impl Clone for NodeProgram
impl Clone for NodeProgram
source§fn clone(&self) -> NodeProgram
fn clone(&self) -> NodeProgram
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for NodeProgram
impl Debug for NodeProgram
source§impl PartialEq for NodeProgram
impl PartialEq for NodeProgram
source§fn eq(&self, other: &NodeProgram) -> bool
fn eq(&self, other: &NodeProgram) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for NodeProgram
impl PartialOrd for NodeProgram
source§fn partial_cmp(&self, other: &NodeProgram) -> Option<Ordering>
fn partial_cmp(&self, other: &NodeProgram) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for NodeProgram
impl StructuralEq for NodeProgram
impl StructuralPartialEq for NodeProgram
Auto Trait Implementations§
impl RefUnwindSafe for NodeProgram
impl Send for NodeProgram
impl Sync for NodeProgram
impl Unpin for NodeProgram
impl UnwindSafe for NodeProgram
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