class Test def main is shared word as String = '' x as int = 2 branch x on 1 word = 'one' on 2 word = 'two' on 3 word = 'three' assert word=='two' # add an `else` x = 2 branch x on 1 word = 'one' on 3 word = 'three' else word = 'else' assert word=='else' # for one statement actions, can put on the same line x = 2 branch x on 1, word = 'one' on 3, word = 'three' else, word = 'else' assert word=='else' x = 1 branch x on 1, word = 'one' on 2, word = 'two' assert word=='one' # can have more than one value for `on` x = 2 branch x on 1 or 2 or 3, word = 'number' else, word = 'else' assert word=='number' x = 1 branch x on 1, word = 'one' on 2, word = 'two' def foo # having a method decl right after a branch statement in a previous method used to cause an internal error in parsing pass def bar s = 'aoeu' branch s on 'A', pass # on 'B', pass on 'C', pass else, pass