sun::semantic_analysis::SemanticPipeline
class · Source (opens in a new tab)
class sun::semantic_analysis::SemanticPipelineRun import preparation, then source analysis, in one shared session.
Public Functions
SemanticPipeline
SemanticPipeline(const SemanticPipeline &)=delete
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticPipeline::SemanticPipeline(const SemanticPipeline &)=deleteKeep pass references tied to the context and helpers they were given.
SemanticPipeline(sun::semantic_analysis::SemanticAnalyzer &analyzer)
public · function · Source (opens in a new tab)
sun::semantic_analysis::SemanticPipeline::SemanticPipeline(sun::semantic_analysis::SemanticAnalyzer &analyzer)Borrow the owning analyzer's shared context and checking helpers.
Related: sun::semantic_analysis::SemanticAnalyzer
declarations
public · function · Source (opens in a new tab)
passes::DeclarationCollectionPass & sun::semantic_analysis::SemanticPipeline::declarations()Access the pass that registers declarations before body checking.
Related: passes::DeclarationCollectionPass
operator=
public · function · Source (opens in a new tab)
SemanticPipeline & sun::semantic_analysis::SemanticPipeline::operator=(const SemanticPipeline &)=deleteDisallows assignment so ownership and object identity cannot be duplicated.
Related: SemanticPipeline
prepareGenerated
prepareGenerated(const ExprAST &expression, DeclarationId owner={}, const ExprAST *origin=nullptr)
public · function · Source (opens in a new tab)
void sun::semantic_analysis::SemanticPipeline::prepareGenerated(const ExprAST &expression, DeclarationId owner={}, const ExprAST *origin=nullptr)Assign identities to newly generated syntax before resolving it.
Related: ExprAST, DeclarationId
prepareGenerated(ExprAST &expression, const std::vector< std::string > &scope, DeclarationId owner={}, const ExprAST *origin=nullptr)
public · function · Source (opens in a new tab)
void sun::semantic_analysis::SemanticPipeline::prepareGenerated(ExprAST &expression, const std::vector< std::string > &scope, DeclarationId owner={}, const ExprAST *origin=nullptr)Prepare generated method identities and names in their enclosing scope.
Related: ExprAST, DeclarationId
run
public · function · Source (opens in a new tab)
void sun::semantic_analysis::SemanticPipeline::run(sun::ast::BlockExprAST &block, const std::function< void()> &declarationsReady={})Prepare imports and names, collect declarations, and check bodies in a complete AST whose bundles have already been loaded.
Performs no file I/O.
Related: sun::ast::BlockExprAST
Private Functions
getMoonImports
private · function · static · Source (opens in a new tab)
std::vector< sun::ast::MoonScopeAST * > sun::semantic_analysis::SemanticPipeline::getMoonImports(const sun::ast::BlockExprAST &block)Returns borrowed pointers to the top-level imported bundles, excluding the bundle being built.
Does not register declarations or modify the AST.
Related: sun::ast::MoonScopeAST, sun::ast::BlockExprAST
prepareImports
private · function · Source (opens in a new tab)
void sun::semantic_analysis::SemanticPipeline::prepareImports(sun::ast::BlockExprAST &block)Prepare every imported bundle's identities, types, signatures, and declaration bindings before source analysis.
Uses the supplied AST only; source declarations and the bundle being built are left for later stages.
Related: sun::ast::BlockExprAST
Private Fields
- analyzer_
- bodyAnalysisPass_
- context_
- declarationCollectionPass_
- declarationIdentityPass_
- declarationNamingPass_
- fieldInitializerPreparationPass_
- globalInitializerEvaluationPass_
- globalRegistrationPass_
- importCompletionPass_
- importDependencyValidationPass_
- importLibraryDeclarationsPass_
- specializationBodyAnalysisPass_
- typeRegistrationPass_
analyzer_
private · variable · Source (opens in a new tab)
sun::semantic_analysis::SemanticAnalyzer& sun::semantic_analysis::SemanticPipeline::analyzer_No documentation comment.
Related: sun::semantic_analysis::SemanticAnalyzer
bodyAnalysisPass_
private · variable · Source (opens in a new tab)
passes::BodyAnalysisPass sun::semantic_analysis::SemanticPipeline::bodyAnalysisPass_No documentation comment.
Related: passes::BodyAnalysisPass
context_
private · variable · Source (opens in a new tab)
sun::semantic_analysis::SemanticContext& sun::semantic_analysis::SemanticPipeline::context_No documentation comment.
Related: sun::semantic_analysis::SemanticContext
declarationCollectionPass_
private · variable · Source (opens in a new tab)
passes::DeclarationCollectionPass sun::semantic_analysis::SemanticPipeline::declarationCollectionPass_No documentation comment.
Related: passes::DeclarationCollectionPass
declarationIdentityPass_
private · variable · Source (opens in a new tab)
passes::DeclarationIdentityPass sun::semantic_analysis::SemanticPipeline::declarationIdentityPass_No documentation comment.
Related: passes::DeclarationIdentityPass
declarationNamingPass_
private · variable · Source (opens in a new tab)
passes::DeclarationNamingPass sun::semantic_analysis::SemanticPipeline::declarationNamingPass_No documentation comment.
Related: passes::DeclarationNamingPass
fieldInitializerPreparationPass_
private · variable · Source (opens in a new tab)
passes::FieldInitializerPreparationPass sun::semantic_analysis::SemanticPipeline::fieldInitializerPreparationPass_No documentation comment.
Related: passes::FieldInitializerPreparationPass
globalInitializerEvaluationPass_
private · variable · Source (opens in a new tab)
passes::GlobalInitializerEvaluationPass sun::semantic_analysis::SemanticPipeline::globalInitializerEvaluationPass_No documentation comment.
Related: passes::GlobalInitializerEvaluationPass
globalRegistrationPass_
private · variable · Source (opens in a new tab)
passes::GlobalRegistrationPass sun::semantic_analysis::SemanticPipeline::globalRegistrationPass_No documentation comment.
Related: passes::GlobalRegistrationPass
importCompletionPass_
private · variable · Source (opens in a new tab)
passes::ImportCompletionPass sun::semantic_analysis::SemanticPipeline::importCompletionPass_No documentation comment.
Related: passes::ImportCompletionPass
importDependencyValidationPass_
private · variable · Source (opens in a new tab)
passes::ImportDependencyValidationPass sun::semantic_analysis::SemanticPipeline::importDependencyValidationPass_No documentation comment.
Related: passes::ImportDependencyValidationPass
importLibraryDeclarationsPass_
private · variable · Source (opens in a new tab)
passes::ImportLibraryDeclarationsPass sun::semantic_analysis::SemanticPipeline::importLibraryDeclarationsPass_No documentation comment.
Related: passes::ImportLibraryDeclarationsPass
specializationBodyAnalysisPass_
private · variable · Source (opens in a new tab)
passes::SpecializationBodyAnalysisPass sun::semantic_analysis::SemanticPipeline::specializationBodyAnalysisPass_No documentation comment.
Related: passes::SpecializationBodyAnalysisPass
typeRegistrationPass_
private · variable · Source (opens in a new tab)
passes::TypeRegistrationPass sun::semantic_analysis::SemanticPipeline::typeRegistrationPass_No documentation comment.
Related: passes::TypeRegistrationPass