Add ScopableAnnotation

This commit is contained in:
Jason Cobb 2019-12-19 18:01:43 -05:00
parent d420fe3786
commit bc71f61467
No known key found for this signature in database
GPG Key ID: 2A3F6A6DCA1E8DED

View File

@ -75,6 +75,13 @@ struct SourceUnitAnnotation: ASTAnnotation
std::set<ExperimentalFeature> experimentalFeatures; std::set<ExperimentalFeature> experimentalFeatures;
}; };
struct ScopableAnnotation
{
/// The scope this declaration resides in. Can be nullptr if it is the global scope.
/// Available only after name and type resolution step.
ASTNode const* scope = nullptr;
};
struct ImportAnnotation: ASTAnnotation struct ImportAnnotation: ASTAnnotation
{ {
/// The absolute path of the source unit to import. /// The absolute path of the source unit to import.