aboutsummaryrefslogtreecommitdiffstats
path: root/solidityExpressionCompiler.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-04 00:45:12 +0800
committerChristian <c@ethdev.com>2014-12-04 01:51:59 +0800
commit445ba10d3b9fc41591b9fb7a52e0fe862a10e7e7 (patch)
tree53ff62210fac5ed642427d8156790da093bf8df8 /solidityExpressionCompiler.cpp
parent5b6a211b8aea80fc857e043fe5eb33f43c3f7df4 (diff)
downloaddexon-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.cpp3
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);