aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.h
diff options
context:
space:
mode:
authordjuju <julfaber@gmail.com>2017-04-26 00:47:11 +0800
committerdjudjuu <julfaber@gmail.com>2017-05-17 17:14:33 +0800
commit2fa7646944451bdb804d842c0dacdbbba960f857 (patch)
tree2f7b4e116c09d843d5147de4e3844d8f516f8ac7 /libsolidity/ast/ASTJsonConverter.h
parent487eef18ccb5202461130e91a9b93981bcbf1a5d (diff)
downloaddexon-solidity-2fa7646944451bdb804d842c0dacdbbba960f857.tar.gz
dexon-solidity-2fa7646944451bdb804d842c0dacdbbba960f857.tar.zst
dexon-solidity-2fa7646944451bdb804d842c0dacdbbba960f857.zip
fixed styletypos, renaming and added helperfunction
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.h')
-rw-r--r--libsolidity/ast/ASTJsonConverter.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.h b/libsolidity/ast/ASTJsonConverter.h
index eee1086e..aab8c124 100644
--- a/libsolidity/ast/ASTJsonConverter.h
+++ b/libsolidity/ast/ASTJsonConverter.h
@@ -136,10 +136,21 @@ private:
{
return _node.id();
}
+ template<class Container>
+ Json::Value getContainerIds(Container container)
+ {
+ Json::Value tmp(Json::arrayValue);
+ for (auto it = container.begin(); it != container.end(); ++it)
+ {
+ solAssert(*it, "");
+ tmp.append(nodeId(**it));
+ }
+ return tmp;
+ }
Json::Value typePointerToJson(TypePointer _tp);
Json::Value typePointerToJson(std::shared_ptr<std::vector<TypePointer>> _tps);
void appendExpressionAttributes(
- std::vector<std::pair<std::string, Json::Value>> * _attributes,
+ std::vector<std::pair<std::string, Json::Value>> &_attributes,
ExpressionAnnotation const& _annotation
);
bool m_legacy = false; ///< if true, use legacy format