From 395ab9a872bd8fafc0da7ec166176715ce18eae9 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 7 Aug 2018 15:49:05 +0200 Subject: Replace ``isConstructor`` field in the JSON AST by a ``kind`` field. --- test/libsolidity/ASTJSON/documentation.json | 2 +- test/libsolidity/ASTJSON/documentation_legacy.json | 2 +- test/libsolidity/ASTJSON/function_type.json | 2 +- test/libsolidity/ASTJSON/function_type_legacy.json | 2 +- test/libsolidity/ASTJSON/long_type_name_binary_operation.json | 2 +- test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json | 2 +- test/libsolidity/ASTJSON/long_type_name_identifier.json | 2 +- test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json | 2 +- test/libsolidity/ASTJSON/modifier_definition.json | 2 +- test/libsolidity/ASTJSON/modifier_definition_legacy.json | 2 +- test/libsolidity/ASTJSON/modifier_invocation.json | 2 +- test/libsolidity/ASTJSON/modifier_invocation_legacy.json | 2 +- test/libsolidity/ASTJSON/non_utf8.json | 2 +- test/libsolidity/ASTJSON/non_utf8_legacy.json | 2 +- test/libsolidity/ASTJSON/short_type_name.json | 2 +- test/libsolidity/ASTJSON/short_type_name_legacy.json | 2 +- test/libsolidity/ASTJSON/short_type_name_ref.json | 2 +- test/libsolidity/ASTJSON/short_type_name_ref_legacy.json | 2 +- test/libsolidity/ASTJSON/source_location.json | 2 +- test/libsolidity/ASTJSON/source_location_legacy.json | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) (limited to 'test/libsolidity') diff --git a/test/libsolidity/ASTJSON/documentation.json b/test/libsolidity/ASTJSON/documentation.json index 403d4e72..ce1e0b57 100644 --- a/test/libsolidity/ASTJSON/documentation.json +++ b/test/libsolidity/ASTJSON/documentation.json @@ -147,7 +147,7 @@ "documentation" : "Some comment on fn.", "id" : 14, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "fn", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/documentation_legacy.json b/test/libsolidity/ASTJSON/documentation_legacy.json index 5a890e50..7c9e7e20 100644 --- a/test/libsolidity/ASTJSON/documentation_legacy.json +++ b/test/libsolidity/ASTJSON/documentation_legacy.json @@ -107,7 +107,7 @@ { "documentation" : "Some comment on fn.", "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null diff --git a/test/libsolidity/ASTJSON/function_type.json b/test/libsolidity/ASTJSON/function_type.json index 5dbc5b80..b78d8446 100644 --- a/test/libsolidity/ASTJSON/function_type.json +++ b/test/libsolidity/ASTJSON/function_type.json @@ -37,7 +37,7 @@ "documentation" : null, "id" : 16, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "f", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/function_type_legacy.json b/test/libsolidity/ASTJSON/function_type_legacy.json index af0c42dd..6c49a92f 100644 --- a/test/libsolidity/ASTJSON/function_type_legacy.json +++ b/test/libsolidity/ASTJSON/function_type_legacy.json @@ -40,7 +40,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json index fe3e73d2..c6d40af2 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json @@ -142,7 +142,7 @@ "documentation" : null, "id" : 10, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "f", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json index d78d01ff..f6c32855 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json @@ -40,7 +40,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier.json b/test/libsolidity/ASTJSON/long_type_name_identifier.json index 0579967c..505d260c 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier.json @@ -148,7 +148,7 @@ "documentation" : null, "id" : 13, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "f", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json index a96ccef3..96363141 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json @@ -82,7 +82,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null diff --git a/test/libsolidity/ASTJSON/modifier_definition.json b/test/libsolidity/ASTJSON/modifier_definition.json index 95554f03..66359453 100644 --- a/test/libsolidity/ASTJSON/modifier_definition.json +++ b/test/libsolidity/ASTJSON/modifier_definition.json @@ -97,7 +97,7 @@ "documentation" : null, "id" : 13, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ { diff --git a/test/libsolidity/ASTJSON/modifier_definition_legacy.json b/test/libsolidity/ASTJSON/modifier_definition_legacy.json index e1e797ba..1b384fe2 100644 --- a/test/libsolidity/ASTJSON/modifier_definition_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_definition_legacy.json @@ -104,7 +104,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "name" : "F", "scope" : 14, "stateMutability" : "nonpayable", diff --git a/test/libsolidity/ASTJSON/modifier_invocation.json b/test/libsolidity/ASTJSON/modifier_invocation.json index 95554f03..66359453 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation.json +++ b/test/libsolidity/ASTJSON/modifier_invocation.json @@ -97,7 +97,7 @@ "documentation" : null, "id" : 13, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ { diff --git a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json index e1e797ba..1b384fe2 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json @@ -104,7 +104,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "name" : "F", "scope" : 14, "stateMutability" : "nonpayable", diff --git a/test/libsolidity/ASTJSON/non_utf8.json b/test/libsolidity/ASTJSON/non_utf8.json index 307259e9..1852bd38 100644 --- a/test/libsolidity/ASTJSON/non_utf8.json +++ b/test/libsolidity/ASTJSON/non_utf8.json @@ -89,7 +89,7 @@ "documentation" : null, "id" : 7, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "f", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/non_utf8_legacy.json b/test/libsolidity/ASTJSON/non_utf8_legacy.json index b1f847f7..c20057e7 100644 --- a/test/libsolidity/ASTJSON/non_utf8_legacy.json +++ b/test/libsolidity/ASTJSON/non_utf8_legacy.json @@ -40,7 +40,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null diff --git a/test/libsolidity/ASTJSON/short_type_name.json b/test/libsolidity/ASTJSON/short_type_name.json index 502c1e31..acb46157 100644 --- a/test/libsolidity/ASTJSON/short_type_name.json +++ b/test/libsolidity/ASTJSON/short_type_name.json @@ -93,7 +93,7 @@ "documentation" : null, "id" : 9, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "f", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/short_type_name_legacy.json b/test/libsolidity/ASTJSON/short_type_name_legacy.json index 761bcd3b..87b078b9 100644 --- a/test/libsolidity/ASTJSON/short_type_name_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_legacy.json @@ -40,7 +40,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null diff --git a/test/libsolidity/ASTJSON/short_type_name_ref.json b/test/libsolidity/ASTJSON/short_type_name_ref.json index b0c3ad97..b6b7bca5 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref.json @@ -105,7 +105,7 @@ "documentation" : null, "id" : 10, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "f", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json index d426a384..406dc8d8 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json @@ -40,7 +40,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null diff --git a/test/libsolidity/ASTJSON/source_location.json b/test/libsolidity/ASTJSON/source_location.json index 8d8acb0f..f0ed216d 100644 --- a/test/libsolidity/ASTJSON/source_location.json +++ b/test/libsolidity/ASTJSON/source_location.json @@ -127,7 +127,7 @@ "documentation" : null, "id" : 10, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [], "name" : "f", "nodeType" : "FunctionDefinition", diff --git a/test/libsolidity/ASTJSON/source_location_legacy.json b/test/libsolidity/ASTJSON/source_location_legacy.json index 327cd6da..ee4e9841 100644 --- a/test/libsolidity/ASTJSON/source_location_legacy.json +++ b/test/libsolidity/ASTJSON/source_location_legacy.json @@ -40,7 +40,7 @@ { "documentation" : null, "implemented" : true, - "isConstructor" : false, + "kind" : "function", "modifiers" : [ null -- cgit From b6636e2570a14b33fbf53c3f59cca1a9dfb7f824 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 7 Aug 2018 15:49:23 +0200 Subject: Add new test cases. --- test/libsolidity/ASTJSON/constructor.json | 70 +++++++++++++ test/libsolidity/ASTJSON/constructor.sol | 4 + test/libsolidity/ASTJSON/constructor_legacy.json | 109 +++++++++++++++++++++ test/libsolidity/ASTJSON/fallback.json | 70 +++++++++++++ test/libsolidity/ASTJSON/fallback.sol | 4 + test/libsolidity/ASTJSON/fallback_legacy.json | 109 +++++++++++++++++++++ test/libsolidity/ASTJSON/fallback_payable.json | 70 +++++++++++++ test/libsolidity/ASTJSON/fallback_payable.sol | 3 + .../ASTJSON/fallback_payable_legacy.json | 109 +++++++++++++++++++++ 9 files changed, 548 insertions(+) create mode 100644 test/libsolidity/ASTJSON/constructor.json create mode 100644 test/libsolidity/ASTJSON/constructor.sol create mode 100644 test/libsolidity/ASTJSON/constructor_legacy.json create mode 100644 test/libsolidity/ASTJSON/fallback.json create mode 100644 test/libsolidity/ASTJSON/fallback.sol create mode 100644 test/libsolidity/ASTJSON/fallback_legacy.json create mode 100644 test/libsolidity/ASTJSON/fallback_payable.json create mode 100644 test/libsolidity/ASTJSON/fallback_payable.sol create mode 100644 test/libsolidity/ASTJSON/fallback_payable_legacy.json (limited to 'test/libsolidity') diff --git a/test/libsolidity/ASTJSON/constructor.json b/test/libsolidity/ASTJSON/constructor.json new file mode 100644 index 00000000..b0bc4201 --- /dev/null +++ b/test/libsolidity/ASTJSON/constructor.json @@ -0,0 +1,70 @@ +{ + "absolutePath" : "a", + "exportedSymbols" : + { + "C" : + [ + 5 + ] + }, + "id" : 6, + "nodeType" : "SourceUnit", + "nodes" : + [ + { + "baseContracts" : [], + "contractDependencies" : [], + "contractKind" : "contract", + "documentation" : null, + "fullyImplemented" : true, + "id" : 5, + "linearizedBaseContracts" : + [ + 5 + ], + "name" : "C", + "nodeType" : "ContractDefinition", + "nodes" : + [ + { + "body" : + { + "id" : 3, + "nodeType" : "Block", + "src" : "35:4:1", + "statements" : [] + }, + "documentation" : null, + "id" : 4, + "implemented" : true, + "kind" : "constructor", + "modifiers" : [], + "name" : "", + "nodeType" : "FunctionDefinition", + "parameters" : + { + "id" : 1, + "nodeType" : "ParameterList", + "parameters" : [], + "src" : "25:2:1" + }, + "returnParameters" : + { + "id" : 2, + "nodeType" : "ParameterList", + "parameters" : [], + "src" : "35:0:1" + }, + "scope" : 5, + "src" : "14:25:1", + "stateMutability" : "nonpayable", + "superFunction" : null, + "visibility" : "public" + } + ], + "scope" : 6, + "src" : "0:41:1" + } + ], + "src" : "0:42:1" +} diff --git a/test/libsolidity/ASTJSON/constructor.sol b/test/libsolidity/ASTJSON/constructor.sol new file mode 100644 index 00000000..79d04eb5 --- /dev/null +++ b/test/libsolidity/ASTJSON/constructor.sol @@ -0,0 +1,4 @@ +contract C { + constructor() public { + } +} diff --git a/test/libsolidity/ASTJSON/constructor_legacy.json b/test/libsolidity/ASTJSON/constructor_legacy.json new file mode 100644 index 00000000..73a58acf --- /dev/null +++ b/test/libsolidity/ASTJSON/constructor_legacy.json @@ -0,0 +1,109 @@ +{ + "attributes" : + { + "absolutePath" : "a", + "exportedSymbols" : + { + "C" : + [ + 5 + ] + } + }, + "children" : + [ + { + "attributes" : + { + "baseContracts" : + [ + null + ], + "contractDependencies" : + [ + null + ], + "contractKind" : "contract", + "documentation" : null, + "fullyImplemented" : true, + "linearizedBaseContracts" : + [ + 5 + ], + "name" : "C", + "scope" : 6 + }, + "children" : + [ + { + "attributes" : + { + "documentation" : null, + "implemented" : true, + "kind" : "constructor", + "modifiers" : + [ + null + ], + "name" : "", + "scope" : 5, + "stateMutability" : "nonpayable", + "superFunction" : null, + "visibility" : "public" + }, + "children" : + [ + { + "attributes" : + { + "parameters" : + [ + null + ] + }, + "children" : [], + "id" : 1, + "name" : "ParameterList", + "src" : "25:2:1" + }, + { + "attributes" : + { + "parameters" : + [ + null + ] + }, + "children" : [], + "id" : 2, + "name" : "ParameterList", + "src" : "35:0:1" + }, + { + "attributes" : + { + "statements" : + [ + null + ] + }, + "children" : [], + "id" : 3, + "name" : "Block", + "src" : "35:4:1" + } + ], + "id" : 4, + "name" : "FunctionDefinition", + "src" : "14:25:1" + } + ], + "id" : 5, + "name" : "ContractDefinition", + "src" : "0:41:1" + } + ], + "id" : 6, + "name" : "SourceUnit", + "src" : "0:42:1" +} diff --git a/test/libsolidity/ASTJSON/fallback.json b/test/libsolidity/ASTJSON/fallback.json new file mode 100644 index 00000000..a9c85b2f --- /dev/null +++ b/test/libsolidity/ASTJSON/fallback.json @@ -0,0 +1,70 @@ +{ + "absolutePath" : "a", + "exportedSymbols" : + { + "C" : + [ + 5 + ] + }, + "id" : 6, + "nodeType" : "SourceUnit", + "nodes" : + [ + { + "baseContracts" : [], + "contractDependencies" : [], + "contractKind" : "contract", + "documentation" : null, + "fullyImplemented" : true, + "id" : 5, + "linearizedBaseContracts" : + [ + 5 + ], + "name" : "C", + "nodeType" : "ContractDefinition", + "nodes" : + [ + { + "body" : + { + "id" : 3, + "nodeType" : "Block", + "src" : "43:5:1", + "statements" : [] + }, + "documentation" : null, + "id" : 4, + "implemented" : true, + "kind" : "fallback", + "modifiers" : [], + "name" : "", + "nodeType" : "FunctionDefinition", + "parameters" : + { + "id" : 1, + "nodeType" : "ParameterList", + "parameters" : [], + "src" : "23:2:1" + }, + "returnParameters" : + { + "id" : 2, + "nodeType" : "ParameterList", + "parameters" : [], + "src" : "43:0:1" + }, + "scope" : 5, + "src" : "15:33:1", + "stateMutability" : "payable", + "superFunction" : null, + "visibility" : "external" + } + ], + "scope" : 6, + "src" : "0:50:1" + } + ], + "src" : "0:51:1" +} diff --git a/test/libsolidity/ASTJSON/fallback.sol b/test/libsolidity/ASTJSON/fallback.sol new file mode 100644 index 00000000..4e318892 --- /dev/null +++ b/test/libsolidity/ASTJSON/fallback.sol @@ -0,0 +1,4 @@ +contract C { + function() external payable { + } +} diff --git a/test/libsolidity/ASTJSON/fallback_legacy.json b/test/libsolidity/ASTJSON/fallback_legacy.json new file mode 100644 index 00000000..2fbd0d98 --- /dev/null +++ b/test/libsolidity/ASTJSON/fallback_legacy.json @@ -0,0 +1,109 @@ +{ + "attributes" : + { + "absolutePath" : "a", + "exportedSymbols" : + { + "C" : + [ + 5 + ] + } + }, + "children" : + [ + { + "attributes" : + { + "baseContracts" : + [ + null + ], + "contractDependencies" : + [ + null + ], + "contractKind" : "contract", + "documentation" : null, + "fullyImplemented" : true, + "linearizedBaseContracts" : + [ + 5 + ], + "name" : "C", + "scope" : 6 + }, + "children" : + [ + { + "attributes" : + { + "documentation" : null, + "implemented" : true, + "kind" : "fallback", + "modifiers" : + [ + null + ], + "name" : "", + "scope" : 5, + "stateMutability" : "payable", + "superFunction" : null, + "visibility" : "external" + }, + "children" : + [ + { + "attributes" : + { + "parameters" : + [ + null + ] + }, + "children" : [], + "id" : 1, + "name" : "ParameterList", + "src" : "23:2:1" + }, + { + "attributes" : + { + "parameters" : + [ + null + ] + }, + "children" : [], + "id" : 2, + "name" : "ParameterList", + "src" : "43:0:1" + }, + { + "attributes" : + { + "statements" : + [ + null + ] + }, + "children" : [], + "id" : 3, + "name" : "Block", + "src" : "43:5:1" + } + ], + "id" : 4, + "name" : "FunctionDefinition", + "src" : "15:33:1" + } + ], + "id" : 5, + "name" : "ContractDefinition", + "src" : "0:50:1" + } + ], + "id" : 6, + "name" : "SourceUnit", + "src" : "0:51:1" +} diff --git a/test/libsolidity/ASTJSON/fallback_payable.json b/test/libsolidity/ASTJSON/fallback_payable.json new file mode 100644 index 00000000..9d56f74b --- /dev/null +++ b/test/libsolidity/ASTJSON/fallback_payable.json @@ -0,0 +1,70 @@ +{ + "absolutePath" : "a", + "exportedSymbols" : + { + "C" : + [ + 5 + ] + }, + "id" : 6, + "nodeType" : "SourceUnit", + "nodes" : + [ + { + "baseContracts" : [], + "contractDependencies" : [], + "contractKind" : "contract", + "documentation" : null, + "fullyImplemented" : true, + "id" : 5, + "linearizedBaseContracts" : + [ + 5 + ], + "name" : "C", + "nodeType" : "ContractDefinition", + "nodes" : + [ + { + "body" : + { + "id" : 3, + "nodeType" : "Block", + "src" : "34:2:1", + "statements" : [] + }, + "documentation" : null, + "id" : 4, + "implemented" : true, + "kind" : "fallback", + "modifiers" : [], + "name" : "", + "nodeType" : "FunctionDefinition", + "parameters" : + { + "id" : 1, + "nodeType" : "ParameterList", + "parameters" : [], + "src" : "22:2:1" + }, + "returnParameters" : + { + "id" : 2, + "nodeType" : "ParameterList", + "parameters" : [], + "src" : "34:0:1" + }, + "scope" : 5, + "src" : "14:22:1", + "stateMutability" : "nonpayable", + "superFunction" : null, + "visibility" : "external" + } + ], + "scope" : 6, + "src" : "0:38:1" + } + ], + "src" : "0:39:1" +} diff --git a/test/libsolidity/ASTJSON/fallback_payable.sol b/test/libsolidity/ASTJSON/fallback_payable.sol new file mode 100644 index 00000000..21db99ec --- /dev/null +++ b/test/libsolidity/ASTJSON/fallback_payable.sol @@ -0,0 +1,3 @@ +contract C { + function() external {} +} diff --git a/test/libsolidity/ASTJSON/fallback_payable_legacy.json b/test/libsolidity/ASTJSON/fallback_payable_legacy.json new file mode 100644 index 00000000..5f041961 --- /dev/null +++ b/test/libsolidity/ASTJSON/fallback_payable_legacy.json @@ -0,0 +1,109 @@ +{ + "attributes" : + { + "absolutePath" : "a", + "exportedSymbols" : + { + "C" : + [ + 5 + ] + } + }, + "children" : + [ + { + "attributes" : + { + "baseContracts" : + [ + null + ], + "contractDependencies" : + [ + null + ], + "contractKind" : "contract", + "documentation" : null, + "fullyImplemented" : true, + "linearizedBaseContracts" : + [ + 5 + ], + "name" : "C", + "scope" : 6 + }, + "children" : + [ + { + "attributes" : + { + "documentation" : null, + "implemented" : true, + "kind" : "fallback", + "modifiers" : + [ + null + ], + "name" : "", + "scope" : 5, + "stateMutability" : "nonpayable", + "superFunction" : null, + "visibility" : "external" + }, + "children" : + [ + { + "attributes" : + { + "parameters" : + [ + null + ] + }, + "children" : [], + "id" : 1, + "name" : "ParameterList", + "src" : "22:2:1" + }, + { + "attributes" : + { + "parameters" : + [ + null + ] + }, + "children" : [], + "id" : 2, + "name" : "ParameterList", + "src" : "34:0:1" + }, + { + "attributes" : + { + "statements" : + [ + null + ] + }, + "children" : [], + "id" : 3, + "name" : "Block", + "src" : "34:2:1" + } + ], + "id" : 4, + "name" : "FunctionDefinition", + "src" : "14:22:1" + } + ], + "id" : 5, + "name" : "ContractDefinition", + "src" : "0:38:1" + } + ], + "id" : 6, + "name" : "SourceUnit", + "src" : "0:39:1" +} -- cgit From a434896458656249113c7e269d8fde64b3df5d69 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 7 Aug 2018 21:49:14 +0200 Subject: Restore ``isConstructor`` in the legacy AST. --- test/libsolidity/ASTJSON/constructor_legacy.json | 1 + test/libsolidity/ASTJSON/documentation_legacy.json | 1 + test/libsolidity/ASTJSON/fallback_legacy.json | 1 + test/libsolidity/ASTJSON/fallback_payable_legacy.json | 1 + test/libsolidity/ASTJSON/function_type_legacy.json | 1 + test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json | 1 + test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json | 1 + test/libsolidity/ASTJSON/modifier_definition_legacy.json | 1 + test/libsolidity/ASTJSON/modifier_invocation_legacy.json | 1 + test/libsolidity/ASTJSON/non_utf8_legacy.json | 1 + test/libsolidity/ASTJSON/short_type_name_legacy.json | 1 + test/libsolidity/ASTJSON/short_type_name_ref_legacy.json | 1 + test/libsolidity/ASTJSON/source_location_legacy.json | 1 + 13 files changed, 13 insertions(+) (limited to 'test/libsolidity') diff --git a/test/libsolidity/ASTJSON/constructor_legacy.json b/test/libsolidity/ASTJSON/constructor_legacy.json index 73a58acf..0617073e 100644 --- a/test/libsolidity/ASTJSON/constructor_legacy.json +++ b/test/libsolidity/ASTJSON/constructor_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : true, "kind" : "constructor", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/documentation_legacy.json b/test/libsolidity/ASTJSON/documentation_legacy.json index 7c9e7e20..0277902f 100644 --- a/test/libsolidity/ASTJSON/documentation_legacy.json +++ b/test/libsolidity/ASTJSON/documentation_legacy.json @@ -107,6 +107,7 @@ { "documentation" : "Some comment on fn.", "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/fallback_legacy.json b/test/libsolidity/ASTJSON/fallback_legacy.json index 2fbd0d98..0aca3128 100644 --- a/test/libsolidity/ASTJSON/fallback_legacy.json +++ b/test/libsolidity/ASTJSON/fallback_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "fallback", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/fallback_payable_legacy.json b/test/libsolidity/ASTJSON/fallback_payable_legacy.json index 5f041961..7320f574 100644 --- a/test/libsolidity/ASTJSON/fallback_payable_legacy.json +++ b/test/libsolidity/ASTJSON/fallback_payable_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "fallback", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/function_type_legacy.json b/test/libsolidity/ASTJSON/function_type_legacy.json index 6c49a92f..72ceec81 100644 --- a/test/libsolidity/ASTJSON/function_type_legacy.json +++ b/test/libsolidity/ASTJSON/function_type_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json index f6c32855..b5333286 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json index 96363141..d3bcda56 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json @@ -82,6 +82,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/modifier_definition_legacy.json b/test/libsolidity/ASTJSON/modifier_definition_legacy.json index 1b384fe2..5186912c 100644 --- a/test/libsolidity/ASTJSON/modifier_definition_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_definition_legacy.json @@ -104,6 +104,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "name" : "F", "scope" : 14, diff --git a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json index 1b384fe2..5186912c 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json @@ -104,6 +104,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "name" : "F", "scope" : 14, diff --git a/test/libsolidity/ASTJSON/non_utf8_legacy.json b/test/libsolidity/ASTJSON/non_utf8_legacy.json index c20057e7..df105096 100644 --- a/test/libsolidity/ASTJSON/non_utf8_legacy.json +++ b/test/libsolidity/ASTJSON/non_utf8_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/short_type_name_legacy.json b/test/libsolidity/ASTJSON/short_type_name_legacy.json index 87b078b9..1f9b1968 100644 --- a/test/libsolidity/ASTJSON/short_type_name_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json index 406dc8d8..420b0f60 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ diff --git a/test/libsolidity/ASTJSON/source_location_legacy.json b/test/libsolidity/ASTJSON/source_location_legacy.json index ee4e9841..a65979d6 100644 --- a/test/libsolidity/ASTJSON/source_location_legacy.json +++ b/test/libsolidity/ASTJSON/source_location_legacy.json @@ -40,6 +40,7 @@ { "documentation" : null, "implemented" : true, + "isConstructor" : false, "kind" : "function", "modifiers" : [ -- cgit