import kernel
class A
- meth indent(i: Int, j, c: Char)
+ fun indent(i: Int, j, c: Char)
do
var ii = i
while ii > 0 do
i.output
end
- meth foo(i: Int, j: Char)
- with bar
+ fun foo(i: Int, j: Char)
+ !bar
do
if i >= 3 then
indent(i, j, '{')
end
indent(i, j, '[')
- foo(i+1, 'a') with do
- foo(i+1, 'b') with do
- foo(i+1, 'c') with do
+ foo(i+1, 'a') !bar do
+ foo(i+1, 'b') !bar do
+ foo(i+1, 'c') !bar do
indent(i, j, '<')
bar
indent(i, j, '>')
end
end
-meth start
+fun start
do
var a = new A
0.output
- a.foo(0, 'A') with do
- a.foo(0, 'B') with do
- a.foo(0, 'C') with do
+ a.foo(0, 'A') !bar do
+ a.foo(0, 'B') !bar do
+ a.foo(0, 'C') !bar do
1.output
#alt1# break
#alt2# return