mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Handle absence of Natspec doc and add option to solc
This commit is contained in:
parent
e411449219
commit
0d3ab07ad1
@ -140,8 +140,12 @@ string const& CompilerStack::getDocumentation()
|
|||||||
for (FunctionDefinition const* f: exportedFunctions)
|
for (FunctionDefinition const* f: exportedFunctions)
|
||||||
{
|
{
|
||||||
Json::Value user;
|
Json::Value user;
|
||||||
user["user"] = Json::Value(*f->getDocumentation());
|
auto strPtr = f->getDocumentation();
|
||||||
methods[f->getName()] = user;
|
if (strPtr)
|
||||||
|
{
|
||||||
|
user["user"] = Json::Value(*strPtr);
|
||||||
|
methods[f->getName()] = user;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
doc["methods"] = methods;
|
doc["methods"] = methods;
|
||||||
m_documentation = writer.write(doc);
|
m_documentation = writer.write(doc);
|
||||||
|
Loading…
Reference in New Issue
Block a user