Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,24 @@
// Define our own trace method
define trace => {
local(gb) = givenblock
// Set a depth counter
var(::_tracedepth)->isnota(::integer) ? $_tracedepth = 0
handle => {$_tracedepth--}
// Only output when supplied a capture
#gb ? stdoutnl(
// Indent
('\t' * $_tracedepth++) +
// Type + Method
#gb->self->type + '.' + #gb->calledname +
// Call site file
': ' + #gb->home->callsite_file +
// Line number and column number
' (line '+#gb->home->callsite_line + ', col ' + #gb->home->callsite_col +')'
)
return #gb()
}

View file

@ -0,0 +1,8 @@
define stackexample => type {
public oncreate => trace => { return self }
public inner => trace => { }
public middle => trace => { .inner }
public outer => trace => { .middle }
}
stackexample->outer

View file

@ -0,0 +1,6 @@
proc g() =
writeStackTrace()
proc f() =
g()
f()

View file

@ -0,0 +1,6 @@
: f1 Exception throw("An exception") ;
Integer method: f2 self f1 ;
: f3 f2 ;
: f4 f3 ;
10 f4