compiler: allow to split main package across multiple files

This commit is contained in:
Evgenii Stratonikov 2020-08-10 18:23:45 +03:00
parent 553e57c2c4
commit a34ba92d46
6 changed files with 63 additions and 33 deletions

View file

@ -6,7 +6,6 @@ import (
"encoding/hex"
"errors"
"fmt"
"io/ioutil"
"math/big"
"os"
"strconv"
@ -306,12 +305,7 @@ func handleLoadGo(c *ishell.Context) {
c.Err(errors.New("missing parameter <file>"))
return
}
fb, err := ioutil.ReadFile(c.Args[0])
if err != nil {
c.Err(err)
return
}
b, err := compiler.Compile(c.Args[0], bytes.NewReader(fb))
b, err := compiler.Compile(c.Args[0], nil)
if err != nil {
c.Err(err)
return