Gonna checkpoint here at a lot of good progress. Wrote generate_state_automaton, closure, and goto, and they compile and run, though don't work. (they don't crash yet though).

This commit is contained in:
Nathan Braswell
2015-08-04 01:07:33 -04:00
parent be069197ba
commit c987459a77
5 changed files with 106 additions and 6 deletions

View File

@@ -0,0 +1,23 @@
import io:*
import vector:*
obj container {
var v1: vector<int>
var v2: vector<int>
fun construct(): *container {
v1.construct()
v2.construct()
}
fun destruct() {
v1.destruct()
v2.destruct()
}
}
fun main():int {
var c.construct() : container
c.v1 = vector(1); // need this ; otherwise this could ambigiously be one or two lines
(c.v1).for_each(fun(i: int) {
println(i)
})
}