aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-31 21:33:26 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-31 21:33:26 +0800
commit50b725c687c3968b0a495924700296ce6ce5bbec (patch)
treeffd2f3e900d657a0babffd8fa68e4d3d9e4157bb
parent72419816a88d6afcf8727cefe69e3a2fbe479f55 (diff)
downloaddexon-sol-tools-50b725c687c3968b0a495924700296ce6ce5bbec.tar
dexon-sol-tools-50b725c687c3968b0a495924700296ce6ce5bbec.tar.gz
dexon-sol-tools-50b725c687c3968b0a495924700296ce6ce5bbec.tar.bz2
dexon-sol-tools-50b725c687c3968b0a495924700296ce6ce5bbec.tar.lz
dexon-sol-tools-50b725c687c3968b0a495924700296ce6ce5bbec.tar.xz
dexon-sol-tools-50b725c687c3968b0a495924700296ce6ce5bbec.tar.zst
dexon-sol-tools-50b725c687c3968b0a495924700296ce6ce5bbec.zip
introduce named vars to clarify return statements
-rw-r--r--packages/sol-doc/src/solidity_doc_generator.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts
index 312124ca1..457c86c91 100644
--- a/packages/sol-doc/src/solidity_doc_generator.ts
+++ b/packages/sol-doc/src/solidity_doc_generator.ts
@@ -124,7 +124,7 @@ function _genConstructorDoc(abiDefinition: ConstructorAbi, devdocIfExists: Devdo
// from that object extract the "details" (comment) property
comment = 'something from devdoc';
- return {
+ const constructorDoc: SolidityMethod = {
isConstructor: true,
name: '', // sad we have to specify this
callPath: '', // TODO: wtf is this?
@@ -134,6 +134,8 @@ function _genConstructorDoc(abiDefinition: ConstructorAbi, devdocIfExists: Devdo
isPayable: abiDefinition.payable,
comment,
};
+
+ return constructorDoc;
}
function _genMethodDoc(
@@ -160,7 +162,7 @@ function _genMethodDoc(
const isConstant = abiDefinition.type === 'fallback' ? true : abiDefinition.constant;
// TODO: determine whether fallback functions are always constant, as coded just above
- return {
+ const methodDoc: SolidityMethod = {
isConstructor: false,
name,
callPath: '', // TODO: wtf is this?
@@ -170,6 +172,7 @@ function _genMethodDoc(
isPayable: abiDefinition.payable,
comment,
};
+ return methodDoc;
}
function _genEventDoc(abiDefinition: EventAbi): Event {