VM and compiler update (#63)
* renamed test folders and fixed bug where wrong jump labels would be exectuted for rewrite. * Added support for Osize (len(string)) and factored out the array tests * Added current instruction number to VM prompt if program is loaded. * added support for unary expressions. * updated README of and sorted the help commands * updated readme of the compiler * bumped version -> 0.39.0
This commit is contained in:
parent
83e467e527
commit
941bd7e728
19 changed files with 475 additions and 292 deletions
18
pkg/vm/tests/numeric_test.go
Normal file
18
pkg/vm/tests/numeric_test.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package vm_test
|
||||
|
||||
import "math/big"
|
||||
|
||||
var numericTestCases = []testCase{
|
||||
{
|
||||
"add",
|
||||
`
|
||||
package foo
|
||||
func Main() int {
|
||||
x := 2
|
||||
y := 4
|
||||
return x + y
|
||||
}
|
||||
`,
|
||||
big.NewInt(6),
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue