sun::semantic_analysis::passes::DeclarationIdentityPass
class · Source (opens in a new tab)
class sun::semantic_analysis::passes::DeclarationIdentityPassAssign identities throughout a syntax tree without resolving signatures.
Public Functions
DeclarationIdentityPass
public · function · Source (opens in a new tab)
sun::semantic_analysis::passes::DeclarationIdentityPass::DeclarationIdentityPass(DeclarationTable &table)Use the declaration table owned by the analysis session.
Related: DeclarationTable
run
run(const std::vector< sun::ast::MoonScopeAST * > &imports) const
public · function · Source (opens in a new tab)
void sun::semantic_analysis::passes::DeclarationIdentityPass::run(const std::vector< sun::ast::MoonScopeAST * > &imports) constRun this stage across all borrowed imported bundles before the next stage.
Related: sun::ast::MoonScopeAST
run(const ExprAST &root, bool skipImportedMoons, const std::function< void()> &declarationsReady={}) const
public · function · Source (opens in a new tab)
void sun::semantic_analysis::passes::DeclarationIdentityPass::run(const ExprAST &root, bool skipImportedMoons, const std::function< void()> &declarationsReady={}) constAssign tree identities while optionally skipping imported moon subtrees.
The bundle being built is always visited as ordinary source. Invoke the optional callback once all visited declarations have identities.
Related: ExprAST
run(const ExprAST &root, DeclarationId owner={}, DeclarationId module={}, const ExprAST *origin=nullptr) const
public · function · Source (opens in a new tab)
void sun::semantic_analysis::passes::DeclarationIdentityPass::run(const ExprAST &root, DeclarationId owner={}, DeclarationId module={}, const ExprAST *origin=nullptr) constRegister source or generated declarations, retaining assigned identities.
Imported declaration records must already be registered by import preparation before attaching their syntax.
Related: ExprAST, DeclarationId
Private Functions
visit
private · function · Source (opens in a new tab)
void sun::semantic_analysis::passes::DeclarationIdentityPass::visit(const ExprAST &root, DeclarationId owner, DeclarationId module, const ExprAST *origin, bool skipImportedMoons) constPreserve ownership and traversal options while visiting child syntax.
Related: ExprAST, DeclarationId
Private Fields
table_
private · variable · Source (opens in a new tab)
DeclarationTable& sun::semantic_analysis::passes::DeclarationIdentityPass::table_No documentation comment.
Related: DeclarationTable