sun::semantic_analysis::passes::FieldInitializerPreparationPass

sun::semantic_analysis::passes::FieldInitializerPreparationPass

class · Source (opens in a new tab)

class sun::semantic_analysis::passes::FieldInitializerPreparationPass

Insert field defaults into constructors, creating a constructor when needed.

Public Functions

run

run(sun::ast::ExprAST &root, bool skipImportedMoons=false) const

public · function · Source (opens in a new tab)

void sun::semantic_analysis::passes::FieldInitializerPreparationPass::run(sun::ast::ExprAST &root, bool skipImportedMoons=false) const

Prepare constructors and field defaults throughout the AST, including bodies.

Optionally skip imported moon subtrees; the bundle being built always remains source and is visited.

Related: sun::ast::ExprAST

run(const std::vector< sun::ast::MoonScopeAST * > &imports) const

public · function · Source (opens in a new tab)

void sun::semantic_analysis::passes::FieldInitializerPreparationPass::run(const std::vector< sun::ast::MoonScopeAST * > &imports) const

Run this stage across all borrowed imported bundles before the next stage.

Related: sun::ast::MoonScopeAST