sun::semantic_analysis::passes

sun::semantic_analysis::passes

namespace · Source (opens in a new tab)

Provides the ordered passes for semantic analysis.

Declares the pass that makes types and templates available before resolution.

Provides the ordered preparation and registration passes for analysis.

Classes

Functions

assignLocalDeclarationName

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

void sun::semantic_analysis::passes::assignLocalDeclarationName(sun::ast::ExprAST &declaration, const std::vector< std::string > &scopePath)

Name the current local declaration and its methods without walking bodies.

Assigns a qualified name to a declaration within its lexical scope.

Related: sun::ast::ExprAST

clearComputedAnalysis

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

void sun::semantic_analysis::passes::clearComputedAnalysis(const ExprAST &root)

Clear computed annotations throughout a tree while preserving identities.

Clears computed annotations throughout the tree while retaining declaration identities.

Related: ExprAST

compatibleNativeFunctionTypes

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

static bool sun::semantic_analysis::passes::compatibleNativeFunctionTypes(const TypePtr &first, const TypePtr &second)

Compare C signatures while retaining scalar and callback type checks.

Related: TypePtr

compatibleNativeValueTypes

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

static bool sun::semantic_analysis::passes::compatibleNativeValueTypes(const TypePtr &first, const TypePtr &second)

Compare native value types without imposing a pointee type on C buffers.

Related: TypePtr

forEachImportedBody

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

template <typename Visitor>
void sun::semantic_analysis::passes::forEachImportedBody(const std::vector< sun::ast::MoonScopeAST * > &imports, SemanticContext &context, Visitor &&visitor)

Visit each borrowed import body in its bundle scope and source file.

Restore the caller's scope and source file even if the visitor throws.

Related: sun::ast::MoonScopeAST, SemanticContext

resetAnalysisSession

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

void sun::semantic_analysis::passes::resetAnalysisSession(const ExprAST &root)

Discard tree annotations before attaching it to a new analysis session.

Discards analysis-session state throughout the syntax tree.

Related: ExprAST