sun::semantic_analysis::AnalysisResults

sun::semantic_analysis::AnalysisResults

struct · Source (opens in a new tab)

struct sun::semantic_analysis::AnalysisResults

Everything analysis concludes about a program that does not belong to a single syntax node.

Per-node conclusions, such as an expression's type or how a file-scope variable gets its first value, are stored on the nodes themselves (see ast/analysis.h); this holds the rest.

One is created per compilation and shared by the analyzer, which fills it in, and code generation, which reads it. It is complete once the analysis pipeline has run.

Public Functions

AnalysisResults

AnalysisResults(const AnalysisResults &)=delete

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

sun::semantic_analysis::AnalysisResults::AnalysisResults(const AnalysisResults &)=delete

The type registry refers to declarations, so the parts stay together.

Related: AnalysisResults, declarations

AnalysisResults()=default

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

sun::semantic_analysis::AnalysisResults::AnalysisResults()=default

Starts with no declarations beyond the builtin ones.

operator=

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

AnalysisResults & sun::semantic_analysis::AnalysisResults::operator=(const AnalysisResults &)=delete

The type registry refers to declarations, so the parts stay together.

Related: AnalysisResults, declarations

Public Fields

declarations

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

DeclarationTable sun::semantic_analysis::AnalysisResults::declarations

No documentation comment.

Related: DeclarationTable

types

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

std::shared_ptr<TypeRegistry> sun::semantic_analysis::AnalysisResults::types =
      std::make_shared<TypeRegistry>(declarations)

No documentation comment.

Related: TypeRegistry, declarations