aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerStack.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2014-12-02 18:03:34 +0800
committerLefteris Karapetsas <lefteris@refu.co>2014-12-02 18:03:34 +0800
commit0d3ab07ad1863ad89785c3e66d4e1969eac98a29 (patch)
tree967c49950fd9239f0a9ba263e79c6c5437d240df /CompilerStack.cpp
parente4114492194e048d08ece9782ada1541629afc44 (diff)
downloaddexon-solidity-0d3ab07ad1863ad89785c3e66d4e1969eac98a29.tar
dexon-solidity-0d3ab07ad1863ad89785c3e66d4e1969eac98a29.tar.gz
dexon-solidity-0d3ab07ad1863ad89785c3e66d4e1969eac98a29.tar.bz2
dexon-solidity-0d3ab07ad1863ad89785c3e66d4e1969eac98a29.tar.lz
dexon-solidity-0d3ab07ad1863ad89785c3e66d4e1969eac98a29.tar.xz
dexon-solidity-0d3ab07ad1863ad89785c3e66d4e1969eac98a29.tar.zst
dexon-solidity-0d3ab07ad1863ad89785c3e66d4e1969eac98a29.zip
Handle absence of Natspec doc and add option to solc
Diffstat (limited to 'CompilerStack.cpp')
-rw-r--r--CompilerStack.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/CompilerStack.cpp b/CompilerStack.cpp
index 77a019b5..2b299158 100644
--- a/CompilerStack.cpp
+++ b/CompilerStack.cpp
@@ -140,8 +140,12 @@ string const& CompilerStack::getDocumentation()
for (FunctionDefinition const* f: exportedFunctions)
{
Json::Value user;
- user["user"] = Json::Value(*f->getDocumentation());
- methods[f->getName()] = user;
+ auto strPtr = f->getDocumentation();
+ if (strPtr)
+ {
+ user["user"] = Json::Value(*strPtr);
+ methods[f->getName()] = user;
+ }
}
doc["methods"] = methods;
m_documentation = writer.write(doc);