sun::semantic_analysis::DeclarationState
class · Source (opens in a new tab)
class sun::semantic_analysis::DeclarationStateDeclaration bookkeeping shared by collection and body checking.
Public Functions
- clearPendingExtensions
- deferExtension
- hasClassShape
- isDeclared
- noteClassShape
- noteDeclared
- pendingExtensions
clearPendingExtensions
public · function · Source (opens in a new tab)
void sun::semantic_analysis::DeclarationState::clearPendingExtensions(const std::string &className)Drop the extensions for a class once they have been merged into it.
deferExtension
public · function · Source (opens in a new tab)
void sun::semantic_analysis::DeclarationState::deferExtension(const std::string &className, ClassDefinitionAST *extension)Hold an extension until its primary class is analyzed.
Related: ClassDefinitionAST
hasClassShape
public · function · Source (opens in a new tab)
bool sun::semantic_analysis::DeclarationState::hasClassShape(sun::semantic_analysis::DeclarationId declaration) constTrue when this class's shape was already registered by the pre-pass.
Related: sun::semantic_analysis::DeclarationId
isDeclared
public · function · Source (opens in a new tab)
bool sun::semantic_analysis::DeclarationState::isDeclared(const std::string &name, const SemanticScopeBase *scopeIdentity) constCheck whether a source name has already been declared in this scope.
Related: SemanticScopeBase
noteClassShape
public · function · Source (opens in a new tab)
bool sun::semantic_analysis::DeclarationState::noteClassShape(sun::semantic_analysis::DeclarationId declaration)Record a class shape and report whether it is new.
Related: sun::semantic_analysis::DeclarationId
noteDeclared
public · function · Source (opens in a new tab)
void sun::semantic_analysis::DeclarationState::noteDeclared(const std::string &name, const SemanticScopeBase *scopeIdentity)Record a source name in its scope; reopened modules reuse their scope.
Related: SemanticScopeBase
pendingExtensions
public · function · Source (opens in a new tab)
const std::vector< ClassDefinitionAST * > * sun::semantic_analysis::DeclarationState::pendingExtensions(const std::string &className) constThe extensions waiting for this class, or nullptr when there are none.
Related: ClassDefinitionAST
Private Fields
definedSymbols_
private · variable · Source (opens in a new tab)
std::unordered_map<const SemanticScopeBase *, std::unordered_set<std::string> > sun::semantic_analysis::DeclarationState::definedSymbols_No documentation comment.
Related: SemanticScopeBase
pendingExtensions_
private · variable · Source (opens in a new tab)
std::unordered_map<std::string, std::vector<ClassDefinitionAST *> > sun::semantic_analysis::DeclarationState::pendingExtensions_No documentation comment.
Related: ClassDefinitionAST
preRegisteredClassShapes_
private · variable · Source (opens in a new tab)
std::unordered_set<sun::semantic_analysis::DeclarationId> sun::semantic_analysis::DeclarationState::preRegisteredClassShapes_No documentation comment.