mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Introduce AST node for structured documentation.
This commit is contained in:
@@ -56,9 +56,9 @@ struct DocTag
|
||||
std::string paramName; ///< Only used for @param, stores the parameter name.
|
||||
};
|
||||
|
||||
struct DocumentedAnnotation
|
||||
struct StructurallyDocumentedAnnotation
|
||||
{
|
||||
virtual ~DocumentedAnnotation() = default;
|
||||
virtual ~StructurallyDocumentedAnnotation() = default;
|
||||
/// Mapping docstring tag name -> content.
|
||||
std::multimap<std::string, DocTag> docTags;
|
||||
};
|
||||
@@ -101,7 +101,7 @@ struct TypeDeclarationAnnotation: DeclarationAnnotation
|
||||
std::string canonicalName;
|
||||
};
|
||||
|
||||
struct ContractDefinitionAnnotation: TypeDeclarationAnnotation, DocumentedAnnotation
|
||||
struct ContractDefinitionAnnotation: TypeDeclarationAnnotation, StructurallyDocumentedAnnotation
|
||||
{
|
||||
/// List of functions without a body. Can also contain functions from base classes.
|
||||
std::vector<FunctionDefinition const*> unimplementedFunctions;
|
||||
@@ -122,15 +122,15 @@ struct CallableDeclarationAnnotation: DeclarationAnnotation
|
||||
std::set<CallableDeclaration const*> baseFunctions;
|
||||
};
|
||||
|
||||
struct FunctionDefinitionAnnotation: CallableDeclarationAnnotation, DocumentedAnnotation
|
||||
struct FunctionDefinitionAnnotation: CallableDeclarationAnnotation, StructurallyDocumentedAnnotation
|
||||
{
|
||||
};
|
||||
|
||||
struct EventDefinitionAnnotation: CallableDeclarationAnnotation, DocumentedAnnotation
|
||||
struct EventDefinitionAnnotation: CallableDeclarationAnnotation, StructurallyDocumentedAnnotation
|
||||
{
|
||||
};
|
||||
|
||||
struct ModifierDefinitionAnnotation: CallableDeclarationAnnotation, DocumentedAnnotation
|
||||
struct ModifierDefinitionAnnotation: CallableDeclarationAnnotation, StructurallyDocumentedAnnotation
|
||||
{
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@ struct VariableDeclarationAnnotation: DeclarationAnnotation
|
||||
std::set<CallableDeclaration const*> baseFunctions;
|
||||
};
|
||||
|
||||
struct StatementAnnotation: ASTAnnotation, DocumentedAnnotation
|
||||
struct StatementAnnotation: ASTAnnotation
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user