the beginning of an interpreter for Go (fork off exp/eval)
Go
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmd all: gofmt Nov 12, 2014
.hgtags Added tag go.go1 for changeset 4e665d9b74d9 Apr 10, 2012
.travis.yml travis: only build for go-1.6 May 21, 2016
LICENSE first import from exp/eval Jul 12, 2011
README.md doc: add godoc+travis badges May 21, 2016
abort.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
bridge.go bridge: gofmt Jan 13, 2014
compiler.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
eval_test.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
expr.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
expr1.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
expr_test.go test: fixup TestExpr string-matches (bis) Sep 12, 2014
func.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
scope.go block: allow to undefine definitions Sep 12, 2014
stmt.go Fixes required for go1.6 May 20, 2016
stmt_test.go
type.go type: remove Pos() from Type interface Jan 13, 2014
typec.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
value.go use go.tools/go/types + simplified pkg structure Jan 13, 2014
world.go

README.md

go-eval

Build Status GoDoc

This is the new home for the exp/eval package: the beginning of an interpreter for Go.

Installation

$ go get github.com/sbinet/go-eval/...

Usage

$ go-eval
:: welcome to go-eval...
(hit ^D to exit)
> hello := "world"
> println(hello)
world
>

Documentation

http://godoc.org/github.com/sbinet/go-eval

Limitations (aka TODO)

  • channels are not implemented
  • imports are not implemented
  • goroutines are not implemented
  • consts are not implemented
  • select is not implemented

Interpreter

The go-eval command is rather barebone. But there is igo which is built on top of the eval package and provides some additional refinements.

See:

$ go get github.com/sbinet/igo