sun::semantic_analysis::passes::DeclarationNamingPass

sun::semantic_analysis::passes::DeclarationNamingPass

class · Source (opens in a new tab)

class sun::semantic_analysis::passes::DeclarationNamingPass

Assign declaration names without resolving types or registering symbols.

Public Functions

run

run(const std::vector< sun::ast::MoonScopeAST * > &imports, const std::vector< std::string > &scopePath={}) const

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

void sun::semantic_analysis::passes::DeclarationNamingPass::run(const std::vector< sun::ast::MoonScopeAST * > &imports, const std::vector< std::string > &scopePath={}) const

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

Related: sun::ast::MoonScopeAST

run(sun::ast::ExprAST &root, const std::vector< std::string > &scopePath={}, bool moduleLevel=true, bool skipImportedMoons=false) const

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

void sun::semantic_analysis::passes::DeclarationNamingPass::run(sun::ast::ExprAST &root, const std::vector< std::string > &scopePath={}, bool moduleLevel=true, bool skipImportedMoons=false) const

Preserve imported and specialized names.

Function bodies are named later, after their enclosing signatures resolve; local variables stay local. Optionally skip imported moons, always visiting the bundle being built.

Related: sun::ast::ExprAST