Merge pull request #10363 from ethereum/drop-legacy-ast

[BREAKING] Remove the legacy AST JSON output
This commit is contained in:
chriseth 2020-11-25 13:37:44 +01:00 committed by GitHub
commit af72791dd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 203 additions and 6524 deletions

View File

@ -4,7 +4,9 @@ Breaking Changes:
* Assembler: The artificial ASSIGNIMMUTABLE opcode and the corresponding builtin in the "EVM with object access" dialect of Yul take the base offset of the code to modify as additional argument. * Assembler: The artificial ASSIGNIMMUTABLE opcode and the corresponding builtin in the "EVM with object access" dialect of Yul take the base offset of the code to modify as additional argument.
* Code Generator: All arithmetic is checked by default. These checks can be disabled using ``unchecked { ... }``. * Code Generator: All arithmetic is checked by default. These checks can be disabled using ``unchecked { ... }``.
* Code Generator: Cause a panic if a byte array in storage is accessed whose length is encoded incorrectly. * Code Generator: Cause a panic if a byte array in storage is accessed whose length is encoded incorrectly.
* Command Line Interface: Remove the legacy ``--ast-json`` option. Only the ``--ast-compact-json`` option is supported now.
* General: Remove global functions ``log0``, ``log1``, ``log2``, ``log3`` and ``log4``. * General: Remove global functions ``log0``, ``log1``, ``log2``, ``log3`` and ``log4``.
* Standard JSON: Remove the ``legacyAST`` option.
* Type Checker: Function call options can only be given once. * Type Checker: Function call options can only be given once.
* Type System: Unary negation can only be used on signed integers, not on unsigned integers. * Type System: Unary negation can only be used on signed integers, not on unsigned integers.
* Type System: Disallow explicit conversions from negative literals and literals larger than ``type(uint160).max`` to ``address`` type. * Type System: Disallow explicit conversions from negative literals and literals larger than ``type(uint160).max`` to ``address`` type.

View File

@ -327,7 +327,6 @@ Input Description
// //
// File level (needs empty string as contract name): // File level (needs empty string as contract name):
// ast - AST of all source files // ast - AST of all source files
// legacyAST - legacy AST of all source files
// //
// Contract level (needs the contract name or "*"): // Contract level (needs the contract name or "*"):
// abi - ABI // abi - ABI
@ -430,8 +429,6 @@ Output Description
"id": 1, "id": 1,
// The AST object // The AST object
"ast": {}, "ast": {},
// The legacy AST object
"legacyAST": {}
} }
}, },
// This contains the contract-level outputs. // This contains the contract-level outputs.

View File

@ -70,8 +70,7 @@ void addIfSet(std::vector<pair<string, Json::Value>>& _attributes, string const&
namespace solidity::frontend namespace solidity::frontend
{ {
ASTJsonConverter::ASTJsonConverter(bool _legacy, CompilerStack::State _stackState, map<string, unsigned> _sourceIndices): ASTJsonConverter::ASTJsonConverter(CompilerStack::State _stackState, map<string, unsigned> _sourceIndices):
m_legacy(_legacy),
m_stackState(_stackState), m_stackState(_stackState),
m_sourceIndices(std::move(_sourceIndices)) m_sourceIndices(std::move(_sourceIndices))
{ {
@ -100,60 +99,9 @@ void ASTJsonConverter::setJsonNode(
m_currentValue = Json::objectValue; m_currentValue = Json::objectValue;
m_currentValue["id"] = nodeId(_node); m_currentValue["id"] = nodeId(_node);
m_currentValue["src"] = sourceLocationToString(_node.location()); m_currentValue["src"] = sourceLocationToString(_node.location());
if (!m_legacy) m_currentValue["nodeType"] = _nodeType;
{ for (auto& e: _attributes)
m_currentValue["nodeType"] = _nodeType; m_currentValue[e.first] = std::move(e.second);
for (auto& e: _attributes)
m_currentValue[e.first] = std::move(e.second);
}
else
{
m_currentValue["name"] = _nodeType;
Json::Value attrs(Json::objectValue);
if (
//these nodeTypes need to have a children-node even if it is empty
(_nodeType == "VariableDeclaration") ||
(_nodeType == "ParameterList") ||
(_nodeType == "Block") ||
(_nodeType == "InlineAssembly") ||
(_nodeType == "Throw")
)
m_currentValue["children"] = Json::arrayValue;
for (auto& e: _attributes)
{
if ((!e.second.isNull()) && (
(e.second.isObject() && e.second.isMember("name")) ||
(e.second.isArray() && e.second[0].isObject() && e.second[0].isMember("name")) ||
(e.first == "declarations") // (in the case (_,x)= ... there's a nullpointer at [0]
))
{
if (e.second.isObject())
{
if (!m_currentValue["children"].isArray())
m_currentValue["children"] = Json::arrayValue;
appendMove(m_currentValue["children"], std::move(e.second));
}
if (e.second.isArray())
for (auto& child: e.second)
if (!child.isNull())
{
if (!m_currentValue["children"].isArray())
m_currentValue["children"] = Json::arrayValue;
appendMove(m_currentValue["children"], std::move(child));
}
}
else
{
if (e.first == "typeDescriptions")
attrs["type"] = Json::Value(e.second["typeString"]);
else
attrs[e.first] = std::move(e.second);
}
}
if (!attrs.empty())
m_currentValue["attributes"] = std::move(attrs);
}
} }
size_t ASTJsonConverter::sourceIndexFromLocation(SourceLocation const& _location) const size_t ASTJsonConverter::sourceIndexFromLocation(SourceLocation const& _location) const
@ -285,7 +233,7 @@ bool ASTJsonConverter::visit(ImportDirective const& _node)
{ {
std::vector<pair<string, Json::Value>> attributes = { std::vector<pair<string, Json::Value>> attributes = {
make_pair("file", _node.path()), make_pair("file", _node.path()),
make_pair(m_legacy ? "SourceUnit" : "sourceUnit", idOrNull(_node.annotation().sourceUnit)), make_pair("sourceUnit", idOrNull(_node.annotation().sourceUnit)),
make_pair("scope", idOrNull(_node.scope())) make_pair("scope", idOrNull(_node.scope()))
}; };
@ -442,8 +390,6 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
attributes.emplace_back("functionSelector", _node.externalIdentifierHex()); attributes.emplace_back("functionSelector", _node.externalIdentifierHex());
if (!_node.annotation().baseFunctions.empty()) if (!_node.annotation().baseFunctions.empty())
attributes.emplace_back(make_pair("baseFunctions", getContainerIds(_node.annotation().baseFunctions, true))); attributes.emplace_back(make_pair("baseFunctions", getContainerIds(_node.annotation().baseFunctions, true)));
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;
} }
@ -586,9 +532,7 @@ bool ASTJsonConverter::visit(InlineAssembly const& _node)
externalReferencesJson.append(std::move(it.second)); externalReferencesJson.append(std::move(it.second));
setJsonNode(_node, "InlineAssembly", { setJsonNode(_node, "InlineAssembly", {
m_legacy ? make_pair("AST", Json::Value(yul::AsmJsonConverter(sourceIndexFromLocation(_node.location()))(_node.operations()))),
make_pair("operations", Json::Value(yul::AsmPrinter()(_node.operations()))) :
make_pair("AST", Json::Value(yul::AsmJsonConverter(sourceIndexFromLocation(_node.location()))(_node.operations()))),
make_pair("externalReferences", std::move(externalReferencesJson)), make_pair("externalReferences", std::move(externalReferencesJson)),
make_pair("evmVersion", dynamic_cast<solidity::yul::EVMDialect const&>(_node.dialect()).evmVersion().name()) make_pair("evmVersion", dynamic_cast<solidity::yul::EVMDialect const&>(_node.dialect()).evmVersion().name())
}); });
@ -794,14 +738,7 @@ bool ASTJsonConverter::visit(FunctionCall const& _node)
if (_node.annotation().kind.set()) if (_node.annotation().kind.set())
{ {
FunctionCallKind nodeKind = *_node.annotation().kind; FunctionCallKind nodeKind = *_node.annotation().kind;
attributes.emplace_back("kind", functionCallKind(nodeKind));
if (m_legacy)
{
attributes.emplace_back("isStructConstructorCall", nodeKind == FunctionCallKind::StructConstructorCall);
attributes.emplace_back("type_conversion", nodeKind == FunctionCallKind::TypeConversion);
}
else
attributes.emplace_back("kind", functionCallKind(nodeKind));
} }
appendExpressionAttributes(attributes, _node.annotation()); appendExpressionAttributes(attributes, _node.annotation());
@ -839,7 +776,7 @@ bool ASTJsonConverter::visit(NewExpression const& _node)
bool ASTJsonConverter::visit(MemberAccess const& _node) bool ASTJsonConverter::visit(MemberAccess const& _node)
{ {
std::vector<pair<string, Json::Value>> attributes = { std::vector<pair<string, Json::Value>> attributes = {
make_pair(m_legacy ? "member_name" : "memberName", _node.memberName()), make_pair("memberName", _node.memberName()),
make_pair("expression", toJson(_node.expression())), make_pair("expression", toJson(_node.expression())),
make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration)), make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration)),
}; };
@ -877,7 +814,7 @@ bool ASTJsonConverter::visit(Identifier const& _node)
for (auto const& dec: _node.annotation().overloadedDeclarations) for (auto const& dec: _node.annotation().overloadedDeclarations)
overloads.append(nodeId(*dec)); overloads.append(nodeId(*dec));
setJsonNode(_node, "Identifier", { setJsonNode(_node, "Identifier", {
make_pair(m_legacy ? "value" : "name", _node.name()), make_pair("name", _node.name()),
make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration)), make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration)),
make_pair("overloadedDeclarations", overloads), make_pair("overloadedDeclarations", overloads),
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type)), make_pair("typeDescriptions", typePointerToJson(_node.annotation().type)),
@ -889,7 +826,7 @@ bool ASTJsonConverter::visit(Identifier const& _node)
bool ASTJsonConverter::visit(ElementaryTypeNameExpression const& _node) bool ASTJsonConverter::visit(ElementaryTypeNameExpression const& _node)
{ {
std::vector<pair<string, Json::Value>> attributes = { std::vector<pair<string, Json::Value>> attributes = {
make_pair(m_legacy ? "value" : "typeName", toJson(_node.type())) make_pair("typeName", toJson(_node.type()))
}; };
appendExpressionAttributes(attributes, _node.annotation()); appendExpressionAttributes(attributes, _node.annotation());
setJsonNode(_node, "ElementaryTypeNameExpression", std::move(attributes)); setJsonNode(_node, "ElementaryTypeNameExpression", std::move(attributes));
@ -903,9 +840,9 @@ bool ASTJsonConverter::visit(Literal const& _node)
value = Json::nullValue; value = Json::nullValue;
Token subdenomination = Token(_node.subDenomination()); Token subdenomination = Token(_node.subDenomination());
std::vector<pair<string, Json::Value>> attributes = { std::vector<pair<string, Json::Value>> attributes = {
make_pair(m_legacy ? "token" : "kind", literalTokenKind(_node.token())), make_pair("kind", literalTokenKind(_node.token())),
make_pair("value", value), make_pair("value", value),
make_pair(m_legacy ? "hexvalue" : "hexValue", util::toHex(util::asBytes(_node.value()))), make_pair("hexValue", util::toHex(util::asBytes(_node.value()))),
make_pair( make_pair(
"subdenomination", "subdenomination",
subdenomination == Token::Illegal ? subdenomination == Token::Illegal ?

View File

@ -51,11 +51,9 @@ class ASTJsonConverter: public ASTConstVisitor
{ {
public: public:
/// Create a converter to JSON for the given abstract syntax tree. /// Create a converter to JSON for the given abstract syntax tree.
/// @a _legacy if true, use legacy format
/// @a _stackState state of the compiler stack to avoid outputting incomplete data /// @a _stackState state of the compiler stack to avoid outputting incomplete data
/// @a _sourceIndices is used to abbreviate source names in source locations. /// @a _sourceIndices is used to abbreviate source names in source locations.
explicit ASTJsonConverter( explicit ASTJsonConverter(
bool _legacy,
CompilerStack::State _stackState, CompilerStack::State _stackState,
std::map<std::string, unsigned> _sourceIndices = std::map<std::string, unsigned>() std::map<std::string, unsigned> _sourceIndices = std::map<std::string, unsigned>()
); );
@ -192,7 +190,6 @@ private:
_array.append(std::move(_value)); _array.append(std::move(_value));
} }
bool m_legacy = false; ///< if true, use legacy format
CompilerStack::State m_stackState = CompilerStack::State::Empty; ///< Used to only access information that already exists CompilerStack::State m_stackState = CompilerStack::State::Empty; ///< Used to only access information that already exists
bool m_inEvent = false; ///< whether we are currently inside an event or not bool m_inEvent = false; ///< whether we are currently inside an event or not
Json::Value m_currentValue; Json::Value m_currentValue;

View File

@ -1086,9 +1086,7 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting
Json::Value sourceResult = Json::objectValue; Json::Value sourceResult = Json::objectValue;
sourceResult["id"] = sourceIndex++; sourceResult["id"] = sourceIndex++;
if (isArtifactRequested(_inputsAndSettings.outputSelection, sourceName, "", "ast", wildcardMatchesExperimental)) if (isArtifactRequested(_inputsAndSettings.outputSelection, sourceName, "", "ast", wildcardMatchesExperimental))
sourceResult["ast"] = ASTJsonConverter(false, compilerStack.state(), compilerStack.sourceIndices()).toJson(compilerStack.ast(sourceName)); sourceResult["ast"] = ASTJsonConverter(compilerStack.state(), compilerStack.sourceIndices()).toJson(compilerStack.ast(sourceName));
if (isArtifactRequested(_inputsAndSettings.outputSelection, sourceName, "", "legacyAST", wildcardMatchesExperimental))
sourceResult["legacyAST"] = ASTJsonConverter(true, compilerStack.state(), compilerStack.sourceIndices()).toJson(compilerStack.ast(sourceName));
output["sources"][sourceName] = sourceResult; output["sources"][sourceName] = sourceResult;
} }

View File

@ -1679,11 +1679,10 @@ void CommandLineInterface::handleCombinedJSON()
if (requests.count(g_strAst)) if (requests.count(g_strAst))
{ {
bool legacyFormat = !requests.count(g_strCompactJSON);
output[g_strSources] = Json::Value(Json::objectValue); output[g_strSources] = Json::Value(Json::objectValue);
for (auto const& sourceCode: m_sourceCodes) for (auto const& sourceCode: m_sourceCodes)
{ {
ASTJsonConverter converter(legacyFormat, m_compiler->state(), m_compiler->sourceIndices()); ASTJsonConverter converter(m_compiler->state(), m_compiler->sourceIndices());
output[g_strSources][sourceCode.first] = Json::Value(Json::objectValue); output[g_strSources][sourceCode.first] = Json::Value(Json::objectValue);
output[g_strSources][sourceCode.first]["AST"] = converter.toJson(m_compiler->ast(sourceCode.first)); output[g_strSources][sourceCode.first]["AST"] = converter.toJson(m_compiler->ast(sourceCode.first));
} }
@ -1698,45 +1697,34 @@ void CommandLineInterface::handleCombinedJSON()
sout() << json << endl; sout() << json << endl;
} }
void CommandLineInterface::handleAst(string const& _argStr) void CommandLineInterface::handleAst()
{ {
string title; if (!m_args.count(g_argAstCompactJson))
return;
if (_argStr == g_argAstJson) vector<ASTNode const*> asts;
title = "JSON AST:"; for (auto const& sourceCode: m_sourceCodes)
else if (_argStr == g_argAstCompactJson) asts.push_back(&m_compiler->ast(sourceCode.first));
title = "JSON AST (compact format):";
else
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Illegal argStr for AST"));
// do we need AST output? if (m_args.count(g_argOutputDir))
if (m_args.count(_argStr))
{ {
vector<ASTNode const*> asts;
for (auto const& sourceCode: m_sourceCodes) for (auto const& sourceCode: m_sourceCodes)
asts.push_back(&m_compiler->ast(sourceCode.first));
bool legacyFormat = !m_args.count(g_argAstCompactJson);
if (m_args.count(g_argOutputDir))
{ {
for (auto const& sourceCode: m_sourceCodes) stringstream data;
{ string postfix = "";
stringstream data; ASTJsonConverter(m_compiler->state(), m_compiler->sourceIndices()).print(data, m_compiler->ast(sourceCode.first));
string postfix = ""; postfix += "_json";
ASTJsonConverter(legacyFormat, m_compiler->state(), m_compiler->sourceIndices()).print(data, m_compiler->ast(sourceCode.first)); boost::filesystem::path path(sourceCode.first);
postfix += "_json"; createFile(path.filename().string() + postfix + ".ast", data.str());
boost::filesystem::path path(sourceCode.first);
createFile(path.filename().string() + postfix + ".ast", data.str());
}
} }
else }
else
{
sout() << "JSON AST (compact format):" << endl << endl;
for (auto const& sourceCode: m_sourceCodes)
{ {
sout() << title << endl << endl; sout() << endl << "======= " << sourceCode.first << " =======" << endl;
for (auto const& sourceCode: m_sourceCodes) ASTJsonConverter(m_compiler->state(), m_compiler->sourceIndices()).print(sout(), m_compiler->ast(sourceCode.first));
{
sout() << endl << "======= " << sourceCode.first << " =======" << endl;
ASTJsonConverter(legacyFormat, m_compiler->state(), m_compiler->sourceIndices()).print(sout(), m_compiler->ast(sourceCode.first));
}
} }
} }
} }
@ -2002,8 +1990,7 @@ void CommandLineInterface::outputCompilationResults()
handleCombinedJSON(); handleCombinedJSON();
// do we need AST output? // do we need AST output?
handleAst(g_argAstJson); handleAst();
handleAst(g_argAstCompactJson);
if ( if (
!m_compiler->compilationSuccessful() && !m_compiler->compilationSuccessful() &&

View File

@ -67,7 +67,7 @@ private:
void outputCompilationResults(); void outputCompilationResults();
void handleCombinedJSON(); void handleCombinedJSON();
void handleAst(std::string const& _argStr); void handleAst();
void handleBinary(std::string const& _contract); void handleBinary(std::string const& _contract);
void handleOpcode(std::string const& _contract); void handleOpcode(std::string const& _contract);
void handleIR(std::string const& _contract); void handleIR(std::string const& _contract);

View File

@ -1 +1 @@
--error-recovery --ast-json --hashes --error-recovery --ast-compact-json --hashes

View File

@ -1,239 +1,181 @@
JSON AST: JSON AST (compact format):
======= recovery_ast_constructor/input.sol ======= ======= recovery_ast_constructor/input.sol =======
{ {
"attributes": "absolutePath": "recovery_ast_constructor/input.sol",
"exportedSymbols":
{ {
"absolutePath": "recovery_ast_constructor/input.sol", "Error1":
"exportedSymbols": [
{ 18
"Error1": ]
[
18
]
},
"license": "GPL-3.0"
}, },
"children": "id": 19,
"license": "GPL-3.0",
"nodeType": "SourceUnit",
"nodes":
[ [
{ {
"attributes":
{
"literals":
[
"solidity",
">=",
"0.0",
".0"
]
},
"id": 1, "id": 1,
"name": "PragmaDirective", "literals":
[
"solidity",
">=",
"0.0",
".0"
],
"nodeType": "PragmaDirective",
"src": "36:24:0" "src": "36:24:0"
}, },
{ {
"attributes": "abstract": false,
{ "baseContracts": [],
"abstract": false, "contractDependencies": [],
"baseContracts": "contractKind": "contract",
[ "fullyImplemented": true,
null "id": 18,
], "linearizedBaseContracts":
"contractDependencies": [
[ 18
null ],
], "name": "Error1",
"contractKind": "contract", "nodeType": "ContractDefinition",
"fullyImplemented": true, "nodes":
"linearizedBaseContracts":
[
18
],
"name": "Error1",
"scope": 19
},
"children":
[ [
{ {
"attributes": "body":
{ {
"implemented": true, "id": 8,
"isConstructor": true, "nodeType": "Block",
"kind": "constructor", "src": "96:49:0",
"modifiers": "statements":
[ [
null null
], ]
"name": "",
"scope": 18,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}, },
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "93:2:0"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 3,
"name": "ParameterList",
"src": "96:0:0"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 8,
"name": "Block",
"src": "96:49:0"
}
],
"id": 9, "id": 9,
"name": "FunctionDefinition", "implemented": true,
"src": "82:63:0" "kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "93:2:0"
},
"returnParameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters": [],
"src": "96:0:0"
},
"scope": 18,
"src": "82:63:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}, },
{ {
"attributes": "body":
{ {
"functionSelector": "af11c34c", "id": 16,
"implemented": true, "nodeType": "Block",
"isConstructor": false, "src": "440:19:0",
"kind": "function", "statements":
"modifiers":
[ [
null
],
"name": "five",
"scope": 18,
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{ {
"parameters": "expression":
[
null
]
},
"children": [],
"id": 10,
"name": "ParameterList",
"src": "411:2:0"
},
{
"children":
[
{ {
"attributes": "hexValue": "35",
"id": 14,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "453:1:0",
"typeDescriptions":
{ {
"constant": false, "typeIdentifier": "t_rational_5_by_1",
"mutability": "mutable", "typeString": "int_const 5"
"name": "",
"scope": 17,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
}, },
"children": "value": "5"
[ },
{ "functionReturnParameters": 13,
"attributes": "id": 15,
{ "nodeType": "Return",
"name": "uint", "src": "446:8:0"
"type": "uint256" }
}, ]
"id": 11, },
"name": "ElementaryTypeName", "functionSelector": "af11c34c",
"src": "434:4:0"
}
],
"id": 12,
"name": "VariableDeclaration",
"src": "434:4:0"
}
],
"id": 13,
"name": "ParameterList",
"src": "433:6:0"
},
{
"children":
[
{
"attributes":
{
"functionReturnParameters": 13
},
"children":
[
{
"attributes":
{
"hexvalue": "35",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 5",
"value": "5"
},
"id": 14,
"name": "Literal",
"src": "453:1:0"
}
],
"id": 15,
"name": "Return",
"src": "446:8:0"
}
],
"id": 16,
"name": "Block",
"src": "440:19:0"
}
],
"id": 17, "id": 17,
"name": "FunctionDefinition", "implemented": true,
"src": "398:61:0" "kind": "function",
"modifiers": [],
"name": "five",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 10,
"nodeType": "ParameterList",
"parameters": [],
"src": "411:2:0"
},
"returnParameters":
{
"id": 13,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 12,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"scope": 17,
"src": "434:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 11,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "434:4:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "433:6:0"
},
"scope": 18,
"src": "398:61:0",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
} }
], ],
"id": 18, "scope": 19,
"name": "ContractDefinition",
"src": "62:399:0" "src": "62:399:0"
} }
], ],
"id": 19,
"name": "SourceUnit",
"src": "36:426:0" "src": "36:426:0"
} }

View File

@ -9,7 +9,7 @@
"outputSelection": { "outputSelection": {
"fileA": { "fileA": {
"A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ], "A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ],
"": [ "legacyAST" ] "": [ "ast" ]
} }
} }
}, },

View File

@ -9,7 +9,7 @@
"outputSelection": { "outputSelection": {
"fileA": { "fileA": {
"A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ], "A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ],
"": [ "legacyAST" ] "": [ "ast" ]
} }
} }
}, },

View File

@ -9,7 +9,7 @@
"outputSelection": { "outputSelection": {
"fileA": { "fileA": {
"A": "it's a contract, but not an array!", "A": "it's a contract, but not an array!",
"": [ "legacyAST" ] "": [ "ast" ]
} }
} }
} }

View File

@ -9,7 +9,7 @@
"outputSelection": { "outputSelection": {
"fileA": { "fileA": {
"A": [ 1, 2, 3 ,4], "A": [ 1, 2, 3 ,4],
"": [ "legacyAST" ] "": [ "ast" ]
} }
} }
} }

View File

@ -9,7 +9,7 @@
"outputSelection": { "outputSelection": {
"fileA": { "fileA": {
"A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ], "A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ],
"": [ "legacyAST" ] "": [ "ast" ]
} }
}, },
"remappings": "not an object" "remappings": "not an object"

View File

@ -9,7 +9,7 @@
"outputSelection": { "outputSelection": {
"fileA": { "fileA": {
"A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ], "A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ],
"": [ "legacyAST" ] "": [ "ast" ]
} }
}, },
"remappings": [1, 2 ,3 ,4] "remappings": [1, 2 ,3 ,4]

View File

@ -1,109 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
}
},
"children":
[
{
"attributes":
{
"abstract": true,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"scope": 6
},
"children":
[
{
"attributes":
{
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers":
[
null
],
"name": "",
"scope": 5,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "34:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "37:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 3,
"name": "Block",
"src": "37:4:1"
}
],
"id": 4,
"name": "FunctionDefinition",
"src": "23:18:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "0:43:1"
}
],
"id": 6,
"name": "SourceUnit",
"src": "0:44:1"
}

View File

@ -1,611 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
39
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
39
],
"name": "C",
"scope": 40
},
"children":
[
{
"attributes":
{
"constant": false,
"functionSelector": "97682884",
"mutability": "mutable",
"name": "m",
"scope": 39,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(address => address payable)",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"type": "mapping(address => address payable)"
},
"children":
[
{
"attributes":
{
"name": "address",
"type": "address"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "25:7:1"
},
{
"attributes":
{
"name": "address",
"stateMutability": "payable",
"type": "address payable"
},
"id": 2,
"name": "ElementaryTypeName",
"src": "36:15:1"
}
],
"id": 3,
"name": "Mapping",
"src": "17:35:1"
}
],
"id": 4,
"name": "VariableDeclaration",
"src": "17:44:1"
},
{
"attributes":
{
"functionSelector": "fc68521a",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 39,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "arg",
"scope": 38,
"stateVariable": false,
"storageLocation": "default",
"type": "address payable",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "address",
"stateMutability": "payable",
"type": "address payable"
},
"id": 5,
"name": "ElementaryTypeName",
"src": "78:15:1"
}
],
"id": 6,
"name": "VariableDeclaration",
"src": "78:19:1"
}
],
"id": 7,
"name": "ParameterList",
"src": "77:21:1"
},
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "r",
"scope": 38,
"stateVariable": false,
"storageLocation": "default",
"type": "address payable",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "address",
"stateMutability": "payable",
"type": "address payable"
},
"id": 8,
"name": "ElementaryTypeName",
"src": "115:15:1"
}
],
"id": 9,
"name": "VariableDeclaration",
"src": "115:17:1"
}
],
"id": 10,
"name": "ParameterList",
"src": "114:19:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
12
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "a",
"scope": 37,
"stateVariable": false,
"storageLocation": "default",
"type": "address payable",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "address",
"stateMutability": "payable",
"type": "address payable"
},
"id": 11,
"name": "ElementaryTypeName",
"src": "144:15:1"
}
],
"id": 12,
"name": "VariableDeclaration",
"src": "144:17:1"
},
{
"attributes":
{
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"type": "address payable"
},
"children":
[
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 4,
"type": "mapping(address => address payable)",
"value": "m"
},
"id": 13,
"name": "Identifier",
"src": "164:1:1"
},
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 6,
"type": "address payable",
"value": "arg"
},
"id": 14,
"name": "Identifier",
"src": "166:3:1"
}
],
"id": 15,
"name": "IndexAccess",
"src": "164:6:1"
}
],
"id": 16,
"name": "VariableDeclarationStatement",
"src": "144:26:1"
},
{
"children":
[
{
"attributes":
{
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address payable"
},
"children":
[
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 9,
"type": "address payable",
"value": "r"
},
"id": 17,
"name": "Identifier",
"src": "180:1:1"
},
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 6,
"type": "address payable",
"value": "arg"
},
"id": 18,
"name": "Identifier",
"src": "184:3:1"
}
],
"id": 19,
"name": "Assignment",
"src": "180:7:1"
}
],
"id": 20,
"name": "ExpressionStatement",
"src": "180:7:1"
},
{
"attributes":
{
"assignments":
[
22
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "c",
"scope": 37,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 21,
"name": "ElementaryTypeName",
"src": "197:7:1"
}
],
"id": 22,
"name": "VariableDeclaration",
"src": "197:9:1"
},
{
"attributes":
{
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names":
[
null
],
"tryCall": false,
"type": "address",
"type_conversion": true
},
"children":
[
{
"attributes":
{
"argumentTypes":
[
{
"typeIdentifier": "t_contract$_C_$39",
"typeString": "contract C"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)"
},
"children":
[
{
"attributes":
{
"name": "address"
},
"id": 23,
"name": "ElementaryTypeName",
"src": "209:7:1"
}
],
"id": 24,
"name": "ElementaryTypeNameExpression",
"src": "209:7:1"
},
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": -28,
"type": "contract C",
"value": "this"
},
"id": 25,
"name": "Identifier",
"src": "217:4:1"
}
],
"id": 26,
"name": "FunctionCall",
"src": "209:13:1"
}
],
"id": 27,
"name": "VariableDeclarationStatement",
"src": "197:25:1"
},
{
"children":
[
{
"attributes":
{
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address payable"
},
"children":
[
{
"attributes":
{
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"type": "address payable"
},
"children":
[
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 4,
"type": "mapping(address => address payable)",
"value": "m"
},
"id": 28,
"name": "Identifier",
"src": "232:1:1"
},
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 22,
"type": "address",
"value": "c"
},
"id": 29,
"name": "Identifier",
"src": "234:1:1"
}
],
"id": 30,
"name": "IndexAccess",
"src": "232:4:1"
},
{
"attributes":
{
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names":
[
null
],
"tryCall": false,
"type": "address payable",
"type_conversion": true
},
"children":
[
{
"attributes":
{
"argumentTypes":
[
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)"
},
"children":
[
{
"attributes":
{
"name": "address"
},
"id": 31,
"name": "ElementaryTypeName",
"src": "239:7:1"
}
],
"id": 32,
"name": "ElementaryTypeNameExpression",
"src": "239:7:1"
},
{
"attributes":
{
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 33,
"name": "Literal",
"src": "247:1:1"
}
],
"id": 34,
"name": "FunctionCall",
"src": "239:10:1"
}
],
"id": 35,
"name": "Assignment",
"src": "232:17:1"
}
],
"id": 36,
"name": "ExpressionStatement",
"src": "232:17:1"
}
],
"id": 37,
"name": "Block",
"src": "134:122:1"
}
],
"id": 38,
"name": "FunctionDefinition",
"src": "67:189:1"
}
],
"id": 39,
"name": "ContractDefinition",
"src": "0:258:1"
}
],
"id": 40,
"name": "SourceUnit",
"src": "0:259:1"
}

View File

@ -1,88 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
4
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
4
],
"name": "C",
"scope": 5
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "i",
"scope": 4,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256[]",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "uint256[]"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "13:4:1"
}
],
"id": 2,
"name": "ArrayTypeName",
"src": "13:6:1"
}
],
"id": 3,
"name": "VariableDeclaration",
"src": "13:8:1"
}
],
"id": 4,
"name": "ContractDefinition",
"src": "0:24:1"
}
],
"id": 5,
"name": "SourceUnit",
"src": "0:25:1"
}

View File

@ -1,109 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"scope": 6
},
"children":
[
{
"attributes":
{
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers":
[
null
],
"name": "",
"scope": 5,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "25:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "28:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 3,
"name": "Block",
"src": "28:4:1"
}
],
"id": 4,
"name": "FunctionDefinition",
"src": "14:18:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "0:34:1"
}
],
"id": 6,
"name": "SourceUnit",
"src": "0:35:1"
}

View File

@ -1,268 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
1
],
"B":
[
4
],
"C":
[
7
],
"D":
[
10
],
"E":
[
13
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
1
],
"name": "A",
"nodes":
[
null
],
"scope": 14
},
"id": 1,
"name": "ContractDefinition",
"src": "0:14:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
1
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
4,
1
],
"name": "B",
"nodes":
[
null
],
"scope": 14
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 1
},
"id": 2,
"name": "IdentifierPath",
"src": "29:1:1"
}
],
"id": 3,
"name": "InheritanceSpecifier",
"src": "29:1:1"
}
],
"id": 4,
"name": "ContractDefinition",
"src": "15:19:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
1,
4
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
7,
4,
1
],
"name": "C",
"nodes":
[
null
],
"scope": 14
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 4
},
"id": 5,
"name": "IdentifierPath",
"src": "49:1:1"
}
],
"id": 6,
"name": "InheritanceSpecifier",
"src": "49:1:1"
}
],
"id": 7,
"name": "ContractDefinition",
"src": "35:19:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
1,
4,
7
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
10,
7,
4,
1
],
"name": "D",
"nodes":
[
null
],
"scope": 14
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "C",
"referencedDeclaration": 7
},
"id": 8,
"name": "IdentifierPath",
"src": "69:1:1"
}
],
"id": 9,
"name": "InheritanceSpecifier",
"src": "69:1:1"
}
],
"id": 10,
"name": "ContractDefinition",
"src": "55:19:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
1,
4,
7,
10
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
13,
10,
7,
4,
1
],
"name": "E",
"nodes":
[
null
],
"scope": 14
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "D",
"referencedDeclaration": 10
},
"id": 11,
"name": "IdentifierPath",
"src": "89:1:1"
}
],
"id": 12,
"name": "InheritanceSpecifier",
"src": "89:1:1"
}
],
"id": 13,
"name": "ContractDefinition",
"src": "75:19:1"
}
],
"id": 14,
"name": "SourceUnit",
"src": "0:95:1"
}

View File

@ -1,364 +0,0 @@
[
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
2
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
2
],
"name": "C",
"nodes":
[
null
],
"scope": 3
},
"children":
[
{
"attributes":
{
"text": "This contract is empty"
},
"id": 1,
"name": "StructuredDocumentation",
"src": "0:27:1"
}
],
"id": 2,
"name": "ContractDefinition",
"src": "28:13:1"
}
],
"id": 3,
"name": "SourceUnit",
"src": "28:14:1"
},
{
"attributes":
{
"absolutePath": "b",
"exportedSymbols":
{
"C":
[
5
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nodes":
[
null
],
"scope": 6
},
"children":
[
{
"attributes":
{
"text": "This contract is empty\nand has a line-breaking comment."
},
"id": 4,
"name": "StructuredDocumentation",
"src": "0:61:2"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "62:13:2"
}
],
"id": 6,
"name": "SourceUnit",
"src": "62:14:2"
},
{
"attributes":
{
"absolutePath": "c",
"exportedSymbols":
{
"C":
[
23
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
23
],
"name": "C",
"scope": 24
},
"children":
[
{
"attributes":
{
"constant": false,
"functionSelector": "c19d93fb",
"mutability": "mutable",
"name": "state",
"scope": 23,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 8,
"name": "ElementaryTypeName",
"src": "48:4:3"
},
{
"attributes":
{
"text": "Some comment on state var."
},
"id": 7,
"name": "StructuredDocumentation",
"src": "15:32:3"
}
],
"id": 9,
"name": "VariableDeclaration",
"src": "48:17:3"
},
{
"attributes":
{
"anonymous": false,
"name": "Evt"
},
"children":
[
{
"attributes":
{
"text": "Some comment on Evt."
},
"id": 10,
"name": "StructuredDocumentation",
"src": "69:26:3"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 11,
"name": "ParameterList",
"src": "105:2:3"
}
],
"id": 12,
"name": "EventDefinition",
"src": "96:12:3"
},
{
"attributes":
{
"name": "mod",
"virtual": false,
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"text": "Some comment on mod."
},
"id": 13,
"name": "StructuredDocumentation",
"src": "111:26:3"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 14,
"name": "ParameterList",
"src": "150:2:3"
},
{
"children":
[
{
"id": 15,
"name": "PlaceholderStatement",
"src": "155:1:3"
}
],
"id": 16,
"name": "Block",
"src": "153:6:3"
}
],
"id": 17,
"name": "ModifierDefinition",
"src": "138:21:3"
},
{
"attributes":
{
"functionSelector": "a4a2c40b",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "fn",
"scope": 23,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"text": "Some comment on fn."
},
"id": 18,
"name": "StructuredDocumentation",
"src": "162:25:3"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 19,
"name": "ParameterList",
"src": "199:2:3"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 20,
"name": "ParameterList",
"src": "209:0:3"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 21,
"name": "Block",
"src": "209:2:3"
}
],
"id": 22,
"name": "FunctionDefinition",
"src": "188:23:3"
}
],
"id": 23,
"name": "ContractDefinition",
"src": "0:213:3"
}
],
"id": 24,
"name": "SourceUnit",
"src": "0:214:3"
}
]

View File

@ -1,78 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
4
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
4
],
"name": "C",
"scope": 5
},
"children":
[
{
"attributes":
{
"canonicalName": "C.E",
"name": "E"
},
"children":
[
{
"attributes":
{
"name": "A"
},
"id": 1,
"name": "EnumValue",
"src": "22:1:1"
},
{
"attributes":
{
"name": "B"
},
"id": 2,
"name": "EnumValue",
"src": "25:1:1"
}
],
"id": 3,
"name": "EnumDefinition",
"src": "13:15:1"
}
],
"id": 4,
"name": "ContractDefinition",
"src": "0:30:1"
}
],
"id": 5,
"name": "SourceUnit",
"src": "0:31:1"
}

View File

@ -1,73 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
3
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
3
],
"name": "C",
"scope": 4
},
"children":
[
{
"attributes":
{
"anonymous": false,
"name": "E"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "20:2:1"
}
],
"id": 2,
"name": "EventDefinition",
"src": "13:10:1"
}
],
"id": 3,
"name": "ContractDefinition",
"src": "0:25:1"
}
],
"id": 4,
"name": "SourceUnit",
"src": "0:26:1"
}

View File

@ -1,171 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
9
],
"name": "C",
"scope": 10
},
"children":
[
{
"attributes":
{
"implemented": true,
"isConstructor": false,
"kind": "receive",
"modifiers":
[
null
],
"name": "",
"scope": 9,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "22:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "42:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 3,
"name": "Block",
"src": "42:5:1"
}
],
"id": 4,
"name": "FunctionDefinition",
"src": "15:32:1"
},
{
"attributes":
{
"implemented": true,
"isConstructor": false,
"kind": "fallback",
"modifiers":
[
null
],
"name": "",
"scope": 9,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 5,
"name": "ParameterList",
"src": "58:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 6,
"name": "ParameterList",
"src": "78:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 7,
"name": "Block",
"src": "78:5:1"
}
],
"id": 8,
"name": "FunctionDefinition",
"src": "50:33:1"
}
],
"id": 9,
"name": "ContractDefinition",
"src": "0:85:1"
}
],
"id": 10,
"name": "SourceUnit",
"src": "0:86:1"
}

View File

@ -1,109 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"scope": 6
},
"children":
[
{
"attributes":
{
"implemented": true,
"isConstructor": false,
"kind": "fallback",
"modifiers":
[
null
],
"name": "",
"scope": 5,
"stateMutability": "payable",
"virtual": false,
"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"
}

View File

@ -1,109 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"scope": 6
},
"children":
[
{
"attributes":
{
"implemented": true,
"isConstructor": false,
"kind": "fallback",
"modifiers":
[
null
],
"name": "",
"scope": 5,
"stateMutability": "nonpayable",
"virtual": false,
"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"
}

View File

@ -1,266 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
17
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
17
],
"name": "C",
"scope": 18
},
"children":
[
{
"attributes":
{
"functionSelector": "d6cd4974",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 17,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "x",
"scope": 16,
"stateVariable": false,
"storageLocation": "default",
"type": "function () payable external returns (uint256)",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"stateMutability": "payable",
"type": "function () payable external returns (uint256)",
"visibility": "external"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "32:2:1"
},
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "",
"scope": 5,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 2,
"name": "ElementaryTypeName",
"src": "61:4:1"
}
],
"id": 3,
"name": "VariableDeclaration",
"src": "61:4:1"
}
],
"id": 4,
"name": "ParameterList",
"src": "60:6:1"
}
],
"id": 5,
"name": "FunctionTypeName",
"src": "24:44:1"
}
],
"id": 6,
"name": "VariableDeclaration",
"src": "24:44:1"
}
],
"id": 7,
"name": "ParameterList",
"src": "23:46:1"
},
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "",
"scope": 16,
"stateVariable": false,
"storageLocation": "default",
"type": "function () view external returns (uint256)",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"stateMutability": "view",
"type": "function () view external returns (uint256)",
"visibility": "external"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 8,
"name": "ParameterList",
"src": "87:2:1"
},
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "",
"scope": 12,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 9,
"name": "ElementaryTypeName",
"src": "113:4:1"
}
],
"id": 10,
"name": "VariableDeclaration",
"src": "113:4:1"
}
],
"id": 11,
"name": "ParameterList",
"src": "112:6:1"
}
],
"id": 12,
"name": "FunctionTypeName",
"src": "79:40:1"
}
],
"id": 13,
"name": "VariableDeclaration",
"src": "79:40:1"
}
],
"id": 14,
"name": "ParameterList",
"src": "78:41:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 15,
"name": "Block",
"src": "120:2:1"
}
],
"id": 16,
"name": "FunctionDefinition",
"src": "13:109:1"
}
],
"id": 17,
"name": "ContractDefinition",
"src": "0:124:1"
}
],
"id": 18,
"name": "SourceUnit",
"src": "0:125:1"
}

View File

@ -1,41 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"E":
[
2
]
}
},
"children":
[
{
"attributes":
{
"canonicalName": "E",
"name": "E"
},
"children":
[
{
"attributes":
{
"name": "A"
},
"id": 1,
"name": "EnumValue",
"src": "9:1:1"
}
],
"id": 2,
"name": "EnumDefinition",
"src": "0:12:1"
}
],
"id": 3,
"name": "SourceUnit",
"src": "0:13:1"
}

View File

@ -1,63 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"S":
[
3
]
}
},
"children":
[
{
"attributes":
{
"canonicalName": "S",
"name": "S",
"scope": 4,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "a",
"scope": 3,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "uint256",
"type": "uint256"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "11:7:1"
}
],
"id": 2,
"name": "VariableDeclaration",
"src": "11:9:1"
}
],
"id": 3,
"name": "StructDefinition",
"src": "0:23:1"
}
],
"id": 4,
"name": "SourceUnit",
"src": "0:24:1"
}

View File

@ -1,100 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C1":
[
1
],
"C2":
[
4
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
1
],
"name": "C1",
"nodes":
[
null
],
"scope": 5
},
"id": 1,
"name": "ContractDefinition",
"src": "0:14:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
1
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
4,
1
],
"name": "C2",
"nodes":
[
null
],
"scope": 5
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "C1",
"referencedDeclaration": 1
},
"id": 2,
"name": "IdentifierPath",
"src": "30:2:1"
}
],
"id": 3,
"name": "InheritanceSpecifier",
"src": "30:2:1"
}
],
"id": 4,
"name": "ContractDefinition",
"src": "15:20:1"
}
],
"id": 5,
"name": "SourceUnit",
"src": "0:36:1"
}

View File

@ -1,49 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
1
]
},
"license": "GPL-3.0"
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
1
],
"name": "C",
"nodes":
[
null
],
"scope": 2
},
"id": 1,
"name": "ContractDefinition",
"src": "36:13:1"
}
],
"id": 2,
"name": "SourceUnit",
"src": "36:14:1"
}

View File

@ -1,203 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
11
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
11
],
"name": "c",
"scope": 12
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 11,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "23:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "33:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
4
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "a",
"scope": 9,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 3,
"name": "ElementaryTypeName",
"src": "35:4:1"
}
],
"id": 4,
"name": "VariableDeclaration",
"src": "35:6:1"
},
{
"attributes":
{
"commonType":
{
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"operator": "+",
"type": "int_const 5"
},
"children":
[
{
"attributes":
{
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 5,
"name": "Literal",
"src": "44:1:1"
},
{
"attributes":
{
"hexvalue": "33",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 3",
"value": "3"
},
"id": 6,
"name": "Literal",
"src": "48:1:1"
}
],
"id": 7,
"name": "BinaryOperation",
"src": "44:5:1"
}
],
"id": 8,
"name": "VariableDeclarationStatement",
"src": "35:14:1"
}
],
"id": 9,
"name": "Block",
"src": "33:19:1"
}
],
"id": 10,
"name": "FunctionDefinition",
"src": "13:39:1"
}
],
"id": 11,
"name": "ContractDefinition",
"src": "0:54:1"
}
],
"id": 12,
"name": "SourceUnit",
"src": "0:55:1"
}

View File

@ -1,217 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
15
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
15
],
"name": "c",
"scope": 16
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "a",
"scope": 15,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256[]",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "uint256[]"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "13:4:1"
}
],
"id": 2,
"name": "ArrayTypeName",
"src": "13:6:1"
}
],
"id": 3,
"name": "VariableDeclaration",
"src": "13:8:1"
},
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 15,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 4,
"name": "ParameterList",
"src": "33:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 5,
"name": "ParameterList",
"src": "43:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
10
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "b",
"scope": 13,
"stateVariable": false,
"storageLocation": "storage",
"type": "uint256[]",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "uint256[]"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 8,
"name": "ElementaryTypeName",
"src": "45:4:1"
}
],
"id": 9,
"name": "ArrayTypeName",
"src": "45:6:1"
}
],
"id": 10,
"name": "VariableDeclaration",
"src": "45:16:1"
},
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 3,
"type": "uint256[] storage ref",
"value": "a"
},
"id": 11,
"name": "Identifier",
"src": "64:1:1"
}
],
"id": 12,
"name": "VariableDeclarationStatement",
"src": "45:20:1"
}
],
"id": 13,
"name": "Block",
"src": "43:25:1"
}
],
"id": 14,
"name": "FunctionDefinition",
"src": "23:45:1"
}
],
"id": 15,
"name": "ContractDefinition",
"src": "0:70:1"
}
],
"id": 16,
"name": "SourceUnit",
"src": "0:71:1"
}

View File

@ -1,266 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
19
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
19
],
"name": "C",
"scope": 20
},
"children":
[
{
"attributes":
{
"canonicalName": "C.E",
"name": "E"
},
"children":
[
{
"attributes":
{
"name": "A"
},
"id": 1,
"name": "EnumValue",
"src": "26:1:1"
},
{
"attributes":
{
"name": "B"
},
"id": 2,
"name": "EnumValue",
"src": "29:1:1"
},
{
"attributes":
{
"name": "C"
},
"id": 3,
"name": "EnumValue",
"src": "32:1:1"
}
],
"id": 4,
"name": "EnumDefinition",
"src": "17:18:1"
},
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "a",
"scope": 19,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(contract C => bool)",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "mapping(contract C => bool)"
},
"children":
[
{
"attributes":
{
"referencedDeclaration": 19,
"type": "contract C"
},
"children":
[
{
"attributes":
{
"name": "C",
"referencedDeclaration": 19
},
"id": 5,
"name": "IdentifierPath",
"src": "48:1:1"
}
],
"id": 6,
"name": "UserDefinedTypeName",
"src": "48:1:1"
},
{
"attributes":
{
"name": "bool",
"type": "bool"
},
"id": 7,
"name": "ElementaryTypeName",
"src": "53:4:1"
}
],
"id": 8,
"name": "Mapping",
"src": "40:18:1"
}
],
"id": 9,
"name": "VariableDeclaration",
"src": "40:20:1"
},
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "b",
"scope": 19,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(address => bool)",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "mapping(address => bool)"
},
"children":
[
{
"attributes":
{
"name": "address",
"type": "address"
},
"id": 10,
"name": "ElementaryTypeName",
"src": "74:7:1"
},
{
"attributes":
{
"name": "bool",
"type": "bool"
},
"id": 11,
"name": "ElementaryTypeName",
"src": "85:4:1"
}
],
"id": 12,
"name": "Mapping",
"src": "66:24:1"
}
],
"id": 13,
"name": "VariableDeclaration",
"src": "66:26:1"
},
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "c",
"scope": 19,
"stateVariable": true,
"storageLocation": "default",
"type": "mapping(enum C.E => bool)",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "mapping(enum C.E => bool)"
},
"children":
[
{
"attributes":
{
"referencedDeclaration": 4,
"type": "enum C.E"
},
"children":
[
{
"attributes":
{
"name": "E",
"referencedDeclaration": 4
},
"id": 14,
"name": "IdentifierPath",
"src": "106:1:1"
}
],
"id": 15,
"name": "UserDefinedTypeName",
"src": "106:1:1"
},
{
"attributes":
{
"name": "bool",
"type": "bool"
},
"id": 16,
"name": "ElementaryTypeName",
"src": "111:4:1"
}
],
"id": 17,
"name": "Mapping",
"src": "98:18:1"
}
],
"id": 18,
"name": "VariableDeclaration",
"src": "98:20:1"
}
],
"id": 19,
"name": "ContractDefinition",
"src": "0:121:1"
}
],
"id": 20,
"name": "SourceUnit",
"src": "0:122:1"
}

View File

@ -1,204 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
14
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
14
],
"name": "C",
"scope": 15
},
"children":
[
{
"attributes":
{
"name": "M",
"virtual": false,
"visibility": "internal"
},
"children":
[
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "i",
"scope": 6,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "24:4:1"
}
],
"id": 2,
"name": "VariableDeclaration",
"src": "24:6:1"
}
],
"id": 3,
"name": "ParameterList",
"src": "23:8:1"
},
{
"children":
[
{
"id": 4,
"name": "PlaceholderStatement",
"src": "34:1:1"
}
],
"id": 5,
"name": "Block",
"src": "32:6:1"
}
],
"id": 6,
"name": "ModifierDefinition",
"src": "13:25:1"
},
{
"attributes":
{
"functionSelector": "28811f59",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "F",
"scope": 14,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 7,
"name": "ParameterList",
"src": "49:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 11,
"name": "ParameterList",
"src": "64:0:1"
},
{
"children":
[
{
"attributes":
{
"name": "M",
"referencedDeclaration": 6
},
"id": 8,
"name": "IdentifierPath",
"src": "52:1:1"
},
{
"attributes":
{
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 9,
"name": "Literal",
"src": "54:1:1"
}
],
"id": 10,
"name": "ModifierInvocation",
"src": "52:4:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 12,
"name": "Block",
"src": "64:2:1"
}
],
"id": 13,
"name": "FunctionDefinition",
"src": "39:27:1"
}
],
"id": 14,
"name": "ContractDefinition",
"src": "0:68:1"
}
],
"id": 15,
"name": "SourceUnit",
"src": "0:69:1"
}

View File

@ -1,204 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
14
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
14
],
"name": "C",
"scope": 15
},
"children":
[
{
"attributes":
{
"name": "M",
"virtual": false,
"visibility": "internal"
},
"children":
[
{
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "i",
"scope": 6,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "24:4:1"
}
],
"id": 2,
"name": "VariableDeclaration",
"src": "24:6:1"
}
],
"id": 3,
"name": "ParameterList",
"src": "23:8:1"
},
{
"children":
[
{
"id": 4,
"name": "PlaceholderStatement",
"src": "34:1:1"
}
],
"id": 5,
"name": "Block",
"src": "32:6:1"
}
],
"id": 6,
"name": "ModifierDefinition",
"src": "13:25:1"
},
{
"attributes":
{
"functionSelector": "28811f59",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "F",
"scope": 14,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 7,
"name": "ParameterList",
"src": "49:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 11,
"name": "ParameterList",
"src": "64:0:1"
},
{
"children":
[
{
"attributes":
{
"name": "M",
"referencedDeclaration": 6
},
"id": 8,
"name": "IdentifierPath",
"src": "52:1:1"
},
{
"attributes":
{
"hexvalue": "31",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 1",
"value": "1"
},
"id": 9,
"name": "Literal",
"src": "54:1:1"
}
],
"id": 10,
"name": "ModifierInvocation",
"src": "52:4:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 12,
"name": "Block",
"src": "64:2:1"
}
],
"id": 13,
"name": "FunctionDefinition",
"src": "39:27:1"
}
],
"id": 14,
"name": "ContractDefinition",
"src": "0:68:1"
}
],
"id": 15,
"name": "SourceUnit",
"src": "0:69:1"
}

View File

@ -1,185 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
10
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
10
],
"name": "C",
"scope": 11
},
"children":
[
{
"attributes":
{
"constant": false,
"functionSelector": "0dbe671f",
"mutability": "immutable",
"name": "a",
"scope": 10,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "17:4:1"
},
{
"attributes":
{
"hexvalue": "34",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 4",
"value": "4"
},
"id": 2,
"name": "Literal",
"src": "43:1:1"
}
],
"id": 3,
"name": "VariableDeclaration",
"src": "17:27:1"
},
{
"attributes":
{
"constant": true,
"functionSelector": "4df7e3d0",
"mutability": "constant",
"name": "b",
"scope": 10,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 4,
"name": "ElementaryTypeName",
"src": "50:4:1"
},
{
"attributes":
{
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 5,
"name": "Literal",
"src": "75:1:1"
}
],
"id": 6,
"name": "VariableDeclaration",
"src": "50:26:1"
},
{
"attributes":
{
"constant": false,
"functionSelector": "c3da42b8",
"mutability": "mutable",
"name": "c",
"scope": 10,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 7,
"name": "ElementaryTypeName",
"src": "82:4:1"
},
{
"attributes":
{
"hexvalue": "33",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 3",
"value": "3"
},
"id": 8,
"name": "Literal",
"src": "98:1:1"
}
],
"id": 9,
"name": "VariableDeclaration",
"src": "82:17:1"
}
],
"id": 10,
"name": "ContractDefinition",
"src": "0:102:1"
}
],
"id": 11,
"name": "SourceUnit",
"src": "0:103:1"
}

View File

@ -1,164 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
9
],
"name": "C",
"scope": 10
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 9,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "23:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "33:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
4
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "x",
"scope": 7,
"stateVariable": false,
"storageLocation": "memory",
"type": "string",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "string",
"type": "string"
},
"id": 3,
"name": "ElementaryTypeName",
"src": "35:6:1"
}
],
"id": 4,
"name": "VariableDeclaration",
"src": "35:15:1"
},
{
"attributes":
{
"hexvalue": "ff",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "hexString",
"type": "literal_string hex\"ff\""
},
"id": 5,
"name": "Literal",
"src": "53:7:1"
}
],
"id": 6,
"name": "VariableDeclarationStatement",
"src": "35:25:1"
}
],
"id": 7,
"name": "Block",
"src": "33:30:1"
}
],
"id": 8,
"name": "FunctionDefinition",
"src": "13:50:1"
}
],
"id": 9,
"name": "ContractDefinition",
"src": "0:65:1"
}
],
"id": 10,
"name": "SourceUnit",
"src": "0:66:1"
}

View File

@ -1,511 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
5
],
"B":
[
16
],
"C":
[
31
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "A",
"scope": 32
},
"children":
[
{
"attributes":
{
"functionSelector": "a399b6a2",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "faa",
"scope": 5,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "26:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "36:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 3,
"name": "Block",
"src": "36:2:1"
}
],
"id": 4,
"name": "FunctionDefinition",
"src": "14:24:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "0:40:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
5
],
"contractKind": "contract",
"fullyImplemented": false,
"linearizedBaseContracts":
[
16,
5
],
"name": "B",
"scope": 32
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 6,
"name": "IdentifierPath",
"src": "55:1:1"
}
],
"id": 7,
"name": "InheritanceSpecifier",
"src": "55:1:1"
},
{
"attributes":
{
"functionSelector": "c2985578",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "foo",
"scope": 16,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 8,
"name": "ParameterList",
"src": "72:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 9,
"name": "ParameterList",
"src": "81:0:1"
}
],
"id": 10,
"name": "FunctionDefinition",
"src": "60:22:1"
},
{
"attributes":
{
"baseFunctions":
[
4
],
"functionSelector": "a399b6a2",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "faa",
"scope": 16,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"overrides":
[
null
]
},
"id": 12,
"name": "OverrideSpecifier",
"src": "106:8:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 11,
"name": "ParameterList",
"src": "96:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 13,
"name": "ParameterList",
"src": "115:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 14,
"name": "Block",
"src": "115:2:1"
}
],
"id": 15,
"name": "FunctionDefinition",
"src": "84:33:1"
}
],
"id": 16,
"name": "ContractDefinition",
"src": "41:78:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
5,
16
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
31,
16,
5
],
"name": "C",
"scope": 32
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 16
},
"id": 17,
"name": "IdentifierPath",
"src": "134:1:1"
}
],
"id": 18,
"name": "InheritanceSpecifier",
"src": "134:1:1"
},
{
"attributes":
{
"baseFunctions":
[
10
],
"functionSelector": "c2985578",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "foo",
"scope": 31,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"overrides":
[
null
]
},
"id": 20,
"name": "OverrideSpecifier",
"src": "161:8:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 19,
"name": "ParameterList",
"src": "151:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 21,
"name": "ParameterList",
"src": "170:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 22,
"name": "Block",
"src": "170:3:1"
}
],
"id": 23,
"name": "FunctionDefinition",
"src": "139:34:1"
},
{
"attributes":
{
"baseFunctions":
[
15
],
"functionSelector": "a399b6a2",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "faa",
"scope": 31,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 25,
"name": "IdentifierPath",
"src": "206:1:1"
},
{
"attributes":
{
"name": "B",
"referencedDeclaration": 16
},
"id": 26,
"name": "IdentifierPath",
"src": "209:1:1"
}
],
"id": 27,
"name": "OverrideSpecifier",
"src": "197:14:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 24,
"name": "ParameterList",
"src": "187:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 28,
"name": "ParameterList",
"src": "212:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 29,
"name": "Block",
"src": "212:2:1"
}
],
"id": 30,
"name": "FunctionDefinition",
"src": "175:39:1"
}
],
"id": 31,
"name": "ContractDefinition",
"src": "120:96:1"
}
],
"id": 32,
"name": "SourceUnit",
"src": "0:217:1"
}

View File

@ -1,87 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"scope": 6
},
"children":
[
{
"attributes":
{
"name": "M",
"virtual": false,
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "24:0:1"
},
{
"children":
[
{
"id": 2,
"name": "PlaceholderStatement",
"src": "26:1:1"
}
],
"id": 3,
"name": "Block",
"src": "24:6:1"
}
],
"id": 4,
"name": "ModifierDefinition",
"src": "13:17:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "0:32:1"
}
],
"id": 6,
"name": "SourceUnit",
"src": "0:33:1"
}

View File

@ -1,109 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"scope": 6
},
"children":
[
{
"attributes":
{
"implemented": true,
"isConstructor": false,
"kind": "receive",
"modifiers":
[
null
],
"name": "",
"scope": 5,
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "22:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "42:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 3,
"name": "Block",
"src": "42:5:1"
}
],
"id": 4,
"name": "FunctionDefinition",
"src": "15:32:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "0:49:1"
}
],
"id": 6,
"name": "SourceUnit",
"src": "0:50:1"
}

View File

@ -1,161 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
11
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
11
],
"name": "c",
"scope": 12
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 11,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "23:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "33:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
7
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "x",
"scope": 9,
"stateVariable": false,
"storageLocation": "memory",
"type": "uint256[]",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "uint256[]"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 5,
"name": "ElementaryTypeName",
"src": "35:4:1"
}
],
"id": 6,
"name": "ArrayTypeName",
"src": "35:6:1"
}
],
"id": 7,
"name": "VariableDeclaration",
"src": "35:15:1"
}
],
"id": 8,
"name": "VariableDeclarationStatement",
"src": "35:15:1"
}
],
"id": 9,
"name": "Block",
"src": "33:20:1"
}
],
"id": 10,
"name": "FunctionDefinition",
"src": "13:40:1"
}
],
"id": 11,
"name": "ContractDefinition",
"src": "0:55:1"
}
],
"id": 12,
"name": "SourceUnit",
"src": "0:56:1"
}

View File

@ -1,173 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
12
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
12
],
"name": "c",
"scope": 13
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 12,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "23:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "33:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
8
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "rows",
"scope": 10,
"stateVariable": false,
"storageLocation": "memory",
"type": "uint256[][]",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"type": "uint256[][]"
},
"children":
[
{
"attributes":
{
"type": "uint256[]"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 5,
"name": "ElementaryTypeName",
"src": "35:4:1"
}
],
"id": 6,
"name": "ArrayTypeName",
"src": "35:6:1"
}
],
"id": 7,
"name": "ArrayTypeName",
"src": "35:8:1"
}
],
"id": 8,
"name": "VariableDeclaration",
"src": "35:20:1"
}
],
"id": 9,
"name": "VariableDeclarationStatement",
"src": "35:20:1"
}
],
"id": 10,
"name": "Block",
"src": "33:25:1"
}
],
"id": 11,
"name": "FunctionDefinition",
"src": "13:45:1"
}
],
"id": 12,
"name": "ContractDefinition",
"src": "0:60:1"
}
],
"id": 13,
"name": "SourceUnit",
"src": "0:61:1"
}

View File

@ -1,48 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
1
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
1
],
"name": "C",
"nodes":
[
null
],
"scope": 2
},
"id": 1,
"name": "ContractDefinition",
"src": "0:13:1"
}
],
"id": 2,
"name": "SourceUnit",
"src": "0:14:1"
}

View File

@ -1,206 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
12
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
12
],
"name": "C",
"scope": 13
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 12,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "23:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "26:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
4
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "x",
"scope": 10,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 3,
"name": "ElementaryTypeName",
"src": "28:4:1"
}
],
"id": 4,
"name": "VariableDeclaration",
"src": "28:6:1"
},
{
"attributes":
{
"hexvalue": "32",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "number",
"type": "int_const 2",
"value": "2"
},
"id": 5,
"name": "Literal",
"src": "37:1:1"
}
],
"id": 6,
"name": "VariableDeclarationStatement",
"src": "28:10:1"
},
{
"children":
[
{
"attributes":
{
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "++",
"prefix": false,
"type": "uint256"
},
"children":
[
{
"attributes":
{
"overloadedDeclarations":
[
null
],
"referencedDeclaration": 4,
"type": "uint256",
"value": "x"
},
"id": 7,
"name": "Identifier",
"src": "40:1:1"
}
],
"id": 8,
"name": "UnaryOperation",
"src": "40:3:1"
}
],
"id": 9,
"name": "ExpressionStatement",
"src": "40:3:1"
}
],
"id": 10,
"name": "Block",
"src": "26:20:1"
}
],
"id": 11,
"name": "FunctionDefinition",
"src": "13:33:1"
}
],
"id": 12,
"name": "ContractDefinition",
"src": "0:48:1"
}
],
"id": 13,
"name": "SourceUnit",
"src": "0:49:1"
}

View File

@ -1,165 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
9
],
"name": "C",
"scope": 10
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 9,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "23:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "33:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
4
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "x",
"scope": 7,
"stateVariable": false,
"storageLocation": "memory",
"type": "string",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "string",
"type": "string"
},
"id": 3,
"name": "ElementaryTypeName",
"src": "35:6:1"
}
],
"id": 4,
"name": "VariableDeclaration",
"src": "35:15:1"
},
{
"attributes":
{
"hexvalue": "48656c6c6f20576f726c64",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "string",
"type": "literal_string \"Hello World\"",
"value": "Hello World"
},
"id": 5,
"name": "Literal",
"src": "53:13:1"
}
],
"id": 6,
"name": "VariableDeclarationStatement",
"src": "35:31:1"
}
],
"id": 7,
"name": "Block",
"src": "33:36:1"
}
],
"id": 8,
"name": "FunctionDefinition",
"src": "13:56:1"
}
],
"id": 9,
"name": "ContractDefinition",
"src": "0:71:1"
}
],
"id": 10,
"name": "SourceUnit",
"src": "0:72:1"
}

View File

@ -1,370 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
5
],
"B":
[
10
],
"C":
[
22
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "A",
"scope": 23
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 5,
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "27:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "45:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 3,
"name": "Block",
"src": "45:2:1"
}
],
"id": 4,
"name": "FunctionDefinition",
"src": "17:30:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "0:49:1"
},
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
10
],
"name": "B",
"scope": 23
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 10,
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 6,
"name": "ParameterList",
"src": "77:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 7,
"name": "ParameterList",
"src": "95:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 8,
"name": "Block",
"src": "95:2:1"
}
],
"id": 9,
"name": "FunctionDefinition",
"src": "67:30:1"
}
],
"id": 10,
"name": "ContractDefinition",
"src": "50:49:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
5,
10
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
22,
10,
5
],
"name": "C",
"scope": 23
},
"children":
[
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 11,
"name": "IdentifierPath",
"src": "114:1:1"
}
],
"id": 12,
"name": "InheritanceSpecifier",
"src": "114:1:1"
},
{
"attributes": {},
"children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 10
},
"id": 13,
"name": "IdentifierPath",
"src": "117:1:1"
}
],
"id": 14,
"name": "InheritanceSpecifier",
"src": "117:1:1"
},
{
"attributes":
{
"baseFunctions":
[
4,
9
],
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 22,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 16,
"name": "IdentifierPath",
"src": "154:1:1"
},
{
"attributes":
{
"name": "B",
"referencedDeclaration": 10
},
"id": 17,
"name": "IdentifierPath",
"src": "157:1:1"
}
],
"id": 18,
"name": "OverrideSpecifier",
"src": "145:14:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 15,
"name": "ParameterList",
"src": "135:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 19,
"name": "ParameterList",
"src": "160:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 20,
"name": "Block",
"src": "160:2:1"
}
],
"id": 21,
"name": "FunctionDefinition",
"src": "125:37:1"
}
],
"id": 22,
"name": "ContractDefinition",
"src": "100:64:1"
}
],
"id": 23,
"name": "SourceUnit",
"src": "0:165:1"
}

View File

@ -1,165 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
9
],
"name": "C",
"scope": 10
},
"children":
[
{
"attributes":
{
"functionSelector": "26121ff0",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 9,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "23:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "33:0:1"
},
{
"children":
[
{
"attributes":
{
"assignments":
[
4
]
},
"children":
[
{
"attributes":
{
"constant": false,
"mutability": "mutable",
"name": "x",
"scope": 7,
"stateVariable": false,
"storageLocation": "memory",
"type": "string",
"visibility": "internal"
},
"children":
[
{
"attributes":
{
"name": "string",
"type": "string"
},
"id": 3,
"name": "ElementaryTypeName",
"src": "35:6:1"
}
],
"id": 4,
"name": "VariableDeclaration",
"src": "35:15:1"
},
{
"attributes":
{
"hexvalue": "48656c6c6f20f09f9883",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"token": "unicodeString",
"type": "literal_string hex\"48656c6c6f20f09f9883\"",
"value": "Hello \ud83d\ude03"
},
"id": 5,
"name": "Literal",
"src": "53:19:1"
}
],
"id": 6,
"name": "VariableDeclarationStatement",
"src": "35:37:1"
}
],
"id": 7,
"name": "Block",
"src": "33:42:1"
}
],
"id": 8,
"name": "FunctionDefinition",
"src": "13:62:1"
}
],
"id": 9,
"name": "ContractDefinition",
"src": "0:77:1"
}
],
"id": 10,
"name": "SourceUnit",
"src": "0:78:1"
}

View File

@ -1,108 +0,0 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
],
"L":
[
1
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "library",
"fullyImplemented": true,
"linearizedBaseContracts":
[
1
],
"name": "L",
"nodes":
[
null
],
"scope": 6
},
"id": 1,
"name": "ContractDefinition",
"src": "0:12:1"
},
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "C",
"scope": 6
},
"children":
[
{
"children":
[
{
"attributes":
{
"name": "L",
"referencedDeclaration": 1
},
"id": 2,
"name": "IdentifierPath",
"src": "32:1:1"
},
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 3,
"name": "ElementaryTypeName",
"src": "38:4:1"
}
],
"id": 4,
"name": "UsingForDirective",
"src": "26:17:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "13:32:1"
}
],
"id": 6,
"name": "SourceUnit",
"src": "0:46:1"
}

View File

@ -74,7 +74,6 @@ ASTJSONTest::ASTJSONTest(string const& _filename)
m_astFilename = _filename.substr(0, _filename.size() - 4) + ".json"; m_astFilename = _filename.substr(0, _filename.size() - 4) + ".json";
m_astParseOnlyFilename = _filename.substr(0, _filename.size() - 4) + "_parseOnly.json"; m_astParseOnlyFilename = _filename.substr(0, _filename.size() - 4) + "_parseOnly.json";
m_legacyAstFilename = _filename.substr(0, _filename.size() - 4) + "_legacy.json";
ifstream file(_filename); ifstream file(_filename);
if (!file) if (!file)
@ -123,14 +122,6 @@ ASTJSONTest::ASTJSONTest(string const& _filename)
} }
file.close(); file.close();
file.open(m_legacyAstFilename);
if (file)
{
string line;
while (getline(file, line))
m_expectationLegacy += line + "\n";
}
file.close();
} }
TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted) TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted)
@ -161,7 +152,6 @@ TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefi
m_resultParseOnly, m_resultParseOnly,
sourceIndices, sourceIndices,
c, c,
false,
"parseOnly", "parseOnly",
_stream, _stream,
_linePrefix, _linePrefix,
@ -174,7 +164,7 @@ TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefi
if (!c.parse()) if (!c.parse())
{ {
// Empty Expectations means we expect failure // Empty Expectations means we expect failure
if (m_expectation.empty() && m_expectationLegacy.empty()) if (m_expectation.empty())
return resultsMatch ? TestResult::Success : TestResult::Failure; return resultsMatch ? TestResult::Success : TestResult::Failure;
SourceReferenceFormatterHuman formatter(_stream, _formatted, false); SourceReferenceFormatterHuman formatter(_stream, _formatted, false);
@ -190,25 +180,12 @@ TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefi
m_result, m_result,
sourceIndices, sourceIndices,
c, c,
false,
"", "",
_stream, _stream,
_linePrefix, _linePrefix,
_formatted _formatted
) && resultsMatch; ) && resultsMatch;
resultsMatch = runTest(
m_expectationLegacy,
m_resultLegacy,
sourceIndices,
c,
true,
"legacy",
_stream,
_linePrefix,
_formatted
) && resultsMatch;
return resultsMatch ? TestResult::Success : TestResult::Failure; return resultsMatch ? TestResult::Success : TestResult::Failure;
} }
@ -217,7 +194,6 @@ bool ASTJSONTest::runTest(
string& _result, string& _result,
map<string, unsigned> const& _sourceIndices, map<string, unsigned> const& _sourceIndices,
CompilerStack& _compiler, CompilerStack& _compiler,
bool _legacy,
string const& _variation, string const& _variation,
ostream& _stream, ostream& _stream,
string const& _linePrefix, string const& _linePrefix,
@ -230,7 +206,7 @@ bool ASTJSONTest::runTest(
for (size_t i = 0; i < m_sources.size(); i++) for (size_t i = 0; i < m_sources.size(); i++)
{ {
ostringstream result; ostringstream result;
ASTJsonConverter(_legacy, _compiler.state(), _sourceIndices).print(result, _compiler.ast(m_sources[i].first)); ASTJsonConverter(_compiler.state(), _sourceIndices).print(result, _compiler.ast(m_sources[i].first));
_result += result.str(); _result += result.str();
if (i != m_sources.size() - 1) if (i != m_sources.size() - 1)
_result += ","; _result += ",";
@ -293,7 +269,6 @@ void ASTJSONTest::printSource(ostream& _stream, string const& _linePrefix, bool
void ASTJSONTest::printUpdatedExpectations(std::ostream&, std::string const&) const void ASTJSONTest::printUpdatedExpectations(std::ostream&, std::string const&) const
{ {
updateExpectation(m_astFilename, m_result, ""); updateExpectation(m_astFilename, m_result, "");
updateExpectation(m_legacyAstFilename, m_resultLegacy, "legacy ");
updateExpectation(m_astParseOnlyFilename, m_resultParseOnly, "parseOnly "); updateExpectation(m_astParseOnlyFilename, m_resultParseOnly, "parseOnly ");
} }

View File

@ -38,7 +38,9 @@ class ASTJSONTest: public TestCase
{ {
public: public:
static std::unique_ptr<TestCase> create(Config const& _config) static std::unique_ptr<TestCase> create(Config const& _config)
{ return std::make_unique<ASTJSONTest>(_config.filename); } {
return std::make_unique<ASTJSONTest>(_config.filename);
}
ASTJSONTest(std::string const& _filename); ASTJSONTest(std::string const& _filename);
TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool const _formatted = false) override; TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool const _formatted = false) override;
@ -51,7 +53,6 @@ private:
std::string& _result, std::string& _result,
std::map<std::string, unsigned> const& _sourceIndices, std::map<std::string, unsigned> const& _sourceIndices,
CompilerStack& _compiler, CompilerStack& _compiler,
bool _parseOnly,
std::string const& _variation, std::string const& _variation,
std::ostream& _stream, std::ostream& _stream,
std::string const& _linePrefix = "", std::string const& _linePrefix = "",
@ -64,13 +65,10 @@ private:
) const; ) const;
std::vector<std::pair<std::string, std::string>> m_sources; std::vector<std::pair<std::string, std::string>> m_sources;
std::string m_expectationLegacy;
std::string m_expectationParseOnly; std::string m_expectationParseOnly;
std::string m_astFilename; std::string m_astFilename;
std::string m_astParseOnlyFilename; std::string m_astParseOnlyFilename;
std::string m_legacyAstFilename;
std::string m_result; std::string m_result;
std::string m_resultLegacy;
std::string m_resultParseOnly; std::string m_resultParseOnly;
}; };

View File

@ -385,7 +385,7 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
"outputSelection": { "outputSelection": {
"fileA": { "fileA": {
"A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ], "A": [ "abi", "devdoc", "userdoc", "evm.bytecode", "evm.assembly", "evm.gasEstimates", "evm.legacyAssembly", "metadata" ],
"": [ "legacyAST" ] "": [ "ast" ]
} }
} }
} }
@ -468,13 +468,13 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
BOOST_CHECK(solidity::test::isValidMetadata(contract["metadata"].asString())); BOOST_CHECK(solidity::test::isValidMetadata(contract["metadata"].asString()));
BOOST_CHECK(result["sources"].isObject()); BOOST_CHECK(result["sources"].isObject());
BOOST_CHECK(result["sources"]["fileA"].isObject()); BOOST_CHECK(result["sources"]["fileA"].isObject());
BOOST_CHECK(result["sources"]["fileA"]["legacyAST"].isObject()); BOOST_CHECK(result["sources"]["fileA"]["ast"].isObject());
BOOST_CHECK_EQUAL( BOOST_CHECK_EQUAL(
util::jsonCompactPrint(result["sources"]["fileA"]["legacyAST"]), util::jsonCompactPrint(result["sources"]["fileA"]["ast"]),
"{\"attributes\":{\"absolutePath\":\"fileA\",\"exportedSymbols\":{\"A\":[1]}},\"children\":" "{\"absolutePath\":\"fileA\",\"exportedSymbols\":{\"A\":[1]},\"id\":2,\"nodeType\":\"SourceUnit\",\"nodes\":[{\"abstract\":false,"
"[{\"attributes\":{\"abstract\":false,\"baseContracts\":[null],\"contractDependencies\":[null],\"contractKind\":\"contract\"," "\"baseContracts\":[],\"contractDependencies\":[],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"id\":1,"
"\"fullyImplemented\":true,\"linearizedBaseContracts\":[1],\"name\":\"A\",\"nodes\":[null],\"scope\":2}," "\"linearizedBaseContracts\":[1],\"name\":\"A\",\"nodeType\":\"ContractDefinition\",\"nodes\":[],\"scope\":2,"
"\"id\":1,\"name\":\"ContractDefinition\",\"src\":\"0:14:0\"}],\"id\":2,\"name\":\"SourceUnit\",\"src\":\"0:14:0\"}" "\"src\":\"0:14:0\"}],\"src\":\"0:14:0\"}"
); );
} }