pub struct AstFactory {}Implementations§
Source§impl AstFactory
impl AstFactory
pub fn create_empty_statement(location: SourceLocation, id: AstId) -> AstNode
pub fn create_return_statement( condition: Option<AstNode>, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_exit_statement(location: SourceLocation, id: AstId) -> AstNode
pub fn create_continue_statement(location: SourceLocation, id: AstId) -> AstNode
pub fn create_case_condition( result: AstNode, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_vla_range_statement( location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_literal( kind: AstLiteral, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_hardware_access( access: DirectAccessType, direction: HardwareAccessType, address: Vec<AstNode>, location: SourceLocation, id: usize, ) -> AstNode
pub fn create_default_value(location: SourceLocation, id: AstId) -> AstNode
pub fn create_expression_list( expressions: Vec<AstNode>, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_paren_expression( expression: AstNode, location: SourceLocation, id: AstId, ) -> AstNode
Sourcepub fn create_if_statement(
stmt: IfStatement,
location: SourceLocation,
id: AstId,
) -> AstNode
pub fn create_if_statement( stmt: IfStatement, location: SourceLocation, id: AstId, ) -> AstNode
creates a new if-statement
Sourcepub fn create_for_loop(
stmt: ForLoopStatement,
location: SourceLocation,
id: AstId,
) -> AstNode
pub fn create_for_loop( stmt: ForLoopStatement, location: SourceLocation, id: AstId, ) -> AstNode
creates a new for loop statement
Sourcepub fn create_while_statement(
stmt: LoopStatement,
location: SourceLocation,
id: AstId,
) -> AstNode
pub fn create_while_statement( stmt: LoopStatement, location: SourceLocation, id: AstId, ) -> AstNode
creates a new while statement
Sourcepub fn create_repeat_statement(
stmt: LoopStatement,
location: SourceLocation,
id: AstId,
) -> AstNode
pub fn create_repeat_statement( stmt: LoopStatement, location: SourceLocation, id: AstId, ) -> AstNode
creates a new repeat-statement
Sourcepub fn create_case_statement(
stmt: CaseStatement,
location: SourceLocation,
id: AstId,
) -> AstNode
pub fn create_case_statement( stmt: CaseStatement, location: SourceLocation, id: AstId, ) -> AstNode
creates a new case-statement
Sourcepub fn create_or_expression(left: AstNode, right: AstNode) -> AstNode
pub fn create_or_expression(left: AstNode, right: AstNode) -> AstNode
creates an or-expression
Sourcepub fn create_not_expression(
operator: AstNode,
location: SourceLocation,
id: usize,
) -> AstNode
pub fn create_not_expression( operator: AstNode, location: SourceLocation, id: usize, ) -> AstNode
creates a not-expression
Sourcepub fn create_identifier<T, U>(name: T, location: U, id: AstId) -> AstNode
pub fn create_identifier<T, U>(name: T, location: U, id: AstId) -> AstNode
creates a new Identifier
pub fn create_super_reference<T>(
location: T,
deref: Option<()>,
id: AstId,
) -> AstNodewhere
T: Into<SourceLocation>,
pub fn create_this_reference<T>(location: T, id: AstId) -> AstNodewhere
T: Into<SourceLocation>,
pub fn create_unary_expression( operator: Operator, value: AstNode, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_assignment(left: AstNode, right: AstNode, id: AstId) -> AstNode
pub fn create_output_assignment( left: AstNode, right: AstNode, id: AstId, ) -> AstNode
pub fn create_ref_assignment( left: AstNode, right: AstNode, id: AstId, ) -> AstNode
pub fn create_member_reference( member: AstNode, base: Option<AstNode>, id: AstId, ) -> AstNode
pub fn create_global_reference( id: AstId, member: AstNode, location: SourceLocation, ) -> AstNode
pub fn create_index_reference( index: AstNode, base: Option<AstNode>, id: AstId, location: SourceLocation, ) -> AstNode
pub fn create_address_of_reference( base: AstNode, id: AstId, location: SourceLocation, ) -> AstNode
pub fn create_deref_reference( base: AstNode, id: AstId, location: SourceLocation, ) -> AstNode
pub fn create_direct_access( access: DirectAccessType, index: AstNode, id: AstId, location: SourceLocation, ) -> AstNode
Sourcepub fn create_binary_expression(
left: AstNode,
operator: Operator,
right: AstNode,
id: AstId,
) -> AstNode
pub fn create_binary_expression( left: AstNode, operator: Operator, right: AstNode, id: AstId, ) -> AstNode
creates a new binary statement
Sourcepub fn create_cast_statement(
type_name: AstNode,
stmt: AstNode,
location: &SourceLocation,
id: AstId,
) -> AstNode
pub fn create_cast_statement( type_name: AstNode, stmt: AstNode, location: &SourceLocation, id: AstId, ) -> AstNode
creates a new cast statement
pub fn create_call_statement<T>(
operator: AstNode,
parameters: Option<AstNode>,
id: usize,
location: T,
) -> AstNodewhere
T: Into<SourceLocation>,
Sourcepub fn create_call_to(
function_name: String,
parameters: Vec<AstNode>,
id: usize,
parameter_list_id: usize,
location: &SourceLocation,
) -> AstNode
pub fn create_call_to( function_name: String, parameters: Vec<AstNode>, id: usize, parameter_list_id: usize, location: &SourceLocation, ) -> AstNode
creates a new call statement to the given function and parameters
pub fn create_multiplied_statement( multiplier: u32, element: AstNode, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_range_statement( start: AstNode, end: AstNode, id: AstId, ) -> AstNode
pub fn create_call_to_with_ids( function_name: &str, parameters: Vec<AstNode>, location: &SourceLocation, id_provider: IdProvider, ) -> AstNode
pub fn create_call_to_check_function_ast( check_function_name: &str, parameter: AstNode, sub_range: Range<AstNode>, location: &SourceLocation, id_provider: IdProvider, ) -> AstNode
pub fn create_jump_statement( condition: Box<AstNode>, target: Box<AstNode>, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_label_statement( name: String, location: SourceLocation, id: AstId, ) -> AstNode
pub fn create_plus_one_expression( value: AstNode, location: SourceLocation, id: AstId, ) -> AstNode
Auto Trait Implementations§
impl Freeze for AstFactory
impl RefUnwindSafe for AstFactory
impl Send for AstFactory
impl Sync for AstFactory
impl Unpin for AstFactory
impl UnsafeUnpin for AstFactory
impl UnwindSafe for AstFactory
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