Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fenquen/igop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iGo+ The Go/Go+ Interpreter

Go1.14 Go1.15 Go1.16 Go1.17 Go1.18 Go1.19

ABI

support ABI0 and ABIInternal

Generics

support Go1.18 Go1.19 generics

igop command line

Go version < 1.17:

go get -u github.com/goplus/igop/cmd/igop

Go version >= 1.17:

go install github.com/goplus/igop/cmd/igop@latest

Commands

igop             # igop repl mode
igop run         # run a Go/Go+ package
igop build       # compile a Go/Go+ package
igop test        # test a package
igop verson      # print version
igop export      # export Go package to igop builtin package

igop repl mode

igop                       # run repl mode, support Go/Go+
igop repl                  # run repl mode, support Go/Go+
igop repl -gop=false       # run repl mode, disable Go+ syntax

igop test unsupport features

  • test -fuzz
  • test -cover

igop package

run go source

package main

import (
	"github.com/goplus/igop"
	_ "github.com/goplus/igop/pkg/fmt"
)

var source = `
package main

import "fmt"

func main() {
	fmt.Println("hello")
}
`

func main() {
	_, err := igop.RunFile("main.go", source, nil, 0)
	if err != nil {
		panic(err)
	}
}

run gop source

package main

import (
	"github.com/goplus/igop"
	_ "github.com/goplus/igop/gopbuild"
	_ "github.com/goplus/igop/pkg/fmt"
)

var source = `
println "Hello, Go+"
`

func main() {
	_, err := igop.RunFile("main.gop", source, nil, 0)
	if err != nil {
		panic(err)
	}
}

About

The Go/Go+ Interpreter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%