diff --git a/Makefile b/Makefile index 30ead79..366489d 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,10 @@ -SX='./ast/...' './build/...' './cmd/...' './compiler/...' \ - './doc/...' './format/...' './parser/...' './printer/...' \ - './scanner/...' './token/...' './types/...' \ +SX='./lang/...' \ './cas/...' './runtime/...' './net/...' all: commands commands: - go get './cmd/...' + go get './lang/cmd/...' build_sx: go get ${SX} diff --git a/ast/ast.go b/lang/ast/ast.go similarity index 99% rename from ast/ast.go rename to lang/ast/ast.go index 9e085cd..11b1860 100644 --- a/ast/ast.go +++ b/lang/ast/ast.go @@ -8,7 +8,7 @@ package ast import ( - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "strings" "unicode" "unicode/utf8" diff --git a/ast/ast_sx.go b/lang/ast/ast_sx.go similarity index 95% rename from ast/ast_sx.go rename to lang/ast/ast_sx.go index 53a7e14..072961f 100644 --- a/ast/ast_sx.go +++ b/lang/ast/ast_sx.go @@ -1,7 +1,7 @@ package ast import ( - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" ) type ( diff --git a/ast/ast_test.go b/lang/ast/ast_test.go similarity index 100% rename from ast/ast_test.go rename to lang/ast/ast_test.go diff --git a/ast/commentmap.go b/lang/ast/commentmap.go similarity index 99% rename from ast/commentmap.go rename to lang/ast/commentmap.go index 2171e63..31c291b 100644 --- a/ast/commentmap.go +++ b/lang/ast/commentmap.go @@ -7,7 +7,7 @@ package ast import ( "bytes" "fmt" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "sort" ) diff --git a/ast/commentmap_test.go b/lang/ast/commentmap_test.go similarity index 96% rename from ast/commentmap_test.go rename to lang/ast/commentmap_test.go index 050ed4d..076abc5 100644 --- a/ast/commentmap_test.go +++ b/lang/ast/commentmap_test.go @@ -9,9 +9,9 @@ package ast_test import ( "bytes" "fmt" - . "github.com/fd/simplex/ast" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/token" + . "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/token" "sort" "testing" ) diff --git a/ast/example_test.go b/lang/ast/example_test.go similarity index 97% rename from ast/example_test.go rename to lang/ast/example_test.go index a570680..0efed76 100644 --- a/ast/example_test.go +++ b/lang/ast/example_test.go @@ -6,9 +6,9 @@ package ast_test import ( "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/token" ) // This example demonstrates how to inspect the AST of a Go program. diff --git a/ast/filter.go b/lang/ast/filter.go similarity index 99% rename from ast/filter.go rename to lang/ast/filter.go index 81665b1..2d384d9 100644 --- a/ast/filter.go +++ b/lang/ast/filter.go @@ -5,7 +5,7 @@ package ast import ( - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "sort" ) diff --git a/ast/filter_sx.go b/lang/ast/filter_sx.go similarity index 100% rename from ast/filter_sx.go rename to lang/ast/filter_sx.go diff --git a/ast/import.go b/lang/ast/import.go similarity index 98% rename from ast/import.go rename to lang/ast/import.go index de4e7f6..e6e2f42 100644 --- a/ast/import.go +++ b/lang/ast/import.go @@ -5,7 +5,7 @@ package ast import ( - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "sort" "strconv" ) diff --git a/ast/print.go b/lang/ast/print.go similarity index 99% rename from ast/print.go rename to lang/ast/print.go index ca881eb..cf002b9 100644 --- a/ast/print.go +++ b/lang/ast/print.go @@ -8,7 +8,7 @@ package ast import ( "fmt" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "io" "os" "reflect" diff --git a/ast/print_test.go b/lang/ast/print_test.go similarity index 100% rename from ast/print_test.go rename to lang/ast/print_test.go diff --git a/ast/replace.go b/lang/ast/replace.go similarity index 100% rename from ast/replace.go rename to lang/ast/replace.go diff --git a/ast/resolve.go b/lang/ast/resolve.go similarity index 98% rename from ast/resolve.go rename to lang/ast/resolve.go index beab462..dc8e656 100644 --- a/ast/resolve.go +++ b/lang/ast/resolve.go @@ -8,8 +8,8 @@ package ast import ( "fmt" - "github.com/fd/simplex/scanner" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/scanner" + "github.com/fd/simplex/lang/token" "strconv" ) diff --git a/ast/scope.go b/lang/ast/scope.go similarity index 99% rename from ast/scope.go rename to lang/ast/scope.go index 0a4f045..9001b83 100644 --- a/ast/scope.go +++ b/lang/ast/scope.go @@ -9,7 +9,7 @@ package ast import ( "bytes" "fmt" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" ) // A Scope maintains the set of named language entities declared diff --git a/ast/walk.go b/lang/ast/walk.go similarity index 100% rename from ast/walk.go rename to lang/ast/walk.go diff --git a/build/build.go b/lang/build/build.go similarity index 100% rename from build/build.go rename to lang/build/build.go diff --git a/build/build_test.go b/lang/build/build_test.go similarity index 100% rename from build/build_test.go rename to lang/build/build_test.go diff --git a/build/deps_test.go b/lang/build/deps_test.go similarity index 100% rename from build/deps_test.go rename to lang/build/deps_test.go diff --git a/build/doc.go b/lang/build/doc.go similarity index 100% rename from build/doc.go rename to lang/build/doc.go diff --git a/build/read.go b/lang/build/read.go similarity index 100% rename from build/read.go rename to lang/build/read.go diff --git a/build/read_test.go b/lang/build/read_test.go similarity index 100% rename from build/read_test.go rename to lang/build/read_test.go diff --git a/build/syslist.go b/lang/build/syslist.go similarity index 100% rename from build/syslist.go rename to lang/build/syslist.go diff --git a/build/syslist_test.go b/lang/build/syslist_test.go similarity index 100% rename from build/syslist_test.go rename to lang/build/syslist_test.go diff --git a/build/testdata/other/file/file.go b/lang/build/testdata/other/file/file.go similarity index 100% rename from build/testdata/other/file/file.go rename to lang/build/testdata/other/file/file.go diff --git a/build/testdata/other/main.go b/lang/build/testdata/other/main.go similarity index 100% rename from build/testdata/other/main.go rename to lang/build/testdata/other/main.go diff --git a/cmd/sx/bootstrap.go b/lang/cmd/sx/bootstrap.go similarity index 100% rename from cmd/sx/bootstrap.go rename to lang/cmd/sx/bootstrap.go diff --git a/cmd/sx/build.go b/lang/cmd/sx/build.go similarity index 99% rename from cmd/sx/build.go rename to lang/cmd/sx/build.go index de5652c..e3eaa41 100644 --- a/cmd/sx/build.go +++ b/lang/cmd/sx/build.go @@ -10,7 +10,7 @@ import ( "errors" "flag" "fmt" - "github.com/fd/simplex/build" + "github.com/fd/simplex/lang/build" "io" "io/ioutil" "log" diff --git a/cmd/sx/clean.go b/lang/cmd/sx/clean.go similarity index 100% rename from cmd/sx/clean.go rename to lang/cmd/sx/clean.go diff --git a/cmd/sx/discovery.go b/lang/cmd/sx/discovery.go similarity index 100% rename from cmd/sx/discovery.go rename to lang/cmd/sx/discovery.go diff --git a/cmd/sx/doc.go b/lang/cmd/sx/doc.go similarity index 100% rename from cmd/sx/doc.go rename to lang/cmd/sx/doc.go diff --git a/cmd/sx/env.go b/lang/cmd/sx/env.go similarity index 100% rename from cmd/sx/env.go rename to lang/cmd/sx/env.go diff --git a/cmd/sx/fix.go b/lang/cmd/sx/fix.go similarity index 100% rename from cmd/sx/fix.go rename to lang/cmd/sx/fix.go diff --git a/cmd/sx/fmt.go b/lang/cmd/sx/fmt.go similarity index 100% rename from cmd/sx/fmt.go rename to lang/cmd/sx/fmt.go diff --git a/cmd/sx/get.go b/lang/cmd/sx/get.go similarity index 99% rename from cmd/sx/get.go rename to lang/cmd/sx/get.go index 9f3c31b..261f2cd 100644 --- a/cmd/sx/get.go +++ b/lang/cmd/sx/get.go @@ -8,7 +8,7 @@ package main import ( "fmt" - "github.com/fd/simplex/build" + "github.com/fd/simplex/lang/build" "os" "path/filepath" "regexp" diff --git a/cmd/sx/help.go b/lang/cmd/sx/help.go similarity index 100% rename from cmd/sx/help.go rename to lang/cmd/sx/help.go diff --git a/cmd/sx/http.go b/lang/cmd/sx/http.go similarity index 100% rename from cmd/sx/http.go rename to lang/cmd/sx/http.go diff --git a/cmd/sx/list.go b/lang/cmd/sx/list.go similarity index 100% rename from cmd/sx/list.go rename to lang/cmd/sx/list.go diff --git a/cmd/sx/main.go b/lang/cmd/sx/main.go similarity index 99% rename from cmd/sx/main.go rename to lang/cmd/sx/main.go index a37b963..0a25802 100644 --- a/cmd/sx/main.go +++ b/lang/cmd/sx/main.go @@ -8,7 +8,7 @@ import ( "bytes" "flag" "fmt" - "github.com/fd/simplex/build" + "github.com/fd/simplex/lang/build" "io" "log" "os" diff --git a/cmd/sx/match_test.go b/lang/cmd/sx/match_test.go similarity index 100% rename from cmd/sx/match_test.go rename to lang/cmd/sx/match_test.go diff --git a/cmd/sx/mkdoc.sh b/lang/cmd/sx/mkdoc.sh similarity index 100% rename from cmd/sx/mkdoc.sh rename to lang/cmd/sx/mkdoc.sh diff --git a/cmd/sx/pkg.go b/lang/cmd/sx/pkg.go similarity index 99% rename from cmd/sx/pkg.go rename to lang/cmd/sx/pkg.go index eafd9f9..82ea867 100644 --- a/cmd/sx/pkg.go +++ b/lang/cmd/sx/pkg.go @@ -8,9 +8,9 @@ import ( "bytes" "errors" "fmt" - "github.com/fd/simplex/build" - "github.com/fd/simplex/scanner" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/build" + "github.com/fd/simplex/lang/scanner" + "github.com/fd/simplex/lang/token" "os" pathpkg "path" "path/filepath" diff --git a/cmd/sx/run.go b/lang/cmd/sx/run.go similarity index 100% rename from cmd/sx/run.go rename to lang/cmd/sx/run.go diff --git a/cmd/sx/script b/lang/cmd/sx/script similarity index 100% rename from cmd/sx/script rename to lang/cmd/sx/script diff --git a/cmd/sx/script.txt b/lang/cmd/sx/script.txt similarity index 100% rename from cmd/sx/script.txt rename to lang/cmd/sx/script.txt diff --git a/cmd/sx/signal.go b/lang/cmd/sx/signal.go similarity index 100% rename from cmd/sx/signal.go rename to lang/cmd/sx/signal.go diff --git a/cmd/sx/signal_notunix.go b/lang/cmd/sx/signal_notunix.go similarity index 100% rename from cmd/sx/signal_notunix.go rename to lang/cmd/sx/signal_notunix.go diff --git a/cmd/sx/signal_unix.go b/lang/cmd/sx/signal_unix.go similarity index 100% rename from cmd/sx/signal_unix.go rename to lang/cmd/sx/signal_unix.go diff --git a/cmd/sx/tag_test.go b/lang/cmd/sx/tag_test.go similarity index 100% rename from cmd/sx/tag_test.go rename to lang/cmd/sx/tag_test.go diff --git a/cmd/sx/test.bash b/lang/cmd/sx/test.bash similarity index 100% rename from cmd/sx/test.bash rename to lang/cmd/sx/test.bash diff --git a/cmd/sx/test.go b/lang/cmd/sx/test.go similarity index 99% rename from cmd/sx/test.go rename to lang/cmd/sx/test.go index 67a15a8..2499ba8 100644 --- a/cmd/sx/test.go +++ b/lang/cmd/sx/test.go @@ -7,11 +7,11 @@ package main import ( "bytes" "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/build" - "github.com/fd/simplex/doc" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/build" + "github.com/fd/simplex/lang/doc" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/token" "os" "os/exec" "path" diff --git a/cmd/sx/testdata/errmsg/x.go b/lang/cmd/sx/testdata/errmsg/x.go similarity index 100% rename from cmd/sx/testdata/errmsg/x.go rename to lang/cmd/sx/testdata/errmsg/x.go diff --git a/cmd/sx/testdata/errmsg/x1_test.go b/lang/cmd/sx/testdata/errmsg/x1_test.go similarity index 100% rename from cmd/sx/testdata/errmsg/x1_test.go rename to lang/cmd/sx/testdata/errmsg/x1_test.go diff --git a/cmd/sx/testdata/errmsg/x_test.go b/lang/cmd/sx/testdata/errmsg/x_test.go similarity index 100% rename from cmd/sx/testdata/errmsg/x_test.go rename to lang/cmd/sx/testdata/errmsg/x_test.go diff --git a/cmd/sx/testdata/local/easy.go b/lang/cmd/sx/testdata/local/easy.go similarity index 100% rename from cmd/sx/testdata/local/easy.go rename to lang/cmd/sx/testdata/local/easy.go diff --git a/cmd/sx/testdata/local/easysub/easysub.go b/lang/cmd/sx/testdata/local/easysub/easysub.go similarity index 100% rename from cmd/sx/testdata/local/easysub/easysub.go rename to lang/cmd/sx/testdata/local/easysub/easysub.go diff --git a/cmd/sx/testdata/local/easysub/main.go b/lang/cmd/sx/testdata/local/easysub/main.go similarity index 100% rename from cmd/sx/testdata/local/easysub/main.go rename to lang/cmd/sx/testdata/local/easysub/main.go diff --git a/cmd/sx/testdata/local/hard.go b/lang/cmd/sx/testdata/local/hard.go similarity index 100% rename from cmd/sx/testdata/local/hard.go rename to lang/cmd/sx/testdata/local/hard.go diff --git a/cmd/sx/testdata/local/sub/sub.go b/lang/cmd/sx/testdata/local/sub/sub.go similarity index 100% rename from cmd/sx/testdata/local/sub/sub.go rename to lang/cmd/sx/testdata/local/sub/sub.go diff --git a/cmd/sx/testdata/local/sub/sub/subsub.go b/lang/cmd/sx/testdata/local/sub/sub/subsub.go similarity index 100% rename from cmd/sx/testdata/local/sub/sub/subsub.go rename to lang/cmd/sx/testdata/local/sub/sub/subsub.go diff --git a/cmd/sx/testdata/src/go-cmd-test/helloworld.go b/lang/cmd/sx/testdata/src/go-cmd-test/helloworld.go similarity index 100% rename from cmd/sx/testdata/src/go-cmd-test/helloworld.go rename to lang/cmd/sx/testdata/src/go-cmd-test/helloworld.go diff --git a/cmd/sx/testdata/testimport/p.go b/lang/cmd/sx/testdata/testimport/p.go similarity index 100% rename from cmd/sx/testdata/testimport/p.go rename to lang/cmd/sx/testdata/testimport/p.go diff --git a/cmd/sx/testdata/testimport/p1/p1.go b/lang/cmd/sx/testdata/testimport/p1/p1.go similarity index 100% rename from cmd/sx/testdata/testimport/p1/p1.go rename to lang/cmd/sx/testdata/testimport/p1/p1.go diff --git a/cmd/sx/testdata/testimport/p2/p2.go b/lang/cmd/sx/testdata/testimport/p2/p2.go similarity index 100% rename from cmd/sx/testdata/testimport/p2/p2.go rename to lang/cmd/sx/testdata/testimport/p2/p2.go diff --git a/cmd/sx/testdata/testimport/p_test.go b/lang/cmd/sx/testdata/testimport/p_test.go similarity index 100% rename from cmd/sx/testdata/testimport/p_test.go rename to lang/cmd/sx/testdata/testimport/p_test.go diff --git a/cmd/sx/testdata/testimport/x_test.go b/lang/cmd/sx/testdata/testimport/x_test.go similarity index 100% rename from cmd/sx/testdata/testimport/x_test.go rename to lang/cmd/sx/testdata/testimport/x_test.go diff --git a/cmd/sx/testflag.go b/lang/cmd/sx/testflag.go similarity index 100% rename from cmd/sx/testflag.go rename to lang/cmd/sx/testflag.go diff --git a/cmd/sx/tool.go b/lang/cmd/sx/tool.go similarity index 98% rename from cmd/sx/tool.go rename to lang/cmd/sx/tool.go index 065f536..df3b304 100644 --- a/cmd/sx/tool.go +++ b/lang/cmd/sx/tool.go @@ -6,7 +6,7 @@ package main import ( "fmt" - "github.com/fd/simplex/build" + "github.com/fd/simplex/lang/build" "os" "os/exec" "path/filepath" diff --git a/cmd/sx/vcs.go b/lang/cmd/sx/vcs.go similarity index 100% rename from cmd/sx/vcs.go rename to lang/cmd/sx/vcs.go diff --git a/cmd/sx/version.go b/lang/cmd/sx/version.go similarity index 100% rename from cmd/sx/version.go rename to lang/cmd/sx/version.go diff --git a/cmd/sx/vet.go b/lang/cmd/sx/vet.go similarity index 100% rename from cmd/sx/vet.go rename to lang/cmd/sx/vet.go diff --git a/cmd/sxc/main.go b/lang/cmd/sxc/main.go similarity index 95% rename from cmd/sxc/main.go rename to lang/cmd/sxc/main.go index 58c4626..5981091 100644 --- a/cmd/sxc/main.go +++ b/lang/cmd/sxc/main.go @@ -3,7 +3,7 @@ package main import ( "flag" "fmt" - "github.com/fd/simplex/compiler" + "github.com/fd/simplex/lang/compiler" "os" "strings" ) diff --git a/cmd/sxdoc/README.godoc-app b/lang/cmd/sxdoc/README.godoc-app similarity index 100% rename from cmd/sxdoc/README.godoc-app rename to lang/cmd/sxdoc/README.godoc-app diff --git a/cmd/sxdoc/appinit.go b/lang/cmd/sxdoc/appinit.go similarity index 100% rename from cmd/sxdoc/appinit.go rename to lang/cmd/sxdoc/appinit.go diff --git a/cmd/sxdoc/codewalk.go b/lang/cmd/sxdoc/codewalk.go similarity index 100% rename from cmd/sxdoc/codewalk.go rename to lang/cmd/sxdoc/codewalk.go diff --git a/cmd/sxdoc/dirtrees.go b/lang/cmd/sxdoc/dirtrees.go similarity index 98% rename from cmd/sxdoc/dirtrees.go rename to lang/cmd/sxdoc/dirtrees.go index cfd8a80..b9b941b 100644 --- a/cmd/sxdoc/dirtrees.go +++ b/lang/cmd/sxdoc/dirtrees.go @@ -8,9 +8,9 @@ package main import ( "bytes" - "github.com/fd/simplex/doc" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/doc" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/token" "log" "os" pathpkg "path" diff --git a/cmd/sxdoc/doc.go b/lang/cmd/sxdoc/doc.go similarity index 100% rename from cmd/sxdoc/doc.go rename to lang/cmd/sxdoc/doc.go diff --git a/cmd/sxdoc/filesystem.go b/lang/cmd/sxdoc/filesystem.go similarity index 100% rename from cmd/sxdoc/filesystem.go rename to lang/cmd/sxdoc/filesystem.go diff --git a/cmd/sxdoc/format.go b/lang/cmd/sxdoc/format.go similarity index 99% rename from cmd/sxdoc/format.go rename to lang/cmd/sxdoc/format.go index 16ec204..b4b0c9f 100644 --- a/cmd/sxdoc/format.go +++ b/lang/cmd/sxdoc/format.go @@ -12,8 +12,8 @@ package main import ( "fmt" - "github.com/fd/simplex/scanner" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/scanner" + "github.com/fd/simplex/lang/token" "io" "regexp" "strconv" diff --git a/cmd/sxdoc/godoc.go b/lang/cmd/sxdoc/godoc.go similarity index 99% rename from cmd/sxdoc/godoc.go rename to lang/cmd/sxdoc/godoc.go index d995658..305d707 100644 --- a/cmd/sxdoc/godoc.go +++ b/lang/cmd/sxdoc/godoc.go @@ -9,12 +9,12 @@ import ( "encoding/json" "flag" "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/build" - "github.com/fd/simplex/doc" - "github.com/fd/simplex/format" - "github.com/fd/simplex/printer" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/build" + "github.com/fd/simplex/lang/doc" + "github.com/fd/simplex/lang/format" + "github.com/fd/simplex/lang/printer" + "github.com/fd/simplex/lang/token" "io" "io/ioutil" "log" diff --git a/cmd/sxdoc/index.go b/lang/cmd/sxdoc/index.go similarity index 99% rename from cmd/sxdoc/index.go rename to lang/cmd/sxdoc/index.go index 80caf36..5843105 100644 --- a/cmd/sxdoc/index.go +++ b/lang/cmd/sxdoc/index.go @@ -42,9 +42,9 @@ import ( "bytes" "encoding/gob" "errors" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/token" "index/suffixarray" "io" "os" diff --git a/cmd/sxdoc/main.go b/lang/cmd/sxdoc/main.go similarity index 99% rename from cmd/sxdoc/main.go rename to lang/cmd/sxdoc/main.go index 6e6bd78..3388b52 100644 --- a/cmd/sxdoc/main.go +++ b/lang/cmd/sxdoc/main.go @@ -34,9 +34,9 @@ import ( _ "expvar" // to serve /debug/vars "flag" "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/build" - "github.com/fd/simplex/printer" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/build" + "github.com/fd/simplex/lang/printer" "io" "log" "net/http" diff --git a/cmd/sxdoc/parser.go b/lang/cmd/sxdoc/parser.go similarity index 93% rename from cmd/sxdoc/parser.go rename to lang/cmd/sxdoc/parser.go index 725fb99..db88a65 100644 --- a/cmd/sxdoc/parser.go +++ b/lang/cmd/sxdoc/parser.go @@ -10,9 +10,9 @@ package main import ( - "github.com/fd/simplex/ast" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/token" "os" pathpkg "path" ) diff --git a/cmd/sxdoc/play-appengine.go b/lang/cmd/sxdoc/play-appengine.go similarity index 100% rename from cmd/sxdoc/play-appengine.go rename to lang/cmd/sxdoc/play-appengine.go diff --git a/cmd/sxdoc/play-local.go b/lang/cmd/sxdoc/play-local.go similarity index 100% rename from cmd/sxdoc/play-local.go rename to lang/cmd/sxdoc/play-local.go diff --git a/cmd/sxdoc/play.go b/lang/cmd/sxdoc/play.go similarity index 97% rename from cmd/sxdoc/play.go rename to lang/cmd/sxdoc/play.go index ccc1dc0..ccf5282 100644 --- a/cmd/sxdoc/play.go +++ b/lang/cmd/sxdoc/play.go @@ -9,7 +9,7 @@ package main import ( "encoding/json" "fmt" - "github.com/fd/simplex/format" + "github.com/fd/simplex/lang/format" "net/http" ) diff --git a/cmd/sxdoc/setup-godoc-app.bash b/lang/cmd/sxdoc/setup-godoc-app.bash similarity index 100% rename from cmd/sxdoc/setup-godoc-app.bash rename to lang/cmd/sxdoc/setup-godoc-app.bash diff --git a/cmd/sxdoc/snippet.go b/lang/cmd/sxdoc/snippet.go similarity index 97% rename from cmd/sxdoc/snippet.go rename to lang/cmd/sxdoc/snippet.go index dc422cf..2c0b375 100644 --- a/cmd/sxdoc/snippet.go +++ b/lang/cmd/sxdoc/snippet.go @@ -12,8 +12,8 @@ package main import ( "bytes" "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/token" ) type Snippet struct { diff --git a/cmd/sxdoc/spec.go b/lang/cmd/sxdoc/spec.go similarity index 100% rename from cmd/sxdoc/spec.go rename to lang/cmd/sxdoc/spec.go diff --git a/cmd/sxdoc/template.go b/lang/cmd/sxdoc/template.go similarity index 100% rename from cmd/sxdoc/template.go rename to lang/cmd/sxdoc/template.go diff --git a/cmd/sxdoc/throttle.go b/lang/cmd/sxdoc/throttle.go similarity index 100% rename from cmd/sxdoc/throttle.go rename to lang/cmd/sxdoc/throttle.go diff --git a/cmd/sxdoc/utils.go b/lang/cmd/sxdoc/utils.go similarity index 100% rename from cmd/sxdoc/utils.go rename to lang/cmd/sxdoc/utils.go diff --git a/cmd/sxdoc/zip.go b/lang/cmd/sxdoc/zip.go similarity index 100% rename from cmd/sxdoc/zip.go rename to lang/cmd/sxdoc/zip.go diff --git a/cmd/sxfmt/doc.go b/lang/cmd/sxfmt/doc.go similarity index 100% rename from cmd/sxfmt/doc.go rename to lang/cmd/sxfmt/doc.go diff --git a/cmd/sxfmt/gofmt.go b/lang/cmd/sxfmt/gofmt.go similarity index 97% rename from cmd/sxfmt/gofmt.go rename to lang/cmd/sxfmt/gofmt.go index 6ea70c9..254bf9d 100644 --- a/cmd/sxfmt/gofmt.go +++ b/lang/cmd/sxfmt/gofmt.go @@ -8,11 +8,11 @@ import ( "bytes" "flag" "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/printer" - "github.com/fd/simplex/scanner" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/printer" + "github.com/fd/simplex/lang/scanner" + "github.com/fd/simplex/lang/token" "io" "io/ioutil" "os" diff --git a/cmd/sxfmt/gofmt.go.gofmt b/lang/cmd/sxfmt/gofmt.go.gofmt similarity index 97% rename from cmd/sxfmt/gofmt.go.gofmt rename to lang/cmd/sxfmt/gofmt.go.gofmt index 6ea70c9..254bf9d 100644 --- a/cmd/sxfmt/gofmt.go.gofmt +++ b/lang/cmd/sxfmt/gofmt.go.gofmt @@ -8,11 +8,11 @@ import ( "bytes" "flag" "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/printer" - "github.com/fd/simplex/scanner" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/printer" + "github.com/fd/simplex/lang/scanner" + "github.com/fd/simplex/lang/token" "io" "io/ioutil" "os" diff --git a/cmd/sxfmt/gofmt_test.go b/lang/cmd/sxfmt/gofmt_test.go similarity index 100% rename from cmd/sxfmt/gofmt_test.go rename to lang/cmd/sxfmt/gofmt_test.go diff --git a/cmd/sxfmt/gofmt_test.go.gofmt b/lang/cmd/sxfmt/gofmt_test.go.gofmt similarity index 100% rename from cmd/sxfmt/gofmt_test.go.gofmt rename to lang/cmd/sxfmt/gofmt_test.go.gofmt diff --git a/cmd/sxfmt/long_test.go b/lang/cmd/sxfmt/long_test.go similarity index 96% rename from cmd/sxfmt/long_test.go rename to lang/cmd/sxfmt/long_test.go index 2ec2370..0ea348b 100644 --- a/cmd/sxfmt/long_test.go +++ b/lang/cmd/sxfmt/long_test.go @@ -12,9 +12,9 @@ import ( "bytes" "flag" "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/printer" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/printer" + "github.com/fd/simplex/lang/token" "io" "os" "path/filepath" diff --git a/cmd/sxfmt/rewrite.go b/lang/cmd/sxfmt/rewrite.go similarity index 98% rename from cmd/sxfmt/rewrite.go rename to lang/cmd/sxfmt/rewrite.go index 195efd5..b862ff7 100644 --- a/cmd/sxfmt/rewrite.go +++ b/lang/cmd/sxfmt/rewrite.go @@ -6,9 +6,9 @@ package main import ( "fmt" - "github.com/fd/simplex/ast" - "github.com/fd/simplex/parser" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/parser" + "github.com/fd/simplex/lang/token" "os" "reflect" "strings" diff --git a/cmd/sxfmt/simplify.go b/lang/cmd/sxfmt/simplify.go similarity index 98% rename from cmd/sxfmt/simplify.go rename to lang/cmd/sxfmt/simplify.go index c4f67b9..475a8a4 100644 --- a/cmd/sxfmt/simplify.go +++ b/lang/cmd/sxfmt/simplify.go @@ -5,8 +5,8 @@ package main import ( - "github.com/fd/simplex/ast" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/ast" + "github.com/fd/simplex/lang/token" "reflect" ) diff --git a/cmd/sxfmt/testdata/.gitattributes b/lang/cmd/sxfmt/testdata/.gitattributes similarity index 100% rename from cmd/sxfmt/testdata/.gitattributes rename to lang/cmd/sxfmt/testdata/.gitattributes diff --git a/cmd/sxfmt/testdata/comments.golden b/lang/cmd/sxfmt/testdata/comments.golden similarity index 100% rename from cmd/sxfmt/testdata/comments.golden rename to lang/cmd/sxfmt/testdata/comments.golden diff --git a/cmd/sxfmt/testdata/comments.input b/lang/cmd/sxfmt/testdata/comments.input similarity index 100% rename from cmd/sxfmt/testdata/comments.input rename to lang/cmd/sxfmt/testdata/comments.input diff --git a/cmd/sxfmt/testdata/composites.golden b/lang/cmd/sxfmt/testdata/composites.golden similarity index 100% rename from cmd/sxfmt/testdata/composites.golden rename to lang/cmd/sxfmt/testdata/composites.golden diff --git a/cmd/sxfmt/testdata/composites.input b/lang/cmd/sxfmt/testdata/composites.input similarity index 100% rename from cmd/sxfmt/testdata/composites.input rename to lang/cmd/sxfmt/testdata/composites.input diff --git a/cmd/sxfmt/testdata/crlf.golden b/lang/cmd/sxfmt/testdata/crlf.golden similarity index 100% rename from cmd/sxfmt/testdata/crlf.golden rename to lang/cmd/sxfmt/testdata/crlf.golden diff --git a/cmd/sxfmt/testdata/crlf.input b/lang/cmd/sxfmt/testdata/crlf.input similarity index 100% rename from cmd/sxfmt/testdata/crlf.input rename to lang/cmd/sxfmt/testdata/crlf.input diff --git a/cmd/sxfmt/testdata/import.golden b/lang/cmd/sxfmt/testdata/import.golden similarity index 100% rename from cmd/sxfmt/testdata/import.golden rename to lang/cmd/sxfmt/testdata/import.golden diff --git a/cmd/sxfmt/testdata/import.input b/lang/cmd/sxfmt/testdata/import.input similarity index 100% rename from cmd/sxfmt/testdata/import.input rename to lang/cmd/sxfmt/testdata/import.input diff --git a/cmd/sxfmt/testdata/old.golden b/lang/cmd/sxfmt/testdata/old.golden similarity index 100% rename from cmd/sxfmt/testdata/old.golden rename to lang/cmd/sxfmt/testdata/old.golden diff --git a/cmd/sxfmt/testdata/old.input b/lang/cmd/sxfmt/testdata/old.input similarity index 100% rename from cmd/sxfmt/testdata/old.input rename to lang/cmd/sxfmt/testdata/old.input diff --git a/cmd/sxfmt/testdata/rewrite1.golden b/lang/cmd/sxfmt/testdata/rewrite1.golden similarity index 100% rename from cmd/sxfmt/testdata/rewrite1.golden rename to lang/cmd/sxfmt/testdata/rewrite1.golden diff --git a/cmd/sxfmt/testdata/rewrite1.input b/lang/cmd/sxfmt/testdata/rewrite1.input similarity index 100% rename from cmd/sxfmt/testdata/rewrite1.input rename to lang/cmd/sxfmt/testdata/rewrite1.input diff --git a/cmd/sxfmt/testdata/rewrite2.golden b/lang/cmd/sxfmt/testdata/rewrite2.golden similarity index 100% rename from cmd/sxfmt/testdata/rewrite2.golden rename to lang/cmd/sxfmt/testdata/rewrite2.golden diff --git a/cmd/sxfmt/testdata/rewrite2.input b/lang/cmd/sxfmt/testdata/rewrite2.input similarity index 100% rename from cmd/sxfmt/testdata/rewrite2.input rename to lang/cmd/sxfmt/testdata/rewrite2.input diff --git a/cmd/sxfmt/testdata/rewrite3.golden b/lang/cmd/sxfmt/testdata/rewrite3.golden similarity index 100% rename from cmd/sxfmt/testdata/rewrite3.golden rename to lang/cmd/sxfmt/testdata/rewrite3.golden diff --git a/cmd/sxfmt/testdata/rewrite3.input b/lang/cmd/sxfmt/testdata/rewrite3.input similarity index 100% rename from cmd/sxfmt/testdata/rewrite3.input rename to lang/cmd/sxfmt/testdata/rewrite3.input diff --git a/cmd/sxfmt/testdata/rewrite4.golden b/lang/cmd/sxfmt/testdata/rewrite4.golden similarity index 100% rename from cmd/sxfmt/testdata/rewrite4.golden rename to lang/cmd/sxfmt/testdata/rewrite4.golden diff --git a/cmd/sxfmt/testdata/rewrite4.input b/lang/cmd/sxfmt/testdata/rewrite4.input similarity index 100% rename from cmd/sxfmt/testdata/rewrite4.input rename to lang/cmd/sxfmt/testdata/rewrite4.input diff --git a/cmd/sxfmt/testdata/rewrite5.golden b/lang/cmd/sxfmt/testdata/rewrite5.golden similarity index 100% rename from cmd/sxfmt/testdata/rewrite5.golden rename to lang/cmd/sxfmt/testdata/rewrite5.golden diff --git a/cmd/sxfmt/testdata/rewrite5.input b/lang/cmd/sxfmt/testdata/rewrite5.input similarity index 100% rename from cmd/sxfmt/testdata/rewrite5.input rename to lang/cmd/sxfmt/testdata/rewrite5.input diff --git a/cmd/sxfmt/testdata/slices1.golden b/lang/cmd/sxfmt/testdata/slices1.golden similarity index 100% rename from cmd/sxfmt/testdata/slices1.golden rename to lang/cmd/sxfmt/testdata/slices1.golden diff --git a/cmd/sxfmt/testdata/slices1.input b/lang/cmd/sxfmt/testdata/slices1.input similarity index 100% rename from cmd/sxfmt/testdata/slices1.input rename to lang/cmd/sxfmt/testdata/slices1.input diff --git a/cmd/sxfmt/testdata/slices2.golden b/lang/cmd/sxfmt/testdata/slices2.golden similarity index 100% rename from cmd/sxfmt/testdata/slices2.golden rename to lang/cmd/sxfmt/testdata/slices2.golden diff --git a/cmd/sxfmt/testdata/slices2.input b/lang/cmd/sxfmt/testdata/slices2.input similarity index 100% rename from cmd/sxfmt/testdata/slices2.input rename to lang/cmd/sxfmt/testdata/slices2.input diff --git a/cmd/sxfmt/testdata/stdin1.golden b/lang/cmd/sxfmt/testdata/stdin1.golden similarity index 100% rename from cmd/sxfmt/testdata/stdin1.golden rename to lang/cmd/sxfmt/testdata/stdin1.golden diff --git a/cmd/sxfmt/testdata/stdin1.golden.gofmt b/lang/cmd/sxfmt/testdata/stdin1.golden.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin1.golden.gofmt rename to lang/cmd/sxfmt/testdata/stdin1.golden.gofmt diff --git a/cmd/sxfmt/testdata/stdin1.input b/lang/cmd/sxfmt/testdata/stdin1.input similarity index 100% rename from cmd/sxfmt/testdata/stdin1.input rename to lang/cmd/sxfmt/testdata/stdin1.input diff --git a/cmd/sxfmt/testdata/stdin1.input.gofmt b/lang/cmd/sxfmt/testdata/stdin1.input.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin1.input.gofmt rename to lang/cmd/sxfmt/testdata/stdin1.input.gofmt diff --git a/cmd/sxfmt/testdata/stdin2.golden b/lang/cmd/sxfmt/testdata/stdin2.golden similarity index 100% rename from cmd/sxfmt/testdata/stdin2.golden rename to lang/cmd/sxfmt/testdata/stdin2.golden diff --git a/cmd/sxfmt/testdata/stdin2.golden.gofmt b/lang/cmd/sxfmt/testdata/stdin2.golden.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin2.golden.gofmt rename to lang/cmd/sxfmt/testdata/stdin2.golden.gofmt diff --git a/cmd/sxfmt/testdata/stdin2.input b/lang/cmd/sxfmt/testdata/stdin2.input similarity index 100% rename from cmd/sxfmt/testdata/stdin2.input rename to lang/cmd/sxfmt/testdata/stdin2.input diff --git a/cmd/sxfmt/testdata/stdin2.input.gofmt b/lang/cmd/sxfmt/testdata/stdin2.input.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin2.input.gofmt rename to lang/cmd/sxfmt/testdata/stdin2.input.gofmt diff --git a/cmd/sxfmt/testdata/stdin3.golden b/lang/cmd/sxfmt/testdata/stdin3.golden similarity index 100% rename from cmd/sxfmt/testdata/stdin3.golden rename to lang/cmd/sxfmt/testdata/stdin3.golden diff --git a/cmd/sxfmt/testdata/stdin3.golden.gofmt b/lang/cmd/sxfmt/testdata/stdin3.golden.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin3.golden.gofmt rename to lang/cmd/sxfmt/testdata/stdin3.golden.gofmt diff --git a/cmd/sxfmt/testdata/stdin3.input b/lang/cmd/sxfmt/testdata/stdin3.input similarity index 100% rename from cmd/sxfmt/testdata/stdin3.input rename to lang/cmd/sxfmt/testdata/stdin3.input diff --git a/cmd/sxfmt/testdata/stdin3.input.gofmt b/lang/cmd/sxfmt/testdata/stdin3.input.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin3.input.gofmt rename to lang/cmd/sxfmt/testdata/stdin3.input.gofmt diff --git a/cmd/sxfmt/testdata/stdin4.golden b/lang/cmd/sxfmt/testdata/stdin4.golden similarity index 100% rename from cmd/sxfmt/testdata/stdin4.golden rename to lang/cmd/sxfmt/testdata/stdin4.golden diff --git a/cmd/sxfmt/testdata/stdin4.golden.gofmt b/lang/cmd/sxfmt/testdata/stdin4.golden.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin4.golden.gofmt rename to lang/cmd/sxfmt/testdata/stdin4.golden.gofmt diff --git a/cmd/sxfmt/testdata/stdin4.input b/lang/cmd/sxfmt/testdata/stdin4.input similarity index 100% rename from cmd/sxfmt/testdata/stdin4.input rename to lang/cmd/sxfmt/testdata/stdin4.input diff --git a/cmd/sxfmt/testdata/stdin4.input.gofmt b/lang/cmd/sxfmt/testdata/stdin4.input.gofmt similarity index 100% rename from cmd/sxfmt/testdata/stdin4.input.gofmt rename to lang/cmd/sxfmt/testdata/stdin4.input.gofmt diff --git a/cmd/sxfmt/testdata/typeswitch.golden b/lang/cmd/sxfmt/testdata/typeswitch.golden similarity index 100% rename from cmd/sxfmt/testdata/typeswitch.golden rename to lang/cmd/sxfmt/testdata/typeswitch.golden diff --git a/cmd/sxfmt/testdata/typeswitch.input b/lang/cmd/sxfmt/testdata/typeswitch.input similarity index 100% rename from cmd/sxfmt/testdata/typeswitch.input rename to lang/cmd/sxfmt/testdata/typeswitch.input diff --git a/compiler/context.go b/lang/compiler/context.go similarity index 100% rename from compiler/context.go rename to lang/compiler/context.go diff --git a/compiler/converter.go b/lang/compiler/converter.go similarity index 100% rename from compiler/converter.go rename to lang/compiler/converter.go diff --git a/compiler/parser.go b/lang/compiler/parser.go similarity index 100% rename from compiler/parser.go rename to lang/compiler/parser.go diff --git a/compiler/printer.go b/lang/compiler/printer.go similarity index 100% rename from compiler/printer.go rename to lang/compiler/printer.go diff --git a/compiler/type_checker.go b/lang/compiler/type_checker.go similarity index 100% rename from compiler/type_checker.go rename to lang/compiler/type_checker.go diff --git a/compiler/type_printer.go b/lang/compiler/type_printer.go similarity index 100% rename from compiler/type_printer.go rename to lang/compiler/type_printer.go diff --git a/compiler/types.go b/lang/compiler/types.go similarity index 100% rename from compiler/types.go rename to lang/compiler/types.go diff --git a/doc/Makefile b/lang/doc/Makefile similarity index 100% rename from doc/Makefile rename to lang/doc/Makefile diff --git a/doc/comment.go b/lang/doc/comment.go similarity index 100% rename from doc/comment.go rename to lang/doc/comment.go diff --git a/doc/comment_test.go b/lang/doc/comment_test.go similarity index 100% rename from doc/comment_test.go rename to lang/doc/comment_test.go diff --git a/doc/doc.go b/lang/doc/doc.go similarity index 100% rename from doc/doc.go rename to lang/doc/doc.go diff --git a/doc/doc_test.go b/lang/doc/doc_test.go similarity index 100% rename from doc/doc_test.go rename to lang/doc/doc_test.go diff --git a/doc/example.go b/lang/doc/example.go similarity index 100% rename from doc/example.go rename to lang/doc/example.go diff --git a/doc/example_test.go b/lang/doc/example_test.go similarity index 100% rename from doc/example_test.go rename to lang/doc/example_test.go diff --git a/doc/exports.go b/lang/doc/exports.go similarity index 100% rename from doc/exports.go rename to lang/doc/exports.go diff --git a/doc/filter.go b/lang/doc/filter.go similarity index 100% rename from doc/filter.go rename to lang/doc/filter.go diff --git a/doc/headscan.go b/lang/doc/headscan.go similarity index 100% rename from doc/headscan.go rename to lang/doc/headscan.go diff --git a/doc/reader.go b/lang/doc/reader.go similarity index 100% rename from doc/reader.go rename to lang/doc/reader.go diff --git a/doc/synopsis.go b/lang/doc/synopsis.go similarity index 100% rename from doc/synopsis.go rename to lang/doc/synopsis.go diff --git a/doc/synopsis_test.go b/lang/doc/synopsis_test.go similarity index 100% rename from doc/synopsis_test.go rename to lang/doc/synopsis_test.go diff --git a/doc/testdata/a.0.golden b/lang/doc/testdata/a.0.golden similarity index 100% rename from doc/testdata/a.0.golden rename to lang/doc/testdata/a.0.golden diff --git a/doc/testdata/a.1.golden b/lang/doc/testdata/a.1.golden similarity index 100% rename from doc/testdata/a.1.golden rename to lang/doc/testdata/a.1.golden diff --git a/doc/testdata/a.2.golden b/lang/doc/testdata/a.2.golden similarity index 100% rename from doc/testdata/a.2.golden rename to lang/doc/testdata/a.2.golden diff --git a/doc/testdata/a0.go b/lang/doc/testdata/a0.go similarity index 100% rename from doc/testdata/a0.go rename to lang/doc/testdata/a0.go diff --git a/doc/testdata/a1.go b/lang/doc/testdata/a1.go similarity index 100% rename from doc/testdata/a1.go rename to lang/doc/testdata/a1.go diff --git a/doc/testdata/b.0.golden b/lang/doc/testdata/b.0.golden similarity index 100% rename from doc/testdata/b.0.golden rename to lang/doc/testdata/b.0.golden diff --git a/doc/testdata/b.1.golden b/lang/doc/testdata/b.1.golden similarity index 100% rename from doc/testdata/b.1.golden rename to lang/doc/testdata/b.1.golden diff --git a/doc/testdata/b.2.golden b/lang/doc/testdata/b.2.golden similarity index 100% rename from doc/testdata/b.2.golden rename to lang/doc/testdata/b.2.golden diff --git a/doc/testdata/b.go b/lang/doc/testdata/b.go similarity index 100% rename from doc/testdata/b.go rename to lang/doc/testdata/b.go diff --git a/doc/testdata/benchmark.go b/lang/doc/testdata/benchmark.go similarity index 100% rename from doc/testdata/benchmark.go rename to lang/doc/testdata/benchmark.go diff --git a/doc/testdata/c.0.golden b/lang/doc/testdata/c.0.golden similarity index 100% rename from doc/testdata/c.0.golden rename to lang/doc/testdata/c.0.golden diff --git a/doc/testdata/c.1.golden b/lang/doc/testdata/c.1.golden similarity index 100% rename from doc/testdata/c.1.golden rename to lang/doc/testdata/c.1.golden diff --git a/doc/testdata/c.2.golden b/lang/doc/testdata/c.2.golden similarity index 100% rename from doc/testdata/c.2.golden rename to lang/doc/testdata/c.2.golden diff --git a/doc/testdata/c.go b/lang/doc/testdata/c.go similarity index 100% rename from doc/testdata/c.go rename to lang/doc/testdata/c.go diff --git a/doc/testdata/d.0.golden b/lang/doc/testdata/d.0.golden similarity index 100% rename from doc/testdata/d.0.golden rename to lang/doc/testdata/d.0.golden diff --git a/doc/testdata/d.1.golden b/lang/doc/testdata/d.1.golden similarity index 100% rename from doc/testdata/d.1.golden rename to lang/doc/testdata/d.1.golden diff --git a/doc/testdata/d.2.golden b/lang/doc/testdata/d.2.golden similarity index 100% rename from doc/testdata/d.2.golden rename to lang/doc/testdata/d.2.golden diff --git a/doc/testdata/d1.go b/lang/doc/testdata/d1.go similarity index 100% rename from doc/testdata/d1.go rename to lang/doc/testdata/d1.go diff --git a/doc/testdata/d2.go b/lang/doc/testdata/d2.go similarity index 100% rename from doc/testdata/d2.go rename to lang/doc/testdata/d2.go diff --git a/doc/testdata/e.0.golden b/lang/doc/testdata/e.0.golden similarity index 100% rename from doc/testdata/e.0.golden rename to lang/doc/testdata/e.0.golden diff --git a/doc/testdata/e.1.golden b/lang/doc/testdata/e.1.golden similarity index 100% rename from doc/testdata/e.1.golden rename to lang/doc/testdata/e.1.golden diff --git a/doc/testdata/e.2.golden b/lang/doc/testdata/e.2.golden similarity index 100% rename from doc/testdata/e.2.golden rename to lang/doc/testdata/e.2.golden diff --git a/doc/testdata/e.go b/lang/doc/testdata/e.go similarity index 100% rename from doc/testdata/e.go rename to lang/doc/testdata/e.go diff --git a/doc/testdata/error1.0.golden b/lang/doc/testdata/error1.0.golden similarity index 100% rename from doc/testdata/error1.0.golden rename to lang/doc/testdata/error1.0.golden diff --git a/doc/testdata/error1.1.golden b/lang/doc/testdata/error1.1.golden similarity index 100% rename from doc/testdata/error1.1.golden rename to lang/doc/testdata/error1.1.golden diff --git a/doc/testdata/error1.2.golden b/lang/doc/testdata/error1.2.golden similarity index 100% rename from doc/testdata/error1.2.golden rename to lang/doc/testdata/error1.2.golden diff --git a/doc/testdata/error1.go b/lang/doc/testdata/error1.go similarity index 100% rename from doc/testdata/error1.go rename to lang/doc/testdata/error1.go diff --git a/doc/testdata/error2.0.golden b/lang/doc/testdata/error2.0.golden similarity index 100% rename from doc/testdata/error2.0.golden rename to lang/doc/testdata/error2.0.golden diff --git a/doc/testdata/error2.1.golden b/lang/doc/testdata/error2.1.golden similarity index 100% rename from doc/testdata/error2.1.golden rename to lang/doc/testdata/error2.1.golden diff --git a/doc/testdata/error2.2.golden b/lang/doc/testdata/error2.2.golden similarity index 100% rename from doc/testdata/error2.2.golden rename to lang/doc/testdata/error2.2.golden diff --git a/doc/testdata/error2.go b/lang/doc/testdata/error2.go similarity index 100% rename from doc/testdata/error2.go rename to lang/doc/testdata/error2.go diff --git a/doc/testdata/example.go b/lang/doc/testdata/example.go similarity index 100% rename from doc/testdata/example.go rename to lang/doc/testdata/example.go diff --git a/doc/testdata/f.0.golden b/lang/doc/testdata/f.0.golden similarity index 100% rename from doc/testdata/f.0.golden rename to lang/doc/testdata/f.0.golden diff --git a/doc/testdata/f.1.golden b/lang/doc/testdata/f.1.golden similarity index 100% rename from doc/testdata/f.1.golden rename to lang/doc/testdata/f.1.golden diff --git a/doc/testdata/f.2.golden b/lang/doc/testdata/f.2.golden similarity index 100% rename from doc/testdata/f.2.golden rename to lang/doc/testdata/f.2.golden diff --git a/doc/testdata/f.go b/lang/doc/testdata/f.go similarity index 100% rename from doc/testdata/f.go rename to lang/doc/testdata/f.go diff --git a/doc/testdata/template.txt b/lang/doc/testdata/template.txt similarity index 100% rename from doc/testdata/template.txt rename to lang/doc/testdata/template.txt diff --git a/doc/testdata/testing.0.golden b/lang/doc/testdata/testing.0.golden similarity index 100% rename from doc/testdata/testing.0.golden rename to lang/doc/testdata/testing.0.golden diff --git a/doc/testdata/testing.1.golden b/lang/doc/testdata/testing.1.golden similarity index 100% rename from doc/testdata/testing.1.golden rename to lang/doc/testdata/testing.1.golden diff --git a/doc/testdata/testing.2.golden b/lang/doc/testdata/testing.2.golden similarity index 100% rename from doc/testdata/testing.2.golden rename to lang/doc/testdata/testing.2.golden diff --git a/doc/testdata/testing.go b/lang/doc/testdata/testing.go similarity index 100% rename from doc/testdata/testing.go rename to lang/doc/testdata/testing.go diff --git a/format/format.go b/lang/format/format.go similarity index 100% rename from format/format.go rename to lang/format/format.go diff --git a/format/format_test.go b/lang/format/format_test.go similarity index 100% rename from format/format_test.go rename to lang/format/format_test.go diff --git a/parser/error_test.go b/lang/parser/error_test.go similarity index 100% rename from parser/error_test.go rename to lang/parser/error_test.go diff --git a/parser/example_test.go b/lang/parser/example_test.go similarity index 100% rename from parser/example_test.go rename to lang/parser/example_test.go diff --git a/parser/interface.go b/lang/parser/interface.go similarity index 100% rename from parser/interface.go rename to lang/parser/interface.go diff --git a/parser/parser.go b/lang/parser/parser.go similarity index 100% rename from parser/parser.go rename to lang/parser/parser.go diff --git a/parser/parser_sx.go b/lang/parser/parser_sx.go similarity index 100% rename from parser/parser_sx.go rename to lang/parser/parser_sx.go diff --git a/parser/parser_test.go b/lang/parser/parser_test.go similarity index 100% rename from parser/parser_test.go rename to lang/parser/parser_test.go diff --git a/parser/performance_test.go b/lang/parser/performance_test.go similarity index 100% rename from parser/performance_test.go rename to lang/parser/performance_test.go diff --git a/parser/short_test.go b/lang/parser/short_test.go similarity index 100% rename from parser/short_test.go rename to lang/parser/short_test.go diff --git a/parser/testdata/commas.src b/lang/parser/testdata/commas.src similarity index 100% rename from parser/testdata/commas.src rename to lang/parser/testdata/commas.src diff --git a/parser/testdata/issue3106.src b/lang/parser/testdata/issue3106.src similarity index 100% rename from parser/testdata/issue3106.src rename to lang/parser/testdata/issue3106.src diff --git a/printer/example_test.go b/lang/printer/example_test.go similarity index 100% rename from printer/example_test.go rename to lang/printer/example_test.go diff --git a/printer/nodes.go b/lang/printer/nodes.go similarity index 100% rename from printer/nodes.go rename to lang/printer/nodes.go diff --git a/printer/performance_test.go b/lang/printer/performance_test.go similarity index 100% rename from printer/performance_test.go rename to lang/printer/performance_test.go diff --git a/printer/printer.go b/lang/printer/printer.go similarity index 100% rename from printer/printer.go rename to lang/printer/printer.go diff --git a/printer/printer_test.go b/lang/printer/printer_test.go similarity index 100% rename from printer/printer_test.go rename to lang/printer/printer_test.go diff --git a/printer/testdata/comments.golden b/lang/printer/testdata/comments.golden similarity index 100% rename from printer/testdata/comments.golden rename to lang/printer/testdata/comments.golden diff --git a/printer/testdata/comments.input b/lang/printer/testdata/comments.input similarity index 100% rename from printer/testdata/comments.input rename to lang/printer/testdata/comments.input diff --git a/printer/testdata/comments.x b/lang/printer/testdata/comments.x similarity index 100% rename from printer/testdata/comments.x rename to lang/printer/testdata/comments.x diff --git a/printer/testdata/comments2.golden b/lang/printer/testdata/comments2.golden similarity index 100% rename from printer/testdata/comments2.golden rename to lang/printer/testdata/comments2.golden diff --git a/printer/testdata/comments2.input b/lang/printer/testdata/comments2.input similarity index 100% rename from printer/testdata/comments2.input rename to lang/printer/testdata/comments2.input diff --git a/printer/testdata/declarations.golden b/lang/printer/testdata/declarations.golden similarity index 100% rename from printer/testdata/declarations.golden rename to lang/printer/testdata/declarations.golden diff --git a/printer/testdata/declarations.input b/lang/printer/testdata/declarations.input similarity index 100% rename from printer/testdata/declarations.input rename to lang/printer/testdata/declarations.input diff --git a/printer/testdata/empty.golden b/lang/printer/testdata/empty.golden similarity index 100% rename from printer/testdata/empty.golden rename to lang/printer/testdata/empty.golden diff --git a/printer/testdata/empty.input b/lang/printer/testdata/empty.input similarity index 100% rename from printer/testdata/empty.input rename to lang/printer/testdata/empty.input diff --git a/printer/testdata/expressions.golden b/lang/printer/testdata/expressions.golden similarity index 100% rename from printer/testdata/expressions.golden rename to lang/printer/testdata/expressions.golden diff --git a/printer/testdata/expressions.input b/lang/printer/testdata/expressions.input similarity index 100% rename from printer/testdata/expressions.input rename to lang/printer/testdata/expressions.input diff --git a/printer/testdata/expressions.raw b/lang/printer/testdata/expressions.raw similarity index 100% rename from printer/testdata/expressions.raw rename to lang/printer/testdata/expressions.raw diff --git a/printer/testdata/linebreaks.golden b/lang/printer/testdata/linebreaks.golden similarity index 100% rename from printer/testdata/linebreaks.golden rename to lang/printer/testdata/linebreaks.golden diff --git a/printer/testdata/linebreaks.input b/lang/printer/testdata/linebreaks.input similarity index 100% rename from printer/testdata/linebreaks.input rename to lang/printer/testdata/linebreaks.input diff --git a/printer/testdata/parser.go b/lang/printer/testdata/parser.go similarity index 100% rename from printer/testdata/parser.go rename to lang/printer/testdata/parser.go diff --git a/printer/testdata/slow.golden b/lang/printer/testdata/slow.golden similarity index 100% rename from printer/testdata/slow.golden rename to lang/printer/testdata/slow.golden diff --git a/printer/testdata/slow.input b/lang/printer/testdata/slow.input similarity index 100% rename from printer/testdata/slow.input rename to lang/printer/testdata/slow.input diff --git a/printer/testdata/statements.golden b/lang/printer/testdata/statements.golden similarity index 100% rename from printer/testdata/statements.golden rename to lang/printer/testdata/statements.golden diff --git a/printer/testdata/statements.input b/lang/printer/testdata/statements.input similarity index 100% rename from printer/testdata/statements.input rename to lang/printer/testdata/statements.input diff --git a/scanner/errors.go b/lang/scanner/errors.go similarity index 98% rename from scanner/errors.go rename to lang/scanner/errors.go index 12af4af..2628792 100644 --- a/scanner/errors.go +++ b/lang/scanner/errors.go @@ -6,7 +6,7 @@ package scanner import ( "fmt" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "io" "sort" ) diff --git a/scanner/example_test.go b/lang/scanner/example_test.go similarity index 93% rename from scanner/example_test.go rename to lang/scanner/example_test.go index 86969f4..77772a9 100644 --- a/scanner/example_test.go +++ b/lang/scanner/example_test.go @@ -6,8 +6,8 @@ package scanner_test import ( "fmt" - "github.com/fd/simplex/scanner" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/scanner" + "github.com/fd/simplex/lang/token" ) func ExampleScanner_Scan() { diff --git a/scanner/scanner.go b/lang/scanner/scanner.go similarity index 99% rename from scanner/scanner.go rename to lang/scanner/scanner.go index b2f1783..8b92cd0 100644 --- a/scanner/scanner.go +++ b/lang/scanner/scanner.go @@ -11,7 +11,7 @@ package scanner import ( "bytes" "fmt" - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "path/filepath" "strconv" "unicode" diff --git a/scanner/scanner_test.go b/lang/scanner/scanner_test.go similarity index 99% rename from scanner/scanner_test.go rename to lang/scanner/scanner_test.go index 9fefa97..a13daa4 100644 --- a/scanner/scanner_test.go +++ b/lang/scanner/scanner_test.go @@ -5,7 +5,7 @@ package scanner import ( - "github.com/fd/simplex/token" + "github.com/fd/simplex/lang/token" "io/ioutil" "os" "path/filepath" diff --git a/token/position.go b/lang/token/position.go similarity index 100% rename from token/position.go rename to lang/token/position.go diff --git a/token/position_test.go b/lang/token/position_test.go similarity index 100% rename from token/position_test.go rename to lang/token/position_test.go diff --git a/token/serialize.go b/lang/token/serialize.go similarity index 100% rename from token/serialize.go rename to lang/token/serialize.go diff --git a/token/serialize_test.go b/lang/token/serialize_test.go similarity index 100% rename from token/serialize_test.go rename to lang/token/serialize_test.go diff --git a/token/token.go b/lang/token/token.go similarity index 100% rename from token/token.go rename to lang/token/token.go diff --git a/token/token_sx.go b/lang/token/token_sx.go similarity index 100% rename from token/token_sx.go rename to lang/token/token_sx.go diff --git a/types/api.go b/lang/types/api.go similarity index 100% rename from types/api.go rename to lang/types/api.go diff --git a/types/builtins.go b/lang/types/builtins.go similarity index 100% rename from types/builtins.go rename to lang/types/builtins.go diff --git a/types/builtins_sx.go b/lang/types/builtins_sx.go similarity index 100% rename from types/builtins_sx.go rename to lang/types/builtins_sx.go diff --git a/types/check.go b/lang/types/check.go similarity index 100% rename from types/check.go rename to lang/types/check.go diff --git a/types/check_test.go b/lang/types/check_test.go similarity index 100% rename from types/check_test.go rename to lang/types/check_test.go diff --git a/types/const.go b/lang/types/const.go similarity index 100% rename from types/const.go rename to lang/types/const.go diff --git a/types/conversions.go b/lang/types/conversions.go similarity index 100% rename from types/conversions.go rename to lang/types/conversions.go diff --git a/types/errors.go b/lang/types/errors.go similarity index 100% rename from types/errors.go rename to lang/types/errors.go diff --git a/types/errors_sx.go b/lang/types/errors_sx.go similarity index 100% rename from types/errors_sx.go rename to lang/types/errors_sx.go diff --git a/types/exportdata.go b/lang/types/exportdata.go similarity index 100% rename from types/exportdata.go rename to lang/types/exportdata.go diff --git a/types/expr.go b/lang/types/expr.go similarity index 100% rename from types/expr.go rename to lang/types/expr.go diff --git a/types/expr_sx.go b/lang/types/expr_sx.go similarity index 100% rename from types/expr_sx.go rename to lang/types/expr_sx.go diff --git a/types/gcimporter.go b/lang/types/gcimporter.go similarity index 100% rename from types/gcimporter.go rename to lang/types/gcimporter.go diff --git a/types/gcimporter_test.go b/lang/types/gcimporter_test.go similarity index 100% rename from types/gcimporter_test.go rename to lang/types/gcimporter_test.go diff --git a/types/objects.go b/lang/types/objects.go similarity index 100% rename from types/objects.go rename to lang/types/objects.go diff --git a/types/operand.go b/lang/types/operand.go similarity index 100% rename from types/operand.go rename to lang/types/operand.go diff --git a/types/operand_sx.go b/lang/types/operand_sx.go similarity index 100% rename from types/operand_sx.go rename to lang/types/operand_sx.go diff --git a/types/predicates.go b/lang/types/predicates.go similarity index 100% rename from types/predicates.go rename to lang/types/predicates.go diff --git a/types/predicates_sx.go b/lang/types/predicates_sx.go similarity index 100% rename from types/predicates_sx.go rename to lang/types/predicates_sx.go diff --git a/types/resolve.go b/lang/types/resolve.go similarity index 100% rename from types/resolve.go rename to lang/types/resolve.go diff --git a/types/resolver_test.go b/lang/types/resolver_test.go similarity index 100% rename from types/resolver_test.go rename to lang/types/resolver_test.go diff --git a/types/scope.go b/lang/types/scope.go similarity index 100% rename from types/scope.go rename to lang/types/scope.go diff --git a/types/stmt.go b/lang/types/stmt.go similarity index 100% rename from types/stmt.go rename to lang/types/stmt.go diff --git a/types/testdata/builtins.src b/lang/types/testdata/builtins.src similarity index 100% rename from types/testdata/builtins.src rename to lang/types/testdata/builtins.src diff --git a/types/testdata/builtins_sx.src b/lang/types/testdata/builtins_sx.src similarity index 100% rename from types/testdata/builtins_sx.src rename to lang/types/testdata/builtins_sx.src diff --git a/types/testdata/const0.src b/lang/types/testdata/const0.src similarity index 100% rename from types/testdata/const0.src rename to lang/types/testdata/const0.src diff --git a/types/testdata/conversions.src b/lang/types/testdata/conversions.src similarity index 100% rename from types/testdata/conversions.src rename to lang/types/testdata/conversions.src diff --git a/types/testdata/conversions_sx.src b/lang/types/testdata/conversions_sx.src similarity index 100% rename from types/testdata/conversions_sx.src rename to lang/types/testdata/conversions_sx.src diff --git a/types/testdata/decls0.src b/lang/types/testdata/decls0.src similarity index 100% rename from types/testdata/decls0.src rename to lang/types/testdata/decls0.src diff --git a/types/testdata/decls1.src b/lang/types/testdata/decls1.src similarity index 100% rename from types/testdata/decls1.src rename to lang/types/testdata/decls1.src diff --git a/types/testdata/decls2a.src b/lang/types/testdata/decls2a.src similarity index 100% rename from types/testdata/decls2a.src rename to lang/types/testdata/decls2a.src diff --git a/types/testdata/decls2b.src b/lang/types/testdata/decls2b.src similarity index 100% rename from types/testdata/decls2b.src rename to lang/types/testdata/decls2b.src diff --git a/types/testdata/decls3.src b/lang/types/testdata/decls3.src similarity index 100% rename from types/testdata/decls3.src rename to lang/types/testdata/decls3.src diff --git a/types/testdata/exports.go b/lang/types/testdata/exports.go similarity index 100% rename from types/testdata/exports.go rename to lang/types/testdata/exports.go diff --git a/types/testdata/expr0.src b/lang/types/testdata/expr0.src similarity index 100% rename from types/testdata/expr0.src rename to lang/types/testdata/expr0.src diff --git a/types/testdata/expr0_sx.src b/lang/types/testdata/expr0_sx.src similarity index 100% rename from types/testdata/expr0_sx.src rename to lang/types/testdata/expr0_sx.src diff --git a/types/testdata/expr1.src b/lang/types/testdata/expr1.src similarity index 100% rename from types/testdata/expr1.src rename to lang/types/testdata/expr1.src diff --git a/types/testdata/expr2.src b/lang/types/testdata/expr2.src similarity index 100% rename from types/testdata/expr2.src rename to lang/types/testdata/expr2.src diff --git a/types/testdata/expr3.src b/lang/types/testdata/expr3.src similarity index 100% rename from types/testdata/expr3.src rename to lang/types/testdata/expr3.src diff --git a/types/testdata/stmt0.src b/lang/types/testdata/stmt0.src similarity index 100% rename from types/testdata/stmt0.src rename to lang/types/testdata/stmt0.src diff --git a/types/types.go b/lang/types/types.go similarity index 100% rename from types/types.go rename to lang/types/types.go diff --git a/types/types_sx.go b/lang/types/types_sx.go similarity index 100% rename from types/types_sx.go rename to lang/types/types_sx.go diff --git a/types/types_test.go b/lang/types/types_test.go similarity index 100% rename from types/types_test.go rename to lang/types/types_test.go diff --git a/types/universe.go b/lang/types/universe.go similarity index 100% rename from types/universe.go rename to lang/types/universe.go