aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorethdev <marek.kotewicz@gmail.com>2014-12-17 23:47:22 +0800
committerethdev <marek.kotewicz@gmail.com>2014-12-17 23:47:22 +0800
commitfd275b6d37dcd6d57a914c6d26d9de10d4dadb1f (patch)
tree53c10d6e95f447309792a390c9aa89ffc6aca452
parent8e87e85937d6ca6992f48dd5d8e6a0db276af205 (diff)
downloaddexon-solidity-fd275b6d37dcd6d57a914c6d26d9de10d4dadb1f.tar
dexon-solidity-fd275b6d37dcd6d57a914c6d26d9de10d4dadb1f.tar.gz
dexon-solidity-fd275b6d37dcd6d57a914c6d26d9de10d4dadb1f.tar.bz2
dexon-solidity-fd275b6d37dcd6d57a914c6d26d9de10d4dadb1f.tar.lz
dexon-solidity-fd275b6d37dcd6d57a914c6d26d9de10d4dadb1f.tar.xz
dexon-solidity-fd275b6d37dcd6d57a914c6d26d9de10d4dadb1f.tar.zst
dexon-solidity-fd275b6d37dcd6d57a914c6d26d9de10d4dadb1f.zip
fixed msvc not expanding macros correctly
-rw-r--r--CMakeLists.txt1
-rw-r--r--solidityCompiler.cpp7
-rw-r--r--solidityExpressionCompiler.cpp4
3 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f862de24..7cedc117 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ cmake_policy(SET CMP0015 NEW)
aux_source_directory(. SRC_LIST)
list(REMOVE_ITEM SRC_LIST "./createRandomTest.cpp")
+include_directories(${Boost_INCLUDE_DIRS})
include_directories(${CRYPTOPP_INCLUDE_DIRS})
include_directories(${JSONCPP_INCLUDE_DIRS})
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
diff --git a/solidityCompiler.cpp b/solidityCompiler.cpp
index be2c8383..385a3e57 100644
--- a/solidityCompiler.cpp
+++ b/solidityCompiler.cpp
@@ -52,17 +52,18 @@ bytes compileContract(const string& _sourceCode)
resolver.registerDeclarations(*sourceUnit);
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
+ {
BOOST_REQUIRE_NO_THROW(resolver.resolveNamesAndTypes(*contract));
+ }
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
+ {
BOOST_REQUIRE_NO_THROW(resolver.checkTypeRequirements(*contract));
+ }
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
{
Compiler compiler;
-
- // clang requires explicit initialization of map
- // http://stackoverflow.com/questions/17264067/chosen-constructor-is-explicit-in-copy-initialization-error-with-clang-4-2
compiler.compileContract(*contract, {}, map<ContractDefinition const*, bytes const*>{});
// debug
diff --git a/solidityExpressionCompiler.cpp b/solidityExpressionCompiler.cpp
index 2bdc3842..9c375418 100644
--- a/solidityExpressionCompiler.cpp
+++ b/solidityExpressionCompiler.cpp
@@ -95,10 +95,14 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _
resolver.registerDeclarations(*sourceUnit);
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
+ {
BOOST_REQUIRE_NO_THROW(resolver.resolveNamesAndTypes(*contract));
+ }
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
+ {
BOOST_REQUIRE_NO_THROW(resolver.checkTypeRequirements(*contract));
+ }
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
{