diff options
author | Christian <c@ethdev.com> | 2014-12-04 00:45:12 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-04 01:51:59 +0800 |
commit | 445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7 (patch) | |
tree | 53ff62210fac5ed642427d8156790da093bf8df8 /solidityExpressionCompiler.cpp | |
parent | 5b6a211b8aea80fc857e043fe5eb33f43c3f7df4 (diff) | |
download | dexon-solidity-445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7.tar dexon-solidity-445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7.tar.gz dexon-solidity-445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7.tar.bz2 dexon-solidity-445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7.tar.lz dexon-solidity-445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7.tar.xz dexon-solidity-445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7.tar.zst dexon-solidity-445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7.zip |
Multi-source and multi-contract compiler.
Diffstat (limited to 'solidityExpressionCompiler.cpp')
-rw-r--r-- | solidityExpressionCompiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/solidityExpressionCompiler.cpp b/solidityExpressionCompiler.cpp index b077e262..cb22d512 100644 --- a/solidityExpressionCompiler.cpp +++ b/solidityExpressionCompiler.cpp @@ -88,10 +88,11 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _ Parser parser; ASTPointer<SourceUnit> sourceUnit; BOOST_REQUIRE_NO_THROW(sourceUnit = parser.parse(make_shared<Scanner>(CharStream(_sourceCode)))); + NameAndTypeResolver resolver({}); + resolver.registerDeclarations(*sourceUnit); for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes()) if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) { - NameAndTypeResolver resolver({}); BOOST_REQUIRE_NO_THROW(resolver.resolveNamesAndTypes(*contract)); FirstExpressionExtractor extractor(*contract); BOOST_REQUIRE(extractor.getExpression() != nullptr); |