aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-15 00:34:27 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-15 00:34:27 +0100
commit331e5c36b4721b20a18156505be74e123e58bb55 (patch)
treeb16e555fd9666e2c72aa360de5703c74a8f7e884 /cmd
parent3705ec154f2700d1b3c60ce56626cc520fb3e068 (diff)
expose context
Diffstat (limited to 'cmd')
-rw-r--r--cmd/eval/main.go8
-rw-r--r--cmd/j1e/main.go8
2 files changed, 12 insertions, 4 deletions
diff --git a/cmd/eval/main.go b/cmd/eval/main.go
index b9518f3..a5fa686 100644
--- a/cmd/eval/main.go
+++ b/cmd/eval/main.go
@@ -1,11 +1,15 @@
package main
-import "dim13.org/j1"
+import (
+ "context"
+
+ "dim13.org/j1"
+)
func main() {
vm := j1.New()
if err := vm.LoadFile("testdata/j1e.bin"); err != nil {
panic(err)
}
- vm.Run()
+ vm.Run(context.Background())
}
diff --git a/cmd/j1e/main.go b/cmd/j1e/main.go
index 65cf626..057e106 100644
--- a/cmd/j1e/main.go
+++ b/cmd/j1e/main.go
@@ -2,10 +2,14 @@ package main
//go:generate file2go -in ../../testdata/j1e.bin
-import "dim13.org/j1"
+import (
+ "context"
+
+ "dim13.org/j1"
+)
func main() {
vm := j1.New()
vm.LoadBytes(J1eBin)
- vm.Run()
+ vm.Run(context.Background())
}