sun::semantic_analysis::passes::FieldInitializerPreparationPass
class · Source (opens in a new tab)
class sun::semantic_analysis::passes::FieldInitializerPreparationPassInsert 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) constPrepare 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) constRun this stage across all borrowed imported bundles before the next stage.
Related: sun::ast::MoonScopeAST