Closed derek-pryor closed 5 years ago
Is it going to workout Ok if the script does a goto into the middle of an ASTStateParallel state?
Ok I see that error_invalid_goto_target.sfn actually tests that it doesn't allow parallel state being used in a jump. Thats good.
Is Goto A State or a Flow Control? ... It looks like it is clearly a state. Perhaps add something in the documentation to explain why this is a state and not a Flow Control?
Yea, I realized that after I implemented it. I was thinking about changing it to goto "state name"
to be more like a flow control structure...
Is it going to workout Ok if the script does a goto into the middle of an ASTStateParallel state?
You cannot do that, as a parallel branches states are self contained. You also cannot goto from a parallel branch to outside of the parallel statement or another branch of the parallel statement. The target verification check helps prevent this.
Adding support for a new
Goto("state name")
state that will allow jumping to any state within the branch of execution. Added a check to verify that the named state is valid.Added for mainly for the use case of common error handling
Edit: Changed the syntax from
Goto('state name')
togoto 'state name'