Skip to content

Commit

Permalink
remove escLocalFS (google#150)
Browse files Browse the repository at this point in the history
* remove escLocalFS

* update README
  • Loading branch information
mqliang authored and sparkprime committed Nov 10, 2017
1 parent 3951023 commit 8f568c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 352 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ http://clipperhouse.github.io/gen/. Do the following to regenerate these if
necessary:

```
go get github.com/mjibson/esc
go get github.com/clipperhouse/gen
go get github.com/clipperhouse/set
export PATH=$PATH:$GOPATH/bin # If you haven't already
Expand Down
7 changes: 0 additions & 7 deletions builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ import (
"github.com/google/go-jsonnet/ast"
)

// TODO(sbarzowski) Is this the best option? It's the first one that worked for me...
//go:generate esc -o std.go -pkg=jsonnet std/std.jsonnet
//go:generate go run cmd/dumpstdlibast.go
func GetStdCode() string {
return FSMustString(false, "/std/std.jsonnet")
}

func builtinPlus(e *evaluator, xp, yp potentialValue) (value, error) {
// TODO(sbarzowski) more types, mixing types
// TODO(sbarzowski) perhaps a more elegant way to dispatch
Expand Down
10 changes: 8 additions & 2 deletions cmd/dumpstdlibast.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License.
package main

import (
"io/ioutil"
"os"

"github.com/google/go-jsonnet"
Expand All @@ -23,13 +24,18 @@ import (
func main() {
filename := "ast/stdast.go"

file, err := os.OpenFile(filename, os.O_RDWR|os.O_CREATE,0644)
file, err := os.OpenFile(filename, os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
panic(err)
}
defer file.Close()

node, err := jsonnet.SnippetToAST("<std>", jsonnet.GetStdCode())
buf, err := ioutil.ReadFile("std/std.jsonnet")
if err != nil {
panic(err)
}

node, err := jsonnet.SnippetToAST("<std>", string(buf))
if err != nil {
panic(err)
}
Expand Down
342 changes: 0 additions & 342 deletions std.go

This file was deleted.

0 comments on commit 8f568c1

Please sign in to comment.