diff options
author | chriseth <c@ethdev.com> | 2014-12-11 02:23:57 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2014-12-11 02:23:57 +0800 |
commit | c7c189cac0313320a2c8e69350dde5c31a1786c0 (patch) | |
tree | 2f84ae2b009acd352424ccd3253a92e8f4539308 /AST.h | |
parent | 3c377f77bbe75e65159e79a61696ba906ac22bda (diff) | |
parent | aebd1490bded59e063bb60237ff5a3285b1bcea1 (diff) | |
download | dexon-solidity-c7c189cac0313320a2c8e69350dde5c31a1786c0.tar.gz dexon-solidity-c7c189cac0313320a2c8e69350dde5c31a1786c0.tar.zst dexon-solidity-c7c189cac0313320a2c8e69350dde5c31a1786c0.zip |
Merge pull request #586 from LefterisJP/natspec_contract_tags
Natspec title and author tag.
Diffstat (limited to 'AST.h')
-rw-r--r-- | AST.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -156,13 +156,15 @@ class ContractDefinition: public Declaration public: ContractDefinition(Location const& _location, ASTPointer<ASTString> const& _name, + ASTPointer<ASTString> const& _documentation, std::vector<ASTPointer<StructDefinition>> const& _definedStructs, std::vector<ASTPointer<VariableDeclaration>> const& _stateVariables, std::vector<ASTPointer<FunctionDefinition>> const& _definedFunctions): Declaration(_location, _name), m_definedStructs(_definedStructs), m_stateVariables(_stateVariables), - m_definedFunctions(_definedFunctions) + m_definedFunctions(_definedFunctions), + m_documentation(_documentation) {} virtual void accept(ASTVisitor& _visitor) override; @@ -172,6 +174,10 @@ public: std::vector<ASTPointer<VariableDeclaration>> const& getStateVariables() const { return m_stateVariables; } std::vector<ASTPointer<FunctionDefinition>> const& getDefinedFunctions() const { return m_definedFunctions; } + /// @return A shared pointer of an ASTString. + /// Can contain a nullptr in which case indicates absence of documentation + ASTPointer<ASTString> const& getDocumentation() const { return m_documentation; } + /// Returns the functions that make up the calling interface in the intended order. std::vector<FunctionDefinition const*> getInterfaceFunctions() const; @@ -179,6 +185,7 @@ private: std::vector<ASTPointer<StructDefinition>> m_definedStructs; std::vector<ASTPointer<VariableDeclaration>> m_stateVariables; std::vector<ASTPointer<FunctionDefinition>> m_definedFunctions; + ASTPointer<ASTString> m_documentation; }; class StructDefinition: public Declaration |