Restore `isConstructor` in the legacy AST.

This commit is contained in:
Daniel Kirchner 2018-08-07 21:49:14 +02:00
parent b6636e2570
commit a434896458
14 changed files with 15 additions and 0 deletions

View File

@ -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;
} }

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : true,
"kind" : "constructor", "kind" : "constructor",
"modifiers" : "modifiers" :
[ [

View File

@ -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" :
[ [

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "fallback", "kind" : "fallback",
"modifiers" : "modifiers" :
[ [

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "fallback", "kind" : "fallback",
"modifiers" : "modifiers" :
[ [

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "function", "kind" : "function",
"modifiers" : "modifiers" :
[ [

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "function", "kind" : "function",
"modifiers" : "modifiers" :
[ [

View File

@ -82,6 +82,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "function", "kind" : "function",
"modifiers" : "modifiers" :
[ [

View File

@ -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,

View File

@ -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,

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "function", "kind" : "function",
"modifiers" : "modifiers" :
[ [

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "function", "kind" : "function",
"modifiers" : "modifiers" :
[ [

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "function", "kind" : "function",
"modifiers" : "modifiers" :
[ [

View File

@ -40,6 +40,7 @@
{ {
"documentation" : null, "documentation" : null,
"implemented" : true, "implemented" : true,
"isConstructor" : false,
"kind" : "function", "kind" : "function",
"modifiers" : "modifiers" :
[ [