Have other annotations subclass DeclarationAnnotation

This commit is contained in:
Jason Cobb 2019-12-19 18:14:53 -05:00
parent be14d5f28d
commit 30b1b39901
No known key found for this signature in database
GPG Key ID: 2A3F6A6DCA1E8DED

View File

@ -86,7 +86,7 @@ struct DeclarationAnnotation: ASTAnnotation, ScopableAnnotation
{ {
}; };
struct ImportAnnotation: ASTAnnotation struct ImportAnnotation: DeclarationAnnotation
{ {
/// The absolute path of the source unit to import. /// The absolute path of the source unit to import.
std::string absolutePath; std::string absolutePath;
@ -94,7 +94,7 @@ struct ImportAnnotation: ASTAnnotation
SourceUnit const* sourceUnit = nullptr; SourceUnit const* sourceUnit = nullptr;
}; };
struct TypeDeclarationAnnotation: ASTAnnotation struct TypeDeclarationAnnotation: DeclarationAnnotation
{ {
/// The name of this type, prefixed by proper namespaces if globally accessible. /// The name of this type, prefixed by proper namespaces if globally accessible.
std::string canonicalName; std::string canonicalName;
@ -115,7 +115,7 @@ struct ContractDefinitionAnnotation: TypeDeclarationAnnotation, DocumentedAnnota
std::map<FunctionDefinition const*, ASTNode const*> baseConstructorArguments; std::map<FunctionDefinition const*, ASTNode const*> baseConstructorArguments;
}; };
struct CallableDeclarationAnnotation: ASTAnnotation struct CallableDeclarationAnnotation: DeclarationAnnotation
{ {
/// The set of functions/modifiers/events this callable overrides. /// The set of functions/modifiers/events this callable overrides.
std::set<CallableDeclaration const*> baseFunctions; std::set<CallableDeclaration const*> baseFunctions;
@ -135,7 +135,7 @@ struct ModifierDefinitionAnnotation: CallableDeclarationAnnotation, DocumentedAn
{ {
}; };
struct VariableDeclarationAnnotation: ASTAnnotation struct VariableDeclarationAnnotation: DeclarationAnnotation
{ {
/// Type of variable (type of identifier referencing this variable). /// Type of variable (type of identifier referencing this variable).
TypePointer type = nullptr; TypePointer type = nullptr;