forked from TrueCloudLab/neoneo-go
8fe079ec8e
* refactor to use ast.Walk for recursive converting * added lots of test cases * added a new way to handle jump labels * function calls with multiple arguments * binary expression (LOR LAND) * struct types + method receives * cleaner opcode dumps, side by side diff for debugging test cases
15 lines
206 B
Go
15 lines
206 B
Go
package compiler_test
|
|
|
|
var boolTestCases = []testCase{
|
|
{
|
|
"bool assign",
|
|
`
|
|
package foo
|
|
func Main() bool {
|
|
x := true
|
|
return x
|
|
}
|
|
`,
|
|
"52c56b516c766b00527ac46203006c766b00c3616c7566",
|
|
},
|
|
}
|