aboutsummaryrefslogtreecommitdiff
path: root/cmd/interpreter
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-10-10 20:59:35 +0200
committerPřemysl Janouch <p@janouch.name>2018-10-10 21:12:35 +0200
commit2fe3c4753fb790ad5ebde3fcbca056370ece9cb9 (patch)
tree484502b5b3d5673c395a454aacde8b62e6ef78a6 /cmd/interpreter
parent2717cd569bfa9eda3600ad4b9d88fc36eeda42e7 (diff)
downloadell-2fe3c4753fb790ad5ebde3fcbca056370ece9cb9.tar.gz
ell-2fe3c4753fb790ad5ebde3fcbca056370ece9cb9.tar.xz
ell-2fe3c4753fb790ad5ebde3fcbca056370ece9cb9.zip
Go: make use of multiple return valuesslices
Diffstat (limited to 'cmd/interpreter')
-rw-r--r--cmd/interpreter/main.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/interpreter/main.go b/cmd/interpreter/main.go
index bd70af3..e0001a2 100644
--- a/cmd/interpreter/main.go
+++ b/cmd/interpreter/main.go
@@ -53,9 +53,7 @@ func main() {
for i := 2; i < len(os.Args); i++ {
args = append(args, *ell.NewString(os.Args[i]))
}
-
- var result []ell.V
- if !L.EvalBlock(program, args, &result) {
+ if _, ok := L.EvalBlock(program, args); !ok {
fmt.Printf("%s: %s\n", "runtime error", L.Error)
}
}