pub struct MelCodegenContext {
pub scopes: Scopes<Type>,
pub code: Vec<LocatableString>,
pub ssa_gen: SSA,
pub ssa: String,
pub log: LogMsgs,
}Fields§
§scopes: Scopes<Type>§code: Vec<LocatableString>§ssa_gen: SSA§ssa: String§log: LogMsgsImplementations§
Source§impl MelCodegenContext
impl MelCodegenContext
pub fn update_log(&self, new: LogMsgs) -> Self
pub fn append_code(self, code: LocatableString) -> Self
pub fn used_ssa(self, ssa: String) -> Self
pub fn next_ssa(self) -> (String, Self)
Trait Implementations§
Source§impl AstVisitor<MelCodegenContext, Analyzed, MelCodegenLocatableError> for MelCodegen
impl AstVisitor<MelCodegenContext, Analyzed, MelCodegenLocatableError> for MelCodegen
fn visit_function_call( &self, ast: &FunctionCall<Analyzed>, context: MelCodegenContext, _driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
fn visit_identifier( &self, ast: &Identifier<Analyzed>, context: MelCodegenContext, _driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
fn visit_argument_list( &self, ast: &ArgumentList<Analyzed>, context: MelCodegenContext, _driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
fn visit_argument( &self, ast: &Argument<Analyzed>, context: MelCodegenContext, _driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
fn visit_binary_expr( &self, ast: &BinaryExpr<Analyzed>, context: MelCodegenContext, driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
fn visit_literal( &self, ast: (&Literal, &TextLocation, &Analyzed), context: MelCodegenContext, _driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
fn visit_ternary_expr( &self, ast: &TernaryExpr<Analyzed>, context: MelCodegenContext, driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
fn visit_member_access_expr( &self, ast: &MemberAccessExpression<Analyzed>, context: MelCodegenContext, _driver: &AstVisitorDriver, ) -> AstVisitorResult<MelCodegenContext, MelCodegenLocatableError>
Source§impl Debug for MelCodegenContext
impl Debug for MelCodegenContext
Source§impl Default for MelCodegenContext
impl Default for MelCodegenContext
Source§fn default() -> MelCodegenContext
fn default() -> MelCodegenContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for MelCodegenContext
impl !Send for MelCodegenContext
impl !Sync for MelCodegenContext
impl !UnwindSafe for MelCodegenContext
impl Freeze for MelCodegenContext
impl Unpin for MelCodegenContext
impl UnsafeUnpin for MelCodegenContext
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