babygo
babygo copied to clipboard
babygo👶 is a small Go compiler made from scratch, which can compile itself. It's going to be the smallest and simplest go compiler in the world.
Currently in some cases `slice == nil` gives false even if slice is nil. # Expected results when slice is nil, | expression | value | |--------|--------| | slice ==...
* `go run` should be run on macOS * assemble and link and execution should be done in a docker container
Currently, `babygo` supports only simple function calls: ```go defer f() ``` but not method calls; ```go defer obj.method() ``` # How to do it We should capture and save the...
https://go.dev/ref/spec > For convenience, the predeclared type any is an alias for the empty interface.
Spec: https://go.dev/ref/spec#Iota Depends on https://github.com/DQNEO/babygo/issues/116 Ref: iota in minigo https://github.com/DQNEO/minigo/blob/5ab7420fbca2f65d81bc761d5cbe51a2b28953a8/parser.go#L1042-L1071
``` $ gopackages -mode types ./lib/mylib Go package "github.com/DQNEO/babygo/lib/mylib": package mylib has complete exported type info file /Users/DQNEO/src/github.com/DQNEO/babygo/lib/mylib/mylib.go import "github.com/DQNEO/babygo/lib/mylib2" import "os" func InArray(x string, list []string) bool const Msg...