aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerStack.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-06-19 21:40:09 +0800
committerLiana Husikyan <liana@ethdev.com>2015-07-16 19:57:56 +0800
commitdc605218dac6f5d813da36ff3302d248ae7d1465 (patch)
treeabb3de9280a86f1ad42ae4c7db8fafed3dd75eff /CompilerStack.cpp
parent0111d3d4c442230803886fa20654e8d62517814d (diff)
downloaddexon-solidity-dc605218dac6f5d813da36ff3302d248ae7d1465.tar
dexon-solidity-dc605218dac6f5d813da36ff3302d248ae7d1465.tar.gz
dexon-solidity-dc605218dac6f5d813da36ff3302d248ae7d1465.tar.bz2
dexon-solidity-dc605218dac6f5d813da36ff3302d248ae7d1465.tar.lz
dexon-solidity-dc605218dac6f5d813da36ff3302d248ae7d1465.tar.xz
dexon-solidity-dc605218dac6f5d813da36ff3302d248ae7d1465.tar.zst
dexon-solidity-dc605218dac6f5d813da36ff3302d248ae7d1465.zip
changed implementation according to notes from code review
Diffstat (limited to 'CompilerStack.cpp')
-rw-r--r--CompilerStack.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/CompilerStack.cpp b/CompilerStack.cpp
index 7cd8316c..6013c00d 100644
--- a/CompilerStack.cpp
+++ b/CompilerStack.cpp
@@ -129,11 +129,12 @@ void CompilerStack::parse()
m_parseSuccessful = true;
}
-void CompilerStack::parseNatspecDocumentation(ContractDefinition& _contract)
+void CompilerStack::parseNatspecDocumentation(ContractDefinition const& _contract)
{
InterfaceHandler interfaceHandler;
- interfaceHandler.generateDevDocumentation(_contract);
- interfaceHandler.generateUserDocumentation(_contract);
+ string devDoc =_contract.devDocumentation();
+ devDoc = interfaceHandler.devDocumentation(_contract);
+ //interfaceHandler.generateUserDocumentation(_contract);
}
void CompilerStack::parse(string const& _sourceCode)
@@ -256,8 +257,11 @@ string const& CompilerStack::getMetadata(string const& _contractName, Documentat
default:
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Illegal documentation type."));
}
+ auto resPtr = ((*doc) ? *(*doc) : contract.interfaceHandler->getDocumentation(*contract.contract, _type));
+
if (!*doc)
- *doc = contract.interfaceHandler->getDocumentation(*contract.contract, _type);
+ *doc = (unique_ptr<string>(new string(contract.interfaceHandler->getDocumentation(*contract.contract, _type))));
+
return *(*doc);
}