diff options
author | Gav Wood <i@gavwood.com> | 2015-01-25 09:52:42 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-01-25 09:52:42 +0800 |
commit | 3343d408e1d521d429454bce68a06986675975a3 (patch) | |
tree | 3582173f76bef57f893c27b17409fb1041178c76 /CompilerStack.cpp | |
parent | 5b576e869181c0f466e080d6d6476335d45c11e0 (diff) | |
download | dexon-solidity-3343d408e1d521d429454bce68a06986675975a3.tar.gz dexon-solidity-3343d408e1d521d429454bce68a06986675975a3.tar.zst dexon-solidity-3343d408e1d521d429454bce68a06986675975a3.zip |
Minor fix.
Diffstat (limited to 'CompilerStack.cpp')
-rw-r--r-- | CompilerStack.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CompilerStack.cpp b/CompilerStack.cpp index 86e97ef0..229afe54 100644 --- a/CompilerStack.cpp +++ b/CompilerStack.cpp @@ -125,7 +125,7 @@ void CompilerStack::compile(bool _optimize) } } -const map<string, string> StandardSources = { +const map<string, string> StandardSources = map<string, string>{ /* { "Config", "contract Config{function lookup(uint256 service)constant returns(address a){}function kill(){}function unregister(uint256 id){}function register(uint256 id,address service){}}" }, { "owned", "contract owned{function owned(){owner = msg.sender;}address owner;}" }, { "mortal", "import \"owned\";\ncontract mortal is owned {function kill() { if (msg.sender == owner) suicide(owner); }}" }, @@ -134,9 +134,12 @@ const map<string, string> StandardSources = { { "std", "import \"owned\";\nimport \"mortal\";\nimport \"Config\";\nimport \"NameReg\";\nimport \"named\";\n" }, */}; +////// BEGIN: TEMPORARY ONLY +/// remove once import works properly and we have genesis contracts + string CompilerStack::expanded(string const& _sourceCode) { - const map<string, string> c_standardSources = { + const map<string, string> c_standardSources = map<string, string>{ { "Config", "contract Config{function lookup(uint256 service)constant returns(address a){}function kill(){}function unregister(uint256 id){}function register(uint256 id,address service){}}" }, { "owned", "contract owned{function owned(){owner = msg.sender;}address owner;}" }, { "mortal", "#require owned\ncontract mortal is owned {function kill() { if (msg.sender == owner) suicide(owner); }}" }, @@ -174,6 +177,8 @@ string CompilerStack::expanded(string const& _sourceCode) return sub + localExpanded(_sourceCode); } +////// END: TEMPORARY ONLY + bytes const& CompilerStack::compile(string const& _sourceCode, bool _optimize) { parse(_sourceCode); |