Open
Description
#StatesFC
-machine-
$S1
|e1|
var s:$ = $S2()
foo() ? s = $S3() :|
-> $(s) ^
$S2
$S3
|e|
// ternary expression
var s:$ = foo() ? $S1() : $S2() :|
-> $S4(s) ^
// The transpiler should track z as possibly being either S1 or S2
// and render appropriately.
$S4 [z:$]
var count = 0
|f|
-> $(z) ^
|e|
count = count + 1
count > 4 ? -> $S5 ^ :|
-> $(z) ^ // transition to self
$S5
var s:$ = nil
|e|
// transition label, exit args, state args, enter args
s = $S6(-> "foo", <(1), $(2), >(3)) ^
|e1|
s.-> = "bar"
s.< = (4)
s.$ = (5)
s.> = (6)
-> $(s) ^
-actions-
get_state [x] : $ {
x ? ^($S7()) : ^($S8()) :|
}
##