diff options
author | zelig <viktor.tron@gmail.com> | 2014-07-05 02:40:23 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-07-05 02:40:23 +0800 |
commit | 44d0d6abd26bcaca0e1caecf798183b45fb2365a (patch) | |
tree | e147ba512e7a78b1a5e539f469a76617cc28c8ce /ethutil | |
parent | 0c6f1c9c3aaba8e5a15ed50e90e65dd344afef8a (diff) | |
parent | 90eb4f1939f7b0389d5784b889cc0e5d2b3451f7 (diff) | |
download | dexon-44d0d6abd26bcaca0e1caecf798183b45fb2365a.tar dexon-44d0d6abd26bcaca0e1caecf798183b45fb2365a.tar.gz dexon-44d0d6abd26bcaca0e1caecf798183b45fb2365a.tar.bz2 dexon-44d0d6abd26bcaca0e1caecf798183b45fb2365a.tar.lz dexon-44d0d6abd26bcaca0e1caecf798183b45fb2365a.tar.xz dexon-44d0d6abd26bcaca0e1caecf798183b45fb2365a.tar.zst dexon-44d0d6abd26bcaca0e1caecf798183b45fb2365a.zip |
Merge branch 'develop' of github.com:ethereum/eth-go into feature/ethutil-refactor
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/script.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ethutil/script.go b/ethutil/script.go index aaa0f8ed8..f5c53f84c 100644 --- a/ethutil/script.go +++ b/ethutil/script.go @@ -9,11 +9,11 @@ import ( ) // General compile function -func Compile(script string) (ret []byte, err error) { +func Compile(script string, silent bool) (ret []byte, err error) { if len(script) > 2 { line := strings.Split(script, "\n")[0] - if line[0:2] == "#!" { + if len(line) > 1 && line[0:2] == "#!" { switch line { case "#!serpent": byteCode, err := serpent.Compile(script) @@ -26,6 +26,7 @@ func Compile(script string) (ret []byte, err error) { } else { compiler := mutan.NewCompiler(backend.NewEthereumBackend()) + compiler.Silent = silent byteCode, errors := compiler.Compile(strings.NewReader(script)) if len(errors) > 0 { var errs string |