Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
define mytype => type {
|
||||
public foo() => {
|
||||
return 'foo was called'
|
||||
}
|
||||
public bar() => {
|
||||
return 'this time is was bar'
|
||||
}
|
||||
}
|
||||
local(obj = mytype, methodname = tag('foo'), methodname2 = tag('bar'))
|
||||
#obj->\#methodname->invoke
|
||||
#obj->\#methodname2->invoke
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
obj = script("MyClass").new()
|
||||
-- ...
|
||||
method = #foo
|
||||
arg1 = 23
|
||||
res = call(method, obj, arg1)
|
||||
|
|
@ -0,0 +1 @@
|
|||
16 "sqrt" asMethod perform
|
||||
|
|
@ -0,0 +1 @@
|
|||
16 "sqrt" Word find perform
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
class Example {
|
||||
method foo(x) {
|
||||
42 + x
|
||||
}
|
||||
}
|
||||
|
||||
var name = 'foo'
|
||||
var obj = Example()
|
||||
|
||||
say obj.(name)(5) # prints: 47
|
||||
say obj.method(name)(5) # =//=
|
||||
Loading…
Add table
Add a link
Reference in a new issue