repo.or.cz
/
boo.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
BOO-996, BOO-995: Added "then" keyword to replace "else" semantic in looping construc...
[boo.git]
/
tests
/
testcases
/
ducky
/
ducky-6.boo
blob
e0ade6f9c54fd69599e11b11cbeed62d56971984
1
"""
2
baz
3
Foo.Call(1, 1, 2)
4
Foo.Call(3, 5, 8)
5
Bar(spam, eggs)
6
Bar.Sprong
7
"""
8
class
Foo
(
callable
):
9
def
Call
(
args
as
(
object
))
as
object
:
10
print
"Foo.Call(${join(args, ', ')})"
11
12
class
Bar
:
13
def constructor
(
first
,
second
):
14
print
"Bar(${first}, ${second})"
15
16
def
Sprong
():
17
print
"Bar.Sprong"
18
19
def
baz
():
20
print
"baz"
21
22
f
as
object
23
f
=
baz
24
f
()
25
26
f
=
Foo
()
27
f
(
"1"
,
"1"
,
"2"
)
28
f
(
3
,
5
,
8
)
29
30
f
=
Bar
31
b
as
Bar
=
f
(
"spam"
,
"eggs"
)
32
f
=
b
.
Sprong
33
f
()
34
35