diff --git a/check.anko b/check.anko
new file mode 100644
index 0000000..1467f34
--- /dev/null
+++ b/check.anko
@@ -0,0 +1,8 @@
+e = 5
+v = 53
+println(e + v)
+
+if v < 55 {
+ println("it fucking works")
+}
+
diff --git a/src/cmd/goblin/main.go b/src/cmd/goblin/main.go
index fc66c32..42336dc 100644
--- a/src/cmd/goblin/main.go
+++ b/src/cmd/goblin/main.go
@@ -1,6 +1,8 @@
package main
import (
+ "github.com/surdeus/gomtool/src/mtool"
+
"github.com/surdeus/goblin/src/tool/awk"
"github.com/surdeus/goblin/src/tool/basename"
"github.com/surdeus/goblin/src/tool/cat"
@@ -29,8 +31,7 @@ import (
"github.com/surdeus/goblin/src/tool/wc"
"github.com/surdeus/goblin/src/tool/whoami"
"github.com/surdeus/goblin/src/tool/yes"
- "github.com/surdeus/goblin/src/tool/run"
- "github.com/surdeus/gomtool/src/mtool"
+ "github.com/surdeus/goblin/src/tool/anko"
)
func main() {
@@ -75,9 +76,9 @@ func main() {
"link files",
"",
},
- "run": mtool.Tool{
- run.Run,
- "run anko script",
+ "anko": mtool.Tool{
+ anko.Run,
+ "run embedded anko",
"",
},
}
diff --git a/src/tool/run/.github/FUNDING.yml b/src/tool/anko/.github/FUNDING.yml
similarity index 100%
rename from src/tool/run/.github/FUNDING.yml
rename to src/tool/anko/.github/FUNDING.yml
diff --git a/src/tool/run/.travis.yml b/src/tool/anko/.travis.yml
similarity index 100%
rename from src/tool/run/.travis.yml
rename to src/tool/anko/.travis.yml
diff --git a/src/tool/run/LICENSE b/src/tool/anko/LICENSE
similarity index 100%
rename from src/tool/run/LICENSE
rename to src/tool/anko/LICENSE
diff --git a/src/tool/run/README.md b/src/tool/anko/README.md
similarity index 87%
rename from src/tool/run/README.md
rename to src/tool/anko/README.md
index b785465..880d493 100644
--- a/src/tool/run/README.md
+++ b/src/tool/anko/README.md
@@ -1,9 +1,9 @@
# Anko
-[![GoDoc Reference](https://godoc.org/github.com/surdeus/goblin/src/tool/run/vm?status.svg)](http://godoc.org/github.com/surdeus/goblin/src/tool/run/vm)
+[![GoDoc Reference](https://godoc.org/github.com/surdeus/goblin/src/tool/anko/vm?status.svg)](http://godoc.org/github.com/surdeus/goblin/src/tool/anko/vm)
[![Build Status](https://travis-ci.org/mattn/anko.svg?branch=master)](https://travis-ci.org/mattn/anko)
[![Financial Contributors on Open Collective](https://opencollective.com/mattn-anko/all/badge.svg?label=financial+contributors)](https://opencollective.com/mattn-anko) [![Coverage](https://codecov.io/gh/mattn/anko/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/anko)
-[![Go Report Card](https://goreportcard.com/badge/github.com/surdeus/goblin/src/tool/run)](https://goreportcard.com/report/github.com/surdeus/goblin/src/tool/run)
+[![Go Report Card](https://goreportcard.com/badge/github.com/surdeus/goblin/src/tool/anko)](https://goreportcard.com/report/github.com/surdeus/goblin/src/tool/anko)
Anko is a scriptable interpreter written in Go.
@@ -21,8 +21,8 @@ import (
"fmt"
"log"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
func main() {
@@ -48,15 +48,15 @@ println("Hello World :)")
More examples are located in the GoDoc:
-https://godoc.org/github.com/surdeus/goblin/src/tool/run/vm
+https://godoc.org/github.com/surdeus/goblin/src/tool/anko/vm
## Usage Example - Command Line
### Building
```
-go get github.com/surdeus/goblin/src/tool/run
-go install github.com/surdeus/goblin/src/tool/run
+go get github.com/surdeus/goblin/src/tool/anko
+go install github.com/surdeus/goblin/src/tool/anko
```
### Running an Anko script file named script.ank
@@ -129,7 +129,7 @@ Yasuhiro Matsumoto (a.k.a mattn)
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
-
+
### Financial Contributors
diff --git a/src/tool/run/_example/scripts/anonymous-call.ank b/src/tool/anko/_example/scripts/anonymous-call.ank
similarity index 100%
rename from src/tool/run/_example/scripts/anonymous-call.ank
rename to src/tool/anko/_example/scripts/anonymous-call.ank
diff --git a/src/tool/run/_example/scripts/chan.ank b/src/tool/anko/_example/scripts/chan.ank
similarity index 100%
rename from src/tool/run/_example/scripts/chan.ank
rename to src/tool/anko/_example/scripts/chan.ank
diff --git a/src/tool/run/_example/scripts/env.ank b/src/tool/anko/_example/scripts/env.ank
similarity index 100%
rename from src/tool/run/_example/scripts/env.ank
rename to src/tool/anko/_example/scripts/env.ank
diff --git a/src/tool/run/_example/scripts/example.ank b/src/tool/anko/_example/scripts/example.ank
similarity index 100%
rename from src/tool/run/_example/scripts/example.ank
rename to src/tool/anko/_example/scripts/example.ank
diff --git a/src/tool/run/_example/scripts/exec.ank b/src/tool/anko/_example/scripts/exec.ank
similarity index 100%
rename from src/tool/run/_example/scripts/exec.ank
rename to src/tool/anko/_example/scripts/exec.ank
diff --git a/src/tool/run/_example/scripts/fib-for.ank b/src/tool/anko/_example/scripts/fib-for.ank
similarity index 100%
rename from src/tool/run/_example/scripts/fib-for.ank
rename to src/tool/anko/_example/scripts/fib-for.ank
diff --git a/src/tool/run/_example/scripts/fib-recursion.ank b/src/tool/anko/_example/scripts/fib-recursion.ank
similarity index 100%
rename from src/tool/run/_example/scripts/fib-recursion.ank
rename to src/tool/anko/_example/scripts/fib-recursion.ank
diff --git a/src/tool/run/_example/scripts/for-break-continue.ank b/src/tool/anko/_example/scripts/for-break-continue.ank
similarity index 100%
rename from src/tool/run/_example/scripts/for-break-continue.ank
rename to src/tool/anko/_example/scripts/for-break-continue.ank
diff --git a/src/tool/run/_example/scripts/http.ank b/src/tool/anko/_example/scripts/http.ank
similarity index 100%
rename from src/tool/run/_example/scripts/http.ank
rename to src/tool/anko/_example/scripts/http.ank
diff --git a/src/tool/run/_example/scripts/module.ank b/src/tool/anko/_example/scripts/module.ank
similarity index 100%
rename from src/tool/run/_example/scripts/module.ank
rename to src/tool/anko/_example/scripts/module.ank
diff --git a/src/tool/run/_example/scripts/regexp.ank b/src/tool/anko/_example/scripts/regexp.ank
similarity index 100%
rename from src/tool/run/_example/scripts/regexp.ank
rename to src/tool/anko/_example/scripts/regexp.ank
diff --git a/src/tool/run/_example/scripts/server.ank b/src/tool/anko/_example/scripts/server.ank
similarity index 100%
rename from src/tool/run/_example/scripts/server.ank
rename to src/tool/anko/_example/scripts/server.ank
diff --git a/src/tool/run/_example/scripts/signal.ank b/src/tool/anko/_example/scripts/signal.ank
similarity index 100%
rename from src/tool/run/_example/scripts/signal.ank
rename to src/tool/anko/_example/scripts/signal.ank
diff --git a/src/tool/run/_example/scripts/slice.ank b/src/tool/anko/_example/scripts/slice.ank
similarity index 100%
rename from src/tool/run/_example/scripts/slice.ank
rename to src/tool/anko/_example/scripts/slice.ank
diff --git a/src/tool/run/_example/scripts/socket.ank b/src/tool/anko/_example/scripts/socket.ank
similarity index 100%
rename from src/tool/run/_example/scripts/socket.ank
rename to src/tool/anko/_example/scripts/socket.ank
diff --git a/src/tool/run/_example/scripts/toType.ank b/src/tool/anko/_example/scripts/toType.ank
similarity index 100%
rename from src/tool/run/_example/scripts/toType.ank
rename to src/tool/anko/_example/scripts/toType.ank
diff --git a/src/tool/run/_example/scripts/try-catch.ank b/src/tool/anko/_example/scripts/try-catch.ank
similarity index 100%
rename from src/tool/run/_example/scripts/try-catch.ank
rename to src/tool/anko/_example/scripts/try-catch.ank
diff --git a/src/tool/run/_example/scripts/url.ank b/src/tool/anko/_example/scripts/url.ank
similarity index 100%
rename from src/tool/run/_example/scripts/url.ank
rename to src/tool/anko/_example/scripts/url.ank
diff --git a/src/tool/run/_example/scripts/z-combinator.ank b/src/tool/anko/_example/scripts/z-combinator.ank
similarity index 100%
rename from src/tool/run/_example/scripts/z-combinator.ank
rename to src/tool/anko/_example/scripts/z-combinator.ank
diff --git a/src/tool/run/anko.go b/src/tool/anko/anko.go
similarity index 88%
rename from src/tool/run/anko.go
rename to src/tool/anko/anko.go
index 89b5b9e..a9c6eb4 100644
--- a/src/tool/run/anko.go
+++ b/src/tool/anko/anko.go
@@ -1,6 +1,6 @@
// +build !appengine
-package run
+package anko
import (
"bufio"
@@ -11,11 +11,11 @@ import (
"os"
"strings"
- "github.com/surdeus/goblin/src/tool/run/core"
- "github.com/surdeus/goblin/src/tool/run/env"
- _ "github.com/surdeus/goblin/src/tool/run/packages"
- "github.com/surdeus/goblin/src/tool/run/parser"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/core"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ _ "github.com/surdeus/goblin/src/tool/anko/packages"
+ "github.com/surdeus/goblin/src/tool/anko/parser"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
"github.com/surdeus/gomtool/src/mtool"
"os/exec"
)
@@ -43,11 +43,9 @@ func Run(flagSet *mtool.Flags) {
parseFlags()
setupEnv()
- if flagExecute != "" || flag.NArg() > 0 {
- exitCode = runNonInteractive()
- } else {
- exitCode = runInteractive()
- }
+ exitCode = runNonInteractive()
+ //if flagExecute != "" || flag.NArg() > 0 {
+ //}
os.Exit(exitCode)
}
@@ -161,7 +159,15 @@ func runNonInteractive() int {
if flagExecute != "" {
source = flagExecute
} else {
- sourceBytes, err := ioutil.ReadFile(file)
+ var (
+ sourceBytes []byte
+ err error
+ )
+ if file == "#stdin" {
+ sourceBytes, err = io.ReadAll(os.Stdin)
+ } else {
+ sourceBytes, err = ioutil.ReadFile(file)
+ }
if err != nil {
fmt.Println("ReadFile error:", err)
return 2
diff --git a/src/tool/run/anko.png b/src/tool/anko/anko.png
similarity index 100%
rename from src/tool/run/anko.png
rename to src/tool/anko/anko.png
diff --git a/src/tool/run/anko_test.go b/src/tool/anko/anko_test.go
similarity index 99%
rename from src/tool/run/anko_test.go
rename to src/tool/anko/anko_test.go
index 9c7fe8a..d0953fb 100644
--- a/src/tool/run/anko_test.go
+++ b/src/tool/anko/anko_test.go
@@ -1,6 +1,6 @@
// +build !appengine
-package run
+package anko
import (
"bufio"
diff --git a/src/tool/run/ast/ast.go b/src/tool/anko/ast/ast.go
similarity index 100%
rename from src/tool/run/ast/ast.go
rename to src/tool/anko/ast/ast.go
diff --git a/src/tool/run/ast/astutil/walk.go b/src/tool/anko/ast/astutil/walk.go
similarity index 99%
rename from src/tool/run/ast/astutil/walk.go
rename to src/tool/anko/ast/astutil/walk.go
index 00fa54e..9621cf7 100644
--- a/src/tool/run/ast/astutil/walk.go
+++ b/src/tool/anko/ast/astutil/walk.go
@@ -6,7 +6,7 @@ import (
"fmt"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/ast"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
)
// WalkFunc is used in Walk to walk the AST
diff --git a/src/tool/run/ast/astutil/walk_test.go b/src/tool/anko/ast/astutil/walk_test.go
similarity index 97%
rename from src/tool/run/ast/astutil/walk_test.go
rename to src/tool/anko/ast/astutil/walk_test.go
index 0b979de..0280723 100644
--- a/src/tool/run/ast/astutil/walk_test.go
+++ b/src/tool/anko/ast/astutil/walk_test.go
@@ -5,8 +5,8 @@ import (
"fmt"
"testing"
- "github.com/surdeus/goblin/src/tool/run/ast"
- "github.com/surdeus/goblin/src/tool/run/parser"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
+ "github.com/surdeus/goblin/src/tool/anko/parser"
)
const (
diff --git a/src/tool/run/ast/doc.go b/src/tool/anko/ast/doc.go
similarity index 100%
rename from src/tool/run/ast/doc.go
rename to src/tool/anko/ast/doc.go
diff --git a/src/tool/run/ast/expr.go b/src/tool/anko/ast/expr.go
similarity index 100%
rename from src/tool/run/ast/expr.go
rename to src/tool/anko/ast/expr.go
diff --git a/src/tool/run/ast/operator.go b/src/tool/anko/ast/operator.go
similarity index 100%
rename from src/tool/run/ast/operator.go
rename to src/tool/anko/ast/operator.go
diff --git a/src/tool/run/ast/pos.go b/src/tool/anko/ast/pos.go
similarity index 100%
rename from src/tool/run/ast/pos.go
rename to src/tool/anko/ast/pos.go
diff --git a/src/tool/run/ast/stmt.go b/src/tool/anko/ast/stmt.go
similarity index 100%
rename from src/tool/run/ast/stmt.go
rename to src/tool/anko/ast/stmt.go
diff --git a/src/tool/run/cmd/anko-package-gen/main.go b/src/tool/anko/cmd/anko-package-gen/main.go
similarity index 100%
rename from src/tool/run/cmd/anko-package-gen/main.go
rename to src/tool/anko/cmd/anko-package-gen/main.go
diff --git a/src/tool/run/core/core.go b/src/tool/anko/core/core.go
similarity index 93%
rename from src/tool/run/core/core.go
rename to src/tool/anko/core/core.go
index 0c8a2aa..bdec440 100644
--- a/src/tool/run/core/core.go
+++ b/src/tool/anko/core/core.go
@@ -6,9 +6,9 @@ import (
"io/ioutil"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/parser"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/parser"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
// Import defines core language builtins - keys, range, println, etc.
diff --git a/src/tool/run/core/testdata/broken.ank b/src/tool/anko/core/testdata/broken.ank
similarity index 100%
rename from src/tool/run/core/testdata/broken.ank
rename to src/tool/anko/core/testdata/broken.ank
diff --git a/src/tool/run/core/testdata/chan.ank b/src/tool/anko/core/testdata/chan.ank
similarity index 100%
rename from src/tool/run/core/testdata/chan.ank
rename to src/tool/anko/core/testdata/chan.ank
diff --git a/src/tool/run/core/testdata/core_test.go b/src/tool/anko/core/testdata/core_test.go
similarity index 98%
rename from src/tool/run/core/testdata/core_test.go
rename to src/tool/anko/core/testdata/core_test.go
index 31210af..33df632 100644
--- a/src/tool/run/core/testdata/core_test.go
+++ b/src/tool/anko/core/testdata/core_test.go
@@ -7,8 +7,8 @@ import (
"strings"
"testing"
- "github.com/surdeus/goblin/src/tool/run/packages"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/packages"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
var testCoreEnvSetupFunc = func(t *testing.T, env corelib.Env) { Import(env.(*vm.Env)) }
diff --git a/src/tool/run/core/testdata/error.ank b/src/tool/anko/core/testdata/error.ank
similarity index 100%
rename from src/tool/run/core/testdata/error.ank
rename to src/tool/anko/core/testdata/error.ank
diff --git a/src/tool/run/core/testdata/for.ank b/src/tool/anko/core/testdata/for.ank
similarity index 100%
rename from src/tool/run/core/testdata/for.ank
rename to src/tool/anko/core/testdata/for.ank
diff --git a/src/tool/run/core/testdata/func.ank b/src/tool/anko/core/testdata/func.ank
similarity index 100%
rename from src/tool/run/core/testdata/func.ank
rename to src/tool/anko/core/testdata/func.ank
diff --git a/src/tool/run/core/testdata/if.ank b/src/tool/anko/core/testdata/if.ank
similarity index 100%
rename from src/tool/run/core/testdata/if.ank
rename to src/tool/anko/core/testdata/if.ank
diff --git a/src/tool/run/core/testdata/len.ank b/src/tool/anko/core/testdata/len.ank
similarity index 100%
rename from src/tool/run/core/testdata/len.ank
rename to src/tool/anko/core/testdata/len.ank
diff --git a/src/tool/run/core/testdata/let.ank b/src/tool/anko/core/testdata/let.ank
similarity index 100%
rename from src/tool/run/core/testdata/let.ank
rename to src/tool/anko/core/testdata/let.ank
diff --git a/src/tool/run/core/testdata/op.ank b/src/tool/anko/core/testdata/op.ank
similarity index 100%
rename from src/tool/run/core/testdata/op.ank
rename to src/tool/anko/core/testdata/op.ank
diff --git a/src/tool/run/core/testdata/sort.ank b/src/tool/anko/core/testdata/sort.ank
similarity index 100%
rename from src/tool/run/core/testdata/sort.ank
rename to src/tool/anko/core/testdata/sort.ank
diff --git a/src/tool/run/core/testdata/switch.ank b/src/tool/anko/core/testdata/switch.ank
similarity index 100%
rename from src/tool/run/core/testdata/switch.ank
rename to src/tool/anko/core/testdata/switch.ank
diff --git a/src/tool/run/core/testdata/test.ank b/src/tool/anko/core/testdata/test.ank
similarity index 100%
rename from src/tool/run/core/testdata/test.ank
rename to src/tool/anko/core/testdata/test.ank
diff --git a/src/tool/run/core/testdata/testing.ank b/src/tool/anko/core/testdata/testing.ank
similarity index 100%
rename from src/tool/run/core/testdata/testing.ank
rename to src/tool/anko/core/testdata/testing.ank
diff --git a/src/tool/run/core/testdata/toBytes.ank b/src/tool/anko/core/testdata/toBytes.ank
similarity index 100%
rename from src/tool/run/core/testdata/toBytes.ank
rename to src/tool/anko/core/testdata/toBytes.ank
diff --git a/src/tool/run/core/testdata/toRunes.ank b/src/tool/anko/core/testdata/toRunes.ank
similarity index 100%
rename from src/tool/run/core/testdata/toRunes.ank
rename to src/tool/anko/core/testdata/toRunes.ank
diff --git a/src/tool/run/core/testdata/toString.ank b/src/tool/anko/core/testdata/toString.ank
similarity index 100%
rename from src/tool/run/core/testdata/toString.ank
rename to src/tool/anko/core/testdata/toString.ank
diff --git a/src/tool/run/core/testdata/toX_test.go b/src/tool/anko/core/testdata/toX_test.go
similarity index 99%
rename from src/tool/run/core/testdata/toX_test.go
rename to src/tool/anko/core/testdata/toX_test.go
index fd42a5c..3eeeebb 100644
--- a/src/tool/run/core/testdata/toX_test.go
+++ b/src/tool/anko/core/testdata/toX_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- "github.com/surdeus/goblin/src/tool/run/internal/testlib"
+ "github.com/surdeus/goblin/src/tool/anko/internal/testlib"
)
func TestToX(t *testing.T) {
diff --git a/src/tool/run/core/toX.go b/src/tool/anko/core/toX.go
similarity index 98%
rename from src/tool/run/core/toX.go
rename to src/tool/anko/core/toX.go
index 0147491..231fe2f 100644
--- a/src/tool/run/core/toX.go
+++ b/src/tool/anko/core/toX.go
@@ -7,7 +7,7 @@ import (
"strings"
"time"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
// ImportToX adds all the toX to the env given
diff --git a/src/tool/run/env/env.go b/src/tool/anko/env/env.go
similarity index 100%
rename from src/tool/run/env/env.go
rename to src/tool/anko/env/env.go
diff --git a/src/tool/run/env/envExternalLookup_test.go b/src/tool/anko/env/envExternalLookup_test.go
similarity index 100%
rename from src/tool/run/env/envExternalLookup_test.go
rename to src/tool/anko/env/envExternalLookup_test.go
diff --git a/src/tool/run/env/envTypes.go b/src/tool/anko/env/envTypes.go
similarity index 100%
rename from src/tool/run/env/envTypes.go
rename to src/tool/anko/env/envTypes.go
diff --git a/src/tool/run/env/envTypes_test.go b/src/tool/anko/env/envTypes_test.go
similarity index 100%
rename from src/tool/run/env/envTypes_test.go
rename to src/tool/anko/env/envTypes_test.go
diff --git a/src/tool/run/env/envValues.go b/src/tool/anko/env/envValues.go
similarity index 100%
rename from src/tool/run/env/envValues.go
rename to src/tool/anko/env/envValues.go
diff --git a/src/tool/run/env/envValues_test.go b/src/tool/anko/env/envValues_test.go
similarity index 100%
rename from src/tool/run/env/envValues_test.go
rename to src/tool/anko/env/envValues_test.go
diff --git a/src/tool/run/env/env_test.go b/src/tool/anko/env/env_test.go
similarity index 100%
rename from src/tool/run/env/env_test.go
rename to src/tool/anko/env/env_test.go
diff --git a/src/tool/run/misc/vim/ftdetect/ank.vim b/src/tool/anko/misc/vim/ftdetect/ank.vim
similarity index 100%
rename from src/tool/run/misc/vim/ftdetect/ank.vim
rename to src/tool/anko/misc/vim/ftdetect/ank.vim
diff --git a/src/tool/run/misc/vim/ftplugin/anko/comment.vim b/src/tool/anko/misc/vim/ftplugin/anko/comment.vim
similarity index 100%
rename from src/tool/run/misc/vim/ftplugin/anko/comment.vim
rename to src/tool/anko/misc/vim/ftplugin/anko/comment.vim
diff --git a/src/tool/run/misc/vim/ftplugin/anko/play.vim b/src/tool/anko/misc/vim/ftplugin/anko/play.vim
similarity index 100%
rename from src/tool/run/misc/vim/ftplugin/anko/play.vim
rename to src/tool/anko/misc/vim/ftplugin/anko/play.vim
diff --git a/src/tool/run/misc/vim/syntax/anko.vim b/src/tool/anko/misc/vim/syntax/anko.vim
similarity index 100%
rename from src/tool/run/misc/vim/syntax/anko.vim
rename to src/tool/anko/misc/vim/syntax/anko.vim
diff --git a/src/tool/run/misc/wasm/anko.go b/src/tool/anko/misc/wasm/anko.go
similarity index 93%
rename from src/tool/run/misc/wasm/anko.go
rename to src/tool/anko/misc/wasm/anko.go
index 944d93a..44e412f 100644
--- a/src/tool/run/misc/wasm/anko.go
+++ b/src/tool/anko/misc/wasm/anko.go
@@ -8,10 +8,10 @@ import (
"strings"
"syscall/js"
- "github.com/surdeus/goblin/src/tool/run/core"
- "github.com/surdeus/goblin/src/tool/run/packages"
- "github.com/surdeus/goblin/src/tool/run/parser"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/core"
+ "github.com/surdeus/goblin/src/tool/anko/packages"
+ "github.com/surdeus/goblin/src/tool/anko/parser"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
var (
diff --git a/src/tool/run/misc/wasm/index.html b/src/tool/anko/misc/wasm/index.html
similarity index 100%
rename from src/tool/run/misc/wasm/index.html
rename to src/tool/anko/misc/wasm/index.html
diff --git a/src/tool/run/misc/wasm/wasm_exec.js b/src/tool/anko/misc/wasm/wasm_exec.js
similarity index 100%
rename from src/tool/run/misc/wasm/wasm_exec.js
rename to src/tool/anko/misc/wasm/wasm_exec.js
diff --git a/src/tool/run/packages/bytes.go b/src/tool/anko/packages/bytes.go
similarity index 98%
rename from src/tool/run/packages/bytes.go
rename to src/tool/anko/packages/bytes.go
index 650c208..ed610f4 100644
--- a/src/tool/run/packages/bytes.go
+++ b/src/tool/anko/packages/bytes.go
@@ -4,7 +4,7 @@ import (
"bytes"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/bytesGo17.go b/src/tool/anko/packages/bytesGo17.go
similarity index 77%
rename from src/tool/run/packages/bytesGo17.go
rename to src/tool/anko/packages/bytesGo17.go
index 4ef560f..c78f1cd 100644
--- a/src/tool/run/packages/bytesGo17.go
+++ b/src/tool/anko/packages/bytesGo17.go
@@ -6,7 +6,7 @@ import (
"bytes"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func bytesGo17() {
diff --git a/src/tool/run/packages/bytesNotGo17.go b/src/tool/anko/packages/bytesNotGo17.go
similarity index 100%
rename from src/tool/run/packages/bytesNotGo17.go
rename to src/tool/anko/packages/bytesNotGo17.go
diff --git a/src/tool/run/packages/encoding.json.go b/src/tool/anko/packages/encoding.json.go
similarity index 83%
rename from src/tool/run/packages/encoding.json.go
rename to src/tool/anko/packages/encoding.json.go
index 2fe2477..5652714 100644
--- a/src/tool/run/packages/encoding.json.go
+++ b/src/tool/anko/packages/encoding.json.go
@@ -4,7 +4,7 @@ import (
"encoding/json"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/errors.go b/src/tool/anko/packages/errors.go
similarity index 77%
rename from src/tool/run/packages/errors.go
rename to src/tool/anko/packages/errors.go
index cf56660..1880c1e 100644
--- a/src/tool/run/packages/errors.go
+++ b/src/tool/anko/packages/errors.go
@@ -4,7 +4,7 @@ import (
"errors"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/flag.go b/src/tool/anko/packages/flag.go
similarity index 97%
rename from src/tool/run/packages/flag.go
rename to src/tool/anko/packages/flag.go
index 538f975..76b9f37 100644
--- a/src/tool/run/packages/flag.go
+++ b/src/tool/anko/packages/flag.go
@@ -4,7 +4,7 @@ import (
"flag"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/fmt.go b/src/tool/anko/packages/fmt.go
similarity index 95%
rename from src/tool/run/packages/fmt.go
rename to src/tool/anko/packages/fmt.go
index d267740..26c4f2a 100644
--- a/src/tool/run/packages/fmt.go
+++ b/src/tool/anko/packages/fmt.go
@@ -4,7 +4,7 @@ import (
"fmt"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/io.go b/src/tool/anko/packages/io.go
similarity index 95%
rename from src/tool/run/packages/io.go
rename to src/tool/anko/packages/io.go
index eaa103b..31938fb 100644
--- a/src/tool/run/packages/io.go
+++ b/src/tool/anko/packages/io.go
@@ -4,7 +4,7 @@ import (
"io"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/io.ioutil.go b/src/tool/anko/packages/io.ioutil.go
similarity index 87%
rename from src/tool/run/packages/io.ioutil.go
rename to src/tool/anko/packages/io.ioutil.go
index 50cb0ba..d5726f4 100644
--- a/src/tool/run/packages/io.ioutil.go
+++ b/src/tool/anko/packages/io.ioutil.go
@@ -4,7 +4,7 @@ import (
"io/ioutil"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/log.go b/src/tool/anko/packages/log.go
similarity index 94%
rename from src/tool/run/packages/log.go
rename to src/tool/anko/packages/log.go
index e441792..b25b47e 100644
--- a/src/tool/run/packages/log.go
+++ b/src/tool/anko/packages/log.go
@@ -4,7 +4,7 @@ import (
"log"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/math.big.go b/src/tool/anko/packages/math.big.go
similarity index 89%
rename from src/tool/run/packages/math.big.go
rename to src/tool/anko/packages/math.big.go
index 8176e74..9380af9 100644
--- a/src/tool/run/packages/math.big.go
+++ b/src/tool/anko/packages/math.big.go
@@ -4,7 +4,7 @@ import (
"math/big"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
@@ -16,7 +16,7 @@ func init() {
"Jacobi": reflect.ValueOf(big.Jacobi),
"MaxBase": reflect.ValueOf(big.MaxBase),
"MaxExp": reflect.ValueOf(big.MaxExp),
- // TODO: https://github.com/surdeus/goblin/src/tool/run/issues/49
+ // TODO: https://github.com/surdeus/goblin/src/tool/anko/issues/49
// "MaxPrec": reflect.ValueOf(big.MaxPrec),
"MinExp": reflect.ValueOf(big.MinExp),
"NewFloat": reflect.ValueOf(big.NewFloat),
diff --git a/src/tool/run/packages/math.go b/src/tool/anko/packages/math.go
similarity index 98%
rename from src/tool/run/packages/math.go
rename to src/tool/anko/packages/math.go
index c20536c..9e7afb0 100644
--- a/src/tool/run/packages/math.go
+++ b/src/tool/anko/packages/math.go
@@ -4,7 +4,7 @@ import (
"math"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/math.rand.go b/src/tool/anko/packages/math.rand.go
similarity index 94%
rename from src/tool/run/packages/math.rand.go
rename to src/tool/anko/packages/math.rand.go
index cf68ca6..3274972 100644
--- a/src/tool/run/packages/math.rand.go
+++ b/src/tool/anko/packages/math.rand.go
@@ -4,7 +4,7 @@ import (
"math/rand"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/net.go b/src/tool/anko/packages/net.go
similarity index 98%
rename from src/tool/run/packages/net.go
rename to src/tool/anko/packages/net.go
index a068ba1..0f1be65 100644
--- a/src/tool/run/packages/net.go
+++ b/src/tool/anko/packages/net.go
@@ -6,7 +6,7 @@ import (
"net"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/net.http.cookiejar.go b/src/tool/anko/packages/net.http.cookiejar.go
similarity index 86%
rename from src/tool/run/packages/net.http.cookiejar.go
rename to src/tool/anko/packages/net.http.cookiejar.go
index 1fd0133..ffa3ec6 100644
--- a/src/tool/run/packages/net.http.cookiejar.go
+++ b/src/tool/anko/packages/net.http.cookiejar.go
@@ -4,7 +4,7 @@ import (
"net/http/cookiejar"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/net.http.go b/src/tool/anko/packages/net.http.go
similarity index 95%
rename from src/tool/run/packages/net.http.go
rename to src/tool/anko/packages/net.http.go
index 1fd5c1c..01cffc7 100644
--- a/src/tool/run/packages/net.http.go
+++ b/src/tool/anko/packages/net.http.go
@@ -6,7 +6,7 @@ import (
"net/http"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/net.url.go b/src/tool/anko/packages/net.url.go
similarity index 93%
rename from src/tool/run/packages/net.url.go
rename to src/tool/anko/packages/net.url.go
index 2c3b6d9..ffc306c 100644
--- a/src/tool/run/packages/net.url.go
+++ b/src/tool/anko/packages/net.url.go
@@ -6,7 +6,7 @@ import (
"net/url"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/os.exec.go b/src/tool/anko/packages/os.exec.go
similarity index 85%
rename from src/tool/run/packages/os.exec.go
rename to src/tool/anko/packages/os.exec.go
index 9fe49ea..516ac9f 100644
--- a/src/tool/run/packages/os.exec.go
+++ b/src/tool/anko/packages/os.exec.go
@@ -4,7 +4,7 @@ import (
"os/exec"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/os.go b/src/tool/anko/packages/os.go
similarity index 99%
rename from src/tool/run/packages/os.go
rename to src/tool/anko/packages/os.go
index ea01757..afe3e7d 100644
--- a/src/tool/run/packages/os.go
+++ b/src/tool/anko/packages/os.go
@@ -4,7 +4,7 @@ import (
"os"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/os.signal.go b/src/tool/anko/packages/os.signal.go
similarity index 82%
rename from src/tool/run/packages/os.signal.go
rename to src/tool/anko/packages/os.signal.go
index 4603c77..2b9bdfd 100644
--- a/src/tool/run/packages/os.signal.go
+++ b/src/tool/anko/packages/os.signal.go
@@ -4,7 +4,7 @@ import (
"os/signal"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/osAppEngine.go b/src/tool/anko/packages/osAppEngine.go
similarity index 100%
rename from src/tool/run/packages/osAppEngine.go
rename to src/tool/anko/packages/osAppEngine.go
diff --git a/src/tool/run/packages/osNotAppEngine.go b/src/tool/anko/packages/osNotAppEngine.go
similarity index 76%
rename from src/tool/run/packages/osNotAppEngine.go
rename to src/tool/anko/packages/osNotAppEngine.go
index 5997ea2..b9a20e9 100644
--- a/src/tool/run/packages/osNotAppEngine.go
+++ b/src/tool/anko/packages/osNotAppEngine.go
@@ -6,7 +6,7 @@ import (
"os"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func osNotAppEngine() {
diff --git a/src/tool/run/packages/path.filepath.go b/src/tool/anko/packages/path.filepath.go
similarity index 95%
rename from src/tool/run/packages/path.filepath.go
rename to src/tool/anko/packages/path.filepath.go
index 585c3a0..170adf4 100644
--- a/src/tool/run/packages/path.filepath.go
+++ b/src/tool/anko/packages/path.filepath.go
@@ -4,7 +4,7 @@ import (
"path/filepath"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/path.go b/src/tool/anko/packages/path.go
similarity index 92%
rename from src/tool/run/packages/path.go
rename to src/tool/anko/packages/path.go
index e615818..2e83447 100644
--- a/src/tool/run/packages/path.go
+++ b/src/tool/anko/packages/path.go
@@ -4,7 +4,7 @@ import (
"path"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/regexp.go b/src/tool/anko/packages/regexp.go
similarity index 92%
rename from src/tool/run/packages/regexp.go
rename to src/tool/anko/packages/regexp.go
index 96294bb..8e05dd9 100644
--- a/src/tool/run/packages/regexp.go
+++ b/src/tool/anko/packages/regexp.go
@@ -4,7 +4,7 @@ import (
"reflect"
"regexp"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/runtime.go b/src/tool/anko/packages/runtime.go
similarity index 89%
rename from src/tool/run/packages/runtime.go
rename to src/tool/anko/packages/runtime.go
index 22e9534..7277216 100644
--- a/src/tool/run/packages/runtime.go
+++ b/src/tool/anko/packages/runtime.go
@@ -4,7 +4,7 @@ import (
"reflect"
"runtime"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/sort.go b/src/tool/anko/packages/sort.go
similarity index 97%
rename from src/tool/run/packages/sort.go
rename to src/tool/anko/packages/sort.go
index c98d147..5bdb5b0 100644
--- a/src/tool/run/packages/sort.go
+++ b/src/tool/anko/packages/sort.go
@@ -4,7 +4,7 @@ import (
"reflect"
"sort"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
// SortFuncsStruct provides functions to be used with Sort
diff --git a/src/tool/run/packages/sortGo18.go b/src/tool/anko/packages/sortGo18.go
similarity index 86%
rename from src/tool/run/packages/sortGo18.go
rename to src/tool/anko/packages/sortGo18.go
index d167c5f..0e6917a 100644
--- a/src/tool/run/packages/sortGo18.go
+++ b/src/tool/anko/packages/sortGo18.go
@@ -6,7 +6,7 @@ import (
"reflect"
"sort"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func sortGo18() {
diff --git a/src/tool/run/packages/sortNotGo18.go b/src/tool/anko/packages/sortNotGo18.go
similarity index 100%
rename from src/tool/run/packages/sortNotGo18.go
rename to src/tool/anko/packages/sortNotGo18.go
diff --git a/src/tool/run/packages/strconv.go b/src/tool/anko/packages/strconv.go
similarity index 93%
rename from src/tool/run/packages/strconv.go
rename to src/tool/anko/packages/strconv.go
index 191abc4..09b5b50 100644
--- a/src/tool/run/packages/strconv.go
+++ b/src/tool/anko/packages/strconv.go
@@ -4,7 +4,7 @@ import (
"reflect"
"strconv"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/strings.go b/src/tool/anko/packages/strings.go
similarity index 98%
rename from src/tool/run/packages/strings.go
rename to src/tool/anko/packages/strings.go
index 9a1fae0..757b3b8 100644
--- a/src/tool/run/packages/strings.go
+++ b/src/tool/anko/packages/strings.go
@@ -4,7 +4,7 @@ import (
"reflect"
"strings"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/stringsGo110.go b/src/tool/anko/packages/stringsGo110.go
similarity index 81%
rename from src/tool/run/packages/stringsGo110.go
rename to src/tool/anko/packages/stringsGo110.go
index abc3eb9..f952b93 100644
--- a/src/tool/run/packages/stringsGo110.go
+++ b/src/tool/anko/packages/stringsGo110.go
@@ -6,7 +6,7 @@ import (
"reflect"
"strings"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func stringsGo110() {
diff --git a/src/tool/run/packages/stringsNotGo110.go b/src/tool/anko/packages/stringsNotGo110.go
similarity index 100%
rename from src/tool/run/packages/stringsNotGo110.go
rename to src/tool/anko/packages/stringsNotGo110.go
diff --git a/src/tool/run/packages/sync.go b/src/tool/anko/packages/sync.go
similarity index 91%
rename from src/tool/run/packages/sync.go
rename to src/tool/anko/packages/sync.go
index 7e5e744..c7ebbe1 100644
--- a/src/tool/run/packages/sync.go
+++ b/src/tool/anko/packages/sync.go
@@ -4,7 +4,7 @@ import (
"reflect"
"sync"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/syncGo19.go b/src/tool/anko/packages/syncGo19.go
similarity index 76%
rename from src/tool/run/packages/syncGo19.go
rename to src/tool/anko/packages/syncGo19.go
index 27ba4d8..7d2f77a 100644
--- a/src/tool/run/packages/syncGo19.go
+++ b/src/tool/anko/packages/syncGo19.go
@@ -6,7 +6,7 @@ import (
"reflect"
"sync"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func syncGo19() {
diff --git a/src/tool/run/packages/syncNotGo19.go b/src/tool/anko/packages/syncNotGo19.go
similarity index 100%
rename from src/tool/run/packages/syncNotGo19.go
rename to src/tool/anko/packages/syncNotGo19.go
diff --git a/src/tool/run/packages/time.go b/src/tool/anko/packages/time.go
similarity index 98%
rename from src/tool/run/packages/time.go
rename to src/tool/anko/packages/time.go
index 5db7292..e5147c0 100644
--- a/src/tool/run/packages/time.go
+++ b/src/tool/anko/packages/time.go
@@ -4,7 +4,7 @@ import (
"reflect"
"time"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func init() {
diff --git a/src/tool/run/packages/timeGo110.go b/src/tool/anko/packages/timeGo110.go
similarity index 79%
rename from src/tool/run/packages/timeGo110.go
rename to src/tool/anko/packages/timeGo110.go
index 3893918..67550fe 100644
--- a/src/tool/run/packages/timeGo110.go
+++ b/src/tool/anko/packages/timeGo110.go
@@ -6,7 +6,7 @@ import (
"reflect"
"time"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func timeGo110() {
diff --git a/src/tool/run/packages/timeGo18.go b/src/tool/anko/packages/timeGo18.go
similarity index 75%
rename from src/tool/run/packages/timeGo18.go
rename to src/tool/anko/packages/timeGo18.go
index bb6749a..b90405e 100644
--- a/src/tool/run/packages/timeGo18.go
+++ b/src/tool/anko/packages/timeGo18.go
@@ -6,7 +6,7 @@ import (
"reflect"
"time"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func timeGo18() {
diff --git a/src/tool/run/packages/timeNotGo110.go b/src/tool/anko/packages/timeNotGo110.go
similarity index 100%
rename from src/tool/run/packages/timeNotGo110.go
rename to src/tool/anko/packages/timeNotGo110.go
diff --git a/src/tool/run/packages/timeNotGo18.go b/src/tool/anko/packages/timeNotGo18.go
similarity index 100%
rename from src/tool/run/packages/timeNotGo18.go
rename to src/tool/anko/packages/timeNotGo18.go
diff --git a/src/tool/run/parser/Makefile b/src/tool/anko/parser/Makefile
similarity index 100%
rename from src/tool/run/parser/Makefile
rename to src/tool/anko/parser/Makefile
diff --git a/src/tool/run/parser/lexer.go b/src/tool/anko/parser/lexer.go
similarity index 99%
rename from src/tool/run/parser/lexer.go
rename to src/tool/anko/parser/lexer.go
index 6bf3869..3a70403 100644
--- a/src/tool/run/parser/lexer.go
+++ b/src/tool/anko/parser/lexer.go
@@ -9,7 +9,7 @@ import (
"strings"
"unicode"
- "github.com/surdeus/goblin/src/tool/run/ast"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
)
const (
diff --git a/src/tool/run/parser/parser.go b/src/tool/anko/parser/parser.go
similarity index 99%
rename from src/tool/run/parser/parser.go
rename to src/tool/anko/parser/parser.go
index aecf8a2..46fe0e9 100644
--- a/src/tool/run/parser/parser.go
+++ b/src/tool/anko/parser/parser.go
@@ -8,7 +8,7 @@ import __yyfmt__ "fmt"
//line parser.go.y:2
import (
- "github.com/surdeus/goblin/src/tool/run/ast"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
)
//line parser.go.y:45
diff --git a/src/tool/run/parser/parser.go.y b/src/tool/anko/parser/parser.go.y
similarity index 99%
rename from src/tool/run/parser/parser.go.y
rename to src/tool/anko/parser/parser.go.y
index c59d17a..a7ba29a 100644
--- a/src/tool/run/parser/parser.go.y
+++ b/src/tool/anko/parser/parser.go.y
@@ -2,7 +2,7 @@
package parser
import (
- "github.com/surdeus/goblin/src/tool/run/ast"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
)
%}
diff --git a/src/tool/run/test.anko b/src/tool/anko/test.anko
similarity index 81%
rename from src/tool/run/test.anko
rename to src/tool/anko/test.anko
index e3db13e..3844048 100644
--- a/src/tool/run/test.anko
+++ b/src/tool/anko/test.anko
@@ -3,3 +3,5 @@ if rcmd("ls") {
rcmd("goblin", "echo", "full shit")
}
+rcmd("cat")
+
diff --git a/src/tool/run/vm/doc.go b/src/tool/anko/vm/doc.go
similarity index 100%
rename from src/tool/run/vm/doc.go
rename to src/tool/anko/vm/doc.go
diff --git a/src/tool/run/vm/example_containers_test.go b/src/tool/anko/vm/example_containers_test.go
similarity index 97%
rename from src/tool/run/vm/example_containers_test.go
rename to src/tool/anko/vm/example_containers_test.go
index b1fa63e..5f6ffdd 100644
--- a/src/tool/run/vm/example_containers_test.go
+++ b/src/tool/anko/vm/example_containers_test.go
@@ -4,8 +4,8 @@ import (
"fmt"
"log"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
func Example_vmArrays() {
diff --git a/src/tool/run/vm/example_functions_test.go b/src/tool/anko/vm/example_functions_test.go
similarity index 95%
rename from src/tool/run/vm/example_functions_test.go
rename to src/tool/anko/vm/example_functions_test.go
index 82b10d6..a40d8a1 100644
--- a/src/tool/run/vm/example_functions_test.go
+++ b/src/tool/anko/vm/example_functions_test.go
@@ -4,8 +4,8 @@ import (
"fmt"
"log"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
func Example_vmFunctions() {
diff --git a/src/tool/run/vm/example_operators_test.go b/src/tool/anko/vm/example_operators_test.go
similarity index 97%
rename from src/tool/run/vm/example_operators_test.go
rename to src/tool/anko/vm/example_operators_test.go
index a6d8f27..1d8c955 100644
--- a/src/tool/run/vm/example_operators_test.go
+++ b/src/tool/anko/vm/example_operators_test.go
@@ -4,8 +4,8 @@ import (
"fmt"
"log"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
func Example_vmBasicOperators() {
diff --git a/src/tool/run/vm/example_packages_test.go b/src/tool/anko/vm/example_packages_test.go
similarity index 86%
rename from src/tool/run/vm/example_packages_test.go
rename to src/tool/anko/vm/example_packages_test.go
index ce7e158..e9db90f 100644
--- a/src/tool/run/vm/example_packages_test.go
+++ b/src/tool/anko/vm/example_packages_test.go
@@ -3,13 +3,13 @@ package vm_test
import (
"log"
- "github.com/surdeus/goblin/src/tool/run/env"
- _ "github.com/surdeus/goblin/src/tool/run/packages"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ _ "github.com/surdeus/goblin/src/tool/anko/packages"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
func Example_vmSort() {
- // _ "github.com/surdeus/goblin/src/tool/run/packages"
+ // _ "github.com/surdeus/goblin/src/tool/anko/packages"
e := env.NewEnv()
@@ -35,7 +35,7 @@ fmt.Println(a)
}
func Example_vmRegexp() {
- // _ "github.com/surdeus/goblin/src/tool/run/packages"
+ // _ "github.com/surdeus/goblin/src/tool/anko/packages"
e := env.NewEnv()
@@ -79,7 +79,7 @@ fmt.Println(result)
}
func Example_vmHttp() {
- // _ "github.com/surdeus/goblin/src/tool/run/packages"
+ // _ "github.com/surdeus/goblin/src/tool/anko/packages"
e := env.NewEnv()
diff --git a/src/tool/run/vm/example_test.go b/src/tool/anko/vm/example_test.go
similarity index 92%
rename from src/tool/run/vm/example_test.go
rename to src/tool/anko/vm/example_test.go
index 7202b6b..ead853d 100644
--- a/src/tool/run/vm/example_test.go
+++ b/src/tool/anko/vm/example_test.go
@@ -7,8 +7,8 @@ import (
"sync"
"time"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/vm"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/vm"
)
func Example_vmExecuteContext() {
@@ -54,7 +54,7 @@ println("this line should not be printed")
}
func Example_vmEnvDefine() {
- // "github.com/surdeus/goblin/src/tool/run/env"
+ // "github.com/surdeus/goblin/src/tool/anko/env"
e := env.NewEnv()
@@ -112,7 +112,7 @@ println(f)
}
func Example_vmEnv() {
- // "github.com/surdeus/goblin/src/tool/run/env"
+ // "github.com/surdeus/goblin/src/tool/anko/env"
e := env.NewEnv()
@@ -134,7 +134,7 @@ func Example_vmEnv() {
}
func Example_vmHelloWorld() {
- // "github.com/surdeus/goblin/src/tool/run/env"
+ // "github.com/surdeus/goblin/src/tool/anko/env"
e := env.NewEnv()
@@ -156,7 +156,7 @@ println("Hello World :)")
}
func Example_vmQuickStart() {
- // "github.com/surdeus/goblin/src/tool/run/env"
+ // "github.com/surdeus/goblin/src/tool/anko/env"
e := env.NewEnv()
diff --git a/src/tool/run/vm/main_test.go b/src/tool/anko/vm/main_test.go
similarity index 98%
rename from src/tool/run/vm/main_test.go
rename to src/tool/anko/vm/main_test.go
index 4aa145f..f7b4e5a 100644
--- a/src/tool/run/vm/main_test.go
+++ b/src/tool/anko/vm/main_test.go
@@ -6,8 +6,8 @@ import (
"testing"
"time"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/parser"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/parser"
)
type (
diff --git a/src/tool/run/vm/packagesGo110_test.go b/src/tool/anko/vm/packagesGo110_test.go
similarity index 90%
rename from src/tool/run/vm/packagesGo110_test.go
rename to src/tool/anko/vm/packagesGo110_test.go
index 4b05743..cef949f 100644
--- a/src/tool/run/vm/packagesGo110_test.go
+++ b/src/tool/anko/vm/packagesGo110_test.go
@@ -5,7 +5,7 @@ package vm
import (
"testing"
- _ "github.com/surdeus/goblin/src/tool/run/packages"
+ _ "github.com/surdeus/goblin/src/tool/anko/packages"
)
func TestPackagesStringsGo110(t *testing.T) {
diff --git a/src/tool/run/vm/packages_test.go b/src/tool/anko/vm/packages_test.go
similarity index 99%
rename from src/tool/run/vm/packages_test.go
rename to src/tool/anko/vm/packages_test.go
index a13affe..819ceeb 100644
--- a/src/tool/run/vm/packages_test.go
+++ b/src/tool/anko/vm/packages_test.go
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
- "github.com/surdeus/goblin/src/tool/run/env"
- _ "github.com/surdeus/goblin/src/tool/run/packages"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ _ "github.com/surdeus/goblin/src/tool/anko/packages"
)
func TestImport(t *testing.T) {
diff --git a/src/tool/run/vm/vm.go b/src/tool/anko/vm/vm.go
similarity index 99%
rename from src/tool/run/vm/vm.go
rename to src/tool/anko/vm/vm.go
index e7aadfd..2547cdc 100644
--- a/src/tool/run/vm/vm.go
+++ b/src/tool/anko/vm/vm.go
@@ -6,8 +6,8 @@ import (
"fmt"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/ast"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
// Options provides options to run VM with
diff --git a/src/tool/run/vm/vmContainers_test.go b/src/tool/anko/vm/vmContainers_test.go
similarity index 99%
rename from src/tool/run/vm/vmContainers_test.go
rename to src/tool/anko/vm/vmContainers_test.go
index a829f1e..e48f890 100644
--- a/src/tool/run/vm/vmContainers_test.go
+++ b/src/tool/anko/vm/vmContainers_test.go
@@ -6,8 +6,8 @@ import (
"reflect"
"testing"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/parser"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/parser"
)
func TestSlices(t *testing.T) {
diff --git a/src/tool/run/vm/vmConvertToX.go b/src/tool/anko/vm/vmConvertToX.go
similarity index 100%
rename from src/tool/run/vm/vmConvertToX.go
rename to src/tool/anko/vm/vmConvertToX.go
diff --git a/src/tool/run/vm/vmConvertToXGo112.go b/src/tool/anko/vm/vmConvertToXGo112.go
similarity index 100%
rename from src/tool/run/vm/vmConvertToXGo112.go
rename to src/tool/anko/vm/vmConvertToXGo112.go
diff --git a/src/tool/run/vm/vmConvertToXNotGo112.go b/src/tool/anko/vm/vmConvertToXNotGo112.go
similarity index 100%
rename from src/tool/run/vm/vmConvertToXNotGo112.go
rename to src/tool/anko/vm/vmConvertToXNotGo112.go
diff --git a/src/tool/run/vm/vmExpr.go b/src/tool/anko/vm/vmExpr.go
similarity index 99%
rename from src/tool/run/vm/vmExpr.go
rename to src/tool/anko/vm/vmExpr.go
index 4644626..3dc0579 100644
--- a/src/tool/run/vm/vmExpr.go
+++ b/src/tool/anko/vm/vmExpr.go
@@ -3,8 +3,8 @@ package vm
import (
"reflect"
- "github.com/surdeus/goblin/src/tool/run/ast"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
// invokeExpr evaluates one expression.
diff --git a/src/tool/run/vm/vmExprFunction.go b/src/tool/anko/vm/vmExprFunction.go
similarity index 99%
rename from src/tool/run/vm/vmExprFunction.go
rename to src/tool/anko/vm/vmExprFunction.go
index ec06312..4b8fcb8 100644
--- a/src/tool/run/vm/vmExprFunction.go
+++ b/src/tool/anko/vm/vmExprFunction.go
@@ -5,7 +5,7 @@ import (
"fmt"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/ast"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
)
// funcExpr creates a function that reflect Call can use.
diff --git a/src/tool/run/vm/vmFunctions_test.go b/src/tool/anko/vm/vmFunctions_test.go
similarity index 99%
rename from src/tool/run/vm/vmFunctions_test.go
rename to src/tool/anko/vm/vmFunctions_test.go
index 2e239fc..18d93c1 100644
--- a/src/tool/run/vm/vmFunctions_test.go
+++ b/src/tool/anko/vm/vmFunctions_test.go
@@ -8,7 +8,7 @@ import (
"testing"
"time"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func TestReturns(t *testing.T) {
diff --git a/src/tool/run/vm/vmLetExpr.go b/src/tool/anko/vm/vmLetExpr.go
similarity index 99%
rename from src/tool/run/vm/vmLetExpr.go
rename to src/tool/anko/vm/vmLetExpr.go
index 865e2ee..cef3c82 100644
--- a/src/tool/run/vm/vmLetExpr.go
+++ b/src/tool/anko/vm/vmLetExpr.go
@@ -3,8 +3,8 @@ package vm
import (
"reflect"
- "github.com/surdeus/goblin/src/tool/run/ast"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func (runInfo *runInfoStruct) invokeLetExpr() {
diff --git a/src/tool/run/vm/vmOperator.go b/src/tool/anko/vm/vmOperator.go
similarity index 99%
rename from src/tool/run/vm/vmOperator.go
rename to src/tool/anko/vm/vmOperator.go
index 527252a..17db016 100644
--- a/src/tool/run/vm/vmOperator.go
+++ b/src/tool/anko/vm/vmOperator.go
@@ -4,7 +4,7 @@ import (
"reflect"
"strings"
- "github.com/surdeus/goblin/src/tool/run/ast"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
)
// invokeOperator evaluates one Operator.
diff --git a/src/tool/run/vm/vmOperators_test.go b/src/tool/anko/vm/vmOperators_test.go
similarity index 100%
rename from src/tool/run/vm/vmOperators_test.go
rename to src/tool/anko/vm/vmOperators_test.go
diff --git a/src/tool/run/vm/vmStmt.go b/src/tool/anko/vm/vmStmt.go
similarity index 99%
rename from src/tool/run/vm/vmStmt.go
rename to src/tool/anko/vm/vmStmt.go
index a71b782..816300c 100644
--- a/src/tool/run/vm/vmStmt.go
+++ b/src/tool/anko/vm/vmStmt.go
@@ -5,9 +5,9 @@ import (
"fmt"
"reflect"
- "github.com/surdeus/goblin/src/tool/run/ast"
- "github.com/surdeus/goblin/src/tool/run/env"
- "github.com/surdeus/goblin/src/tool/run/parser"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
+ "github.com/surdeus/goblin/src/tool/anko/env"
+ "github.com/surdeus/goblin/src/tool/anko/parser"
)
// Execute parses script and executes in the specified environment.
diff --git a/src/tool/run/vm/vmToX.go b/src/tool/anko/vm/vmToX.go
similarity index 100%
rename from src/tool/run/vm/vmToX.go
rename to src/tool/anko/vm/vmToX.go
diff --git a/src/tool/run/vm/vm_Go19_test.go b/src/tool/anko/vm/vm_Go19_test.go
similarity index 100%
rename from src/tool/run/vm/vm_Go19_test.go
rename to src/tool/anko/vm/vm_Go19_test.go
diff --git a/src/tool/run/vm/vm_NotGo19_test.go b/src/tool/anko/vm/vm_NotGo19_test.go
similarity index 100%
rename from src/tool/run/vm/vm_NotGo19_test.go
rename to src/tool/anko/vm/vm_NotGo19_test.go
diff --git a/src/tool/run/vm/vm_test.go b/src/tool/anko/vm/vm_test.go
similarity index 99%
rename from src/tool/run/vm/vm_test.go
rename to src/tool/anko/vm/vm_test.go
index 55af9c9..db5c15b 100644
--- a/src/tool/run/vm/vm_test.go
+++ b/src/tool/anko/vm/vm_test.go
@@ -10,8 +10,8 @@ import (
"testing"
"time"
- "github.com/surdeus/goblin/src/tool/run/ast"
- "github.com/surdeus/goblin/src/tool/run/env"
+ "github.com/surdeus/goblin/src/tool/anko/ast"
+ "github.com/surdeus/goblin/src/tool/anko/env"
)
func TestNumbers(t *testing.T) {