Exemplo n.º 1
0
func CompileRbc(filename string) (err error) {
	cf, err := rbc.ReadFile(filename)
	if err != nil {
		return
	}

	compiler := &file_compiler{cf}
	file := compiler.compile(filename)

	fset := token.NewFileSet()
	format.Node(os.Stdout, fset, file)
	return
}
Exemplo n.º 2
0
func InterpretRbc(filename string) {
	cf, _ := rbc.ReadFile(filename)
	fmt.Print("Load compiled file into vm ", cf)
}