Provide types for VariableDeclaration.

This commit is contained in:
chriseth
2015-09-24 12:12:36 +02:00
parent 1736fe8015
commit e81f4ba45e
3 changed files with 15 additions and 1 deletions
+9 -1
View File
@@ -124,7 +124,10 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
bool ASTJsonConverter::visit(VariableDeclaration const& _node)
{
addJsonNode("VariableDeclaration", { make_pair("name", _node.name()) }, true);
addJsonNode("VariableDeclaration", {
make_pair("name", _node.name()),
make_pair("name", _node.name()),
}, true);
return true;
}
@@ -444,5 +447,10 @@ string ASTJsonConverter::type(Expression const& _expression)
return _expression.annotation().type ? _expression.annotation().type->toString() : "Unknown";
}
string ASTJsonConverter::type(VariableDeclaration const& _varDecl)
{
return _varDecl.annotation().type ? _varDecl.annotation().type->toString() : "Unknown";
}
}
}