1245e29a110133bf7d7c12e943f65e0a4469db4d
At CFG, in pre-order processing, determine the correct type of CompositeLitExpr from its first child (if it's a type) or from the ancestor node. Make sure The type is propagated to children so the algorithm works recursively. Fix also the isType() method to handle case of imported types, either from source or binary packages.
Go interpreter
A Go interpreter in go
Tests
Tests are simple standalone go programs to be run by gi executable.
Scripts are converted to go test examples for execution by go test as well.
To create a new test, simply add a new .gi file, specifying expected output at end of program in a // Output: comment block like in the following example:
package main
func main() {
println("Hello")
}
// Output:
// Hello
Then in _test/, run make to re-generate interp/eval_test.go
When developing/debugging, I'm running gi on a single script, using -a and -c options to display AST and CFG graphs, and instrumenting code with temporary println statements to diagnose problems.
Description
Languages
Go
98.4%
Shell
1.2%
GAP
0.2%
Makefile
0.2%