Skip to content

Commit

Permalink
WIP moving lang packages
Browse files Browse the repository at this point in the history
  • Loading branch information
fd committed Feb 11, 2013
1 parent a27ded7 commit 87e4c94
Show file tree
Hide file tree
Showing 295 changed files with 76 additions and 78 deletions.
6 changes: 2 additions & 4 deletions 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}
Expand Down
2 changes: 1 addition & 1 deletion ast/ast.go → lang/ast/ast.go
Expand Up @@ -8,7 +8,7 @@
package ast

import (
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
"strings"
"unicode"
"unicode/utf8"
Expand Down
2 changes: 1 addition & 1 deletion ast/ast_sx.go → lang/ast/ast_sx.go
@@ -1,7 +1,7 @@
package ast

import (
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
)

type (
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ast/commentmap.go → lang/ast/commentmap.go
Expand Up @@ -7,7 +7,7 @@ package ast
import (
"bytes"
"fmt"
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
"sort"
)

Expand Down
6 changes: 3 additions & 3 deletions ast/commentmap_test.go → lang/ast/commentmap_test.go
Expand Up @@ -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"
)
Expand Down
6 changes: 3 additions & 3 deletions ast/example_test.go → lang/ast/example_test.go
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ast/filter.go → lang/ast/filter.go
Expand Up @@ -5,7 +5,7 @@
package ast

import (
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
"sort"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ast/import.go → lang/ast/import.go
Expand Up @@ -5,7 +5,7 @@
package ast

import (
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
"sort"
"strconv"
)
Expand Down
2 changes: 1 addition & 1 deletion ast/print.go → lang/ast/print.go
Expand Up @@ -8,7 +8,7 @@ package ast

import (
"fmt"
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
"io"
"os"
"reflect"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ast/resolve.go → lang/ast/resolve.go
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion ast/scope.go → lang/ast/scope.go
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/sx/build.go → lang/cmd/sx/build.go
Expand Up @@ -10,7 +10,7 @@ import (
"errors"
"flag"
"fmt"
"github.com/fd/simplex/build"
"github.com/fd/simplex/lang/build"
"io"
"io/ioutil"
"log"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/sx/get.go → lang/cmd/sx/get.go
Expand Up @@ -8,7 +8,7 @@ package main

import (
"fmt"
"github.com/fd/simplex/build"
"github.com/fd/simplex/lang/build"
"os"
"path/filepath"
"regexp"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/sx/main.go → lang/cmd/sx/main.go
Expand Up @@ -8,7 +8,7 @@ import (
"bytes"
"flag"
"fmt"
"github.com/fd/simplex/build"
"github.com/fd/simplex/lang/build"
"io"
"log"
"os"
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/sx/pkg.go → lang/cmd/sx/pkg.go
Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions cmd/sx/test.go → lang/cmd/sx/test.go
Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/sx/tool.go → lang/cmd/sx/tool.go
Expand Up @@ -6,7 +6,7 @@ package main

import (
"fmt"
"github.com/fd/simplex/build"
"github.com/fd/simplex/lang/build"
"os"
"os/exec"
"path/filepath"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/sxc/main.go → lang/cmd/sxc/main.go
Expand Up @@ -3,7 +3,7 @@ package main
import (
"flag"
"fmt"
"github.com/fd/simplex/compiler"
"github.com/fd/simplex/lang/compiler"
"os"
"strings"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/sxdoc/dirtrees.go → lang/cmd/sxdoc/dirtrees.go
Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/sxdoc/format.go → lang/cmd/sxdoc/format.go
Expand Up @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions cmd/sxdoc/godoc.go → lang/cmd/sxdoc/godoc.go
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions cmd/sxdoc/index.go → lang/cmd/sxdoc/index.go
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions cmd/sxdoc/main.go → lang/cmd/sxdoc/main.go
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions cmd/sxdoc/parser.go → lang/cmd/sxdoc/parser.go
Expand Up @@ -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"
)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/sxdoc/play.go → lang/cmd/sxdoc/play.go
Expand Up @@ -9,7 +9,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/fd/simplex/format"
"github.com/fd/simplex/lang/format"
"net/http"
)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/sxdoc/snippet.go → lang/cmd/sxdoc/snippet.go
Expand Up @@ -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 {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions cmd/sxfmt/gofmt.go → lang/cmd/sxfmt/gofmt.go
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions cmd/sxfmt/gofmt.go.gofmt → lang/cmd/sxfmt/gofmt.go.gofmt
Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/sxfmt/long_test.go → lang/cmd/sxfmt/long_test.go
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions cmd/sxfmt/rewrite.go → lang/cmd/sxfmt/rewrite.go
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions cmd/sxfmt/simplify.go → lang/cmd/sxfmt/simplify.go
Expand Up @@ -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"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scanner/errors.go → lang/scanner/errors.go
Expand Up @@ -6,7 +6,7 @@ package scanner

import (
"fmt"
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
"io"
"sort"
)
Expand Down
4 changes: 2 additions & 2 deletions scanner/example_test.go → lang/scanner/example_test.go
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion scanner/scanner.go → lang/scanner/scanner.go
Expand Up @@ -11,7 +11,7 @@ package scanner
import (
"bytes"
"fmt"
"github.com/fd/simplex/token"
"github.com/fd/simplex/lang/token"
"path/filepath"
"strconv"
"unicode"
Expand Down

0 comments on commit 87e4c94

Please sign in to comment.