mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Restore `isConstructor
` in the legacy AST.
This commit is contained in:
parent
b6636e2570
commit
a434896458
@ -336,6 +336,8 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
|
|||||||
make_pair("implemented", _node.isImplemented()),
|
make_pair("implemented", _node.isImplemented()),
|
||||||
make_pair("scope", idOrNull(_node.scope()))
|
make_pair("scope", idOrNull(_node.scope()))
|
||||||
};
|
};
|
||||||
|
if (m_legacy)
|
||||||
|
attributes.emplace_back("isConstructor", _node.isConstructor());
|
||||||
setJsonNode(_node, "FunctionDefinition", std::move(attributes));
|
setJsonNode(_node, "FunctionDefinition", std::move(attributes));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : true,
|
||||||
"kind" : "constructor",
|
"kind" : "constructor",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -107,6 +107,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : "Some comment on fn.",
|
"documentation" : "Some comment on fn.",
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "fallback",
|
"kind" : "fallback",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "fallback",
|
"kind" : "fallback",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -82,6 +82,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -104,6 +104,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"name" : "F",
|
"name" : "F",
|
||||||
"scope" : 14,
|
"scope" : 14,
|
||||||
|
@ -104,6 +104,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"name" : "F",
|
"name" : "F",
|
||||||
"scope" : 14,
|
"scope" : 14,
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
{
|
{
|
||||||
"documentation" : null,
|
"documentation" : null,
|
||||||
"implemented" : true,
|
"implemented" : true,
|
||||||
|
"isConstructor" : false,
|
||||||
"kind" : "function",
|
"kind" : "function",
|
||||||
"modifiers" :
|
"modifiers" :
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user