sun::semantic_analysis::SemanticContext::SourceFileGuard

sun::semantic_analysis::SemanticContext::SourceFileGuard

struct · Source (opens in a new tab)

struct sun::semantic_analysis::SemanticContext::SourceFileGuard

Restore source context after declaration analysis or specialization.

Public Functions

SourceFileGuard

SourceFileGuard(SemanticContext &c, SourceFileId id)

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

sun::semantic_analysis::SemanticContext::SourceFileGuard::SourceFileGuard(SemanticContext &c, SourceFileId id)

Changes the active source file and saves the previous source context.

Related: SemanticContext, SourceFileId

SourceFileGuard(const SourceFileGuard &)=delete

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

sun::semantic_analysis::SemanticContext::SourceFileGuard::SourceFileGuard(const SourceFileGuard &)=delete

Changes the active source file and saves the previous source context.

operator=

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

SourceFileGuard & sun::semantic_analysis::SemanticContext::SourceFileGuard::operator=(const SourceFileGuard &)=delete

Disallows assignment so ownership and object identity cannot be duplicated.

Related: SourceFileGuard

~SourceFileGuard

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

sun::semantic_analysis::SemanticContext::SourceFileGuard::~SourceFileGuard()

Restores the source file used to resolve imports and report errors.

Public Fields

ctx

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

SemanticContext& sun::semantic_analysis::SemanticContext::SourceFileGuard::ctx

No documentation comment.

Related: SemanticContext

saved

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

SourceFileId sun::semantic_analysis::SemanticContext::SourceFileGuard::saved

No documentation comment.

Related: SourceFileId