From 0cc271fae9101ac27dad3491020a3b599d533254 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Tue, 2 Dec 2014 11:03:34 +0100 Subject: [PATCH 1/3] Handle absence of Natspec doc and add option to solc --- main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main.cpp b/main.cpp index a7216e594..6ca130a79 100644 --- a/main.cpp +++ b/main.cpp @@ -136,6 +136,7 @@ int main(int argc, char** argv) cout << eth::disassemble(compiler.getBytecode()) << endl; cout << "Binary: " << toHex(compiler.getBytecode()) << endl; cout << "Interface specification: " << compiler.getInterface() << endl; + cout << "Natspec documentation: " << compiler.getDocumentation() << endl; return 0; } From d0758ccf1e07b162a894b5901c863a6bfa4a4636 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 3 Dec 2014 13:50:04 +0100 Subject: [PATCH 2/3] Separate user and dev natspec documentation - plus other small changes according to the spec --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 6ca130a79..29239a717 100644 --- a/main.cpp +++ b/main.cpp @@ -136,7 +136,7 @@ int main(int argc, char** argv) cout << eth::disassemble(compiler.getBytecode()) << endl; cout << "Binary: " << toHex(compiler.getBytecode()) << endl; cout << "Interface specification: " << compiler.getInterface() << endl; - cout << "Natspec documentation: " << compiler.getDocumentation() << endl; + cout << "Natspec user documentation: " << compiler.getUserDocumentation() << endl; return 0; } From 9ce5a4ebcfdea8751062aeae7dfa4de604c2c356 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 3 Dec 2014 16:40:37 +0100 Subject: [PATCH 3/3] Moving all Interface and Documentation functionality to own class - Creating the Interface Handler class which will take care of the parsing of Natspec comments and of interfacing with and outputing to JSON files. - Will also handle the ABI interface creation --- main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 29239a717..daeb2707c 100644 --- a/main.cpp +++ b/main.cpp @@ -135,8 +135,9 @@ int main(int argc, char** argv) cout << "Opcodes:" << endl; cout << eth::disassemble(compiler.getBytecode()) << endl; cout << "Binary: " << toHex(compiler.getBytecode()) << endl; - cout << "Interface specification: " << compiler.getInterface() << endl; - cout << "Natspec user documentation: " << compiler.getUserDocumentation() << endl; + cout << "Interface specification: " << compiler.getJsonDocumentation(ABI_INTERFACE) << endl; + cout << "Natspec user documentation: " << compiler.getJsonDocumentation(NATSPEC_USER) << endl; + cout << "Natspec developer documentation: " << compiler.getJsonDocumentation(NATSPEC_DEV) << endl; return 0; }