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("scope", idOrNull(_node.scope()))
};
if (m_legacy)
attributes.emplace_back("isConstructor", _node.isConstructor());
setJsonNode(_node, "FunctionDefinition", std::move(attributes));
return false;
}

View File

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

View File

@ -107,6 +107,7 @@
{
"documentation" : "Some comment on fn.",
"implemented" : true,
"isConstructor" : false,
"kind" : "function",
"modifiers" :
[

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -104,6 +104,7 @@
{
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
"kind" : "function",
"name" : "F",
"scope" : 14,

View File

@ -104,6 +104,7 @@
{
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
"kind" : "function",
"name" : "F",
"scope" : 14,

View File

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

View File

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

View File

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

View File

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