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:
23
tests/test_access_expression.krak
Normal file
23
tests/test_access_expression.krak
Normal 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)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user