-Subproject commit 288d889c1479bc51f413836bbebeb63031742215
+Subproject commit 879a632ed9372315428c562077f2b8a811ec74dc
g.chan(0);
spork { while(true) { Math.rand2f(100, 800) => s.freq; .15::second => now; }};
for(int i; i < 5; i++) {
- <<<g.op()>>>;
+ <<< g.op() >>>;
i => g.op;
2::second => now;
}
[1,2,3,4];
[ [1,2,3,4], [1,2,3,4] ];
-<<<[1,2,3,4]>>>;
+<<< [1,2,3,4] >>>;
int i[];
int j[3];
Object o[2];
int k[1][1];
-<<<i, " ", j, " ", o, " ", p, " ", r, " ", s, " ", t, " ", k>>>;
+<<< i, " ", j, " ", o, " ", p, " ", r, " ", s, " ", t, " ", k >>>;
[ 1.0, 2, 3, 4, 5 ];
[ #(0.0, 0.0) ];
}
A a[4][4];
-<<<a[2][3]>>>;
-<<<2 => a[2][3].i>>>;
+<<< a[2][3] >>>;
+<<< 2 => a[2][3].i >>>;
int i[4][4];
-<<<54 => i[2][3]>>>;
+<<< 54 => i[2][3] >>>;
float f[4][4];
-<<<f[2][3]>>>;
-<<<12.345 => f[2][3]>>>;
+<<< f[2][3] >>>;
+<<< 12.345 => f[2][3] >>>;
complex c[4][4];
-<<<c[2][3]>>>;
-<<<c[2][3].re>>>;
+<<< c[2][3] >>>;
+<<< c[2][3].re >>>;
polar p[4][4];
-<<<p[2][3]>>>;
-<<<p[2][3].mod>>>;
+<<< p[2][3] >>>;
+<<< p[2][3].mod >>>;
Vec3 v[4][4];
-<<<v[2][3]>>>;
-<<<v[2][3].x>>>;
+<<< v[2][3] >>>;
+<<< v[2][3].x >>>;
Vec4 w[4][4];
-<<<w[2][3]>>>;
-<<<w[2][3].w>>>;
-<<<a[2][3].i>>>;
+<<< w[2][3] >>>;
+<<< w[2][3].w >>>;
+<<< a[2][3].i >>>;
Object i[4];
for(auto a: i)
- <<<a>>>;
+ <<< a >>>;
-fun void test<~A~>(A a) { <<<a>>>; }
+fun void test<~A~>(A a) { <<< a >>>; }
1 => test;
1.3 => test;
test(1);
-<<< dac.chan(-1) >>>;
-<<< dac.chan(12) >>>;
-<<< dac.chan(0) >>>;
+<<< dac.chan(-1) >>>;
+<<< dac.chan(12) >>>;
+<<< dac.chan(0) >>>;
-<<<Machine.check("SinOsc s => dac; second => now;")>>>;
+<<< Machine.check("SinOsc s => dac; second => now;") >>>;
}
C c;
-<<<c>>>;
+<<< c >>>;
Vec3 v;
Vec4 w;
Object o;
- dtor { <<<"dtor">>>; }
+ dtor { <<< "dtor" >>>; }
}
C c;
-<<<c>>>;
+<<< c >>>;
two,
three
};
- <<<zero, " ", one, " ", two, " ", three>>>;
+ <<< zero, " ", one, " ", two, " ", three >>>;
}
C c;
-<<<c>>>;
+<<< c >>>;
-fun void test() { <<<"member function.">>>; }
+fun void test() { <<< "member function." >>>; }
class C {
typedef void func_t();
// typedef static void s_func_t();
func_t func_p;
// static fun c_t s_func_p;
// static s_func_t s_ptr;
- fun void test() { <<<"member function.">>>; }
- fun void test2() { <<<"member function variant.">>>; }
-// fun static void s_test() { <<<"member fun.">>>; }
+ fun void test() { <<< "member function." >>>; }
+ fun void test2() { <<< "member function variant." >>>; }
+// fun static void s_test() { <<< "member fun." >>>; }
// test @=> func_p;
// test @=> s_ptr;
//func_p();
test();
-//<<<test>>>;//, func_p>>>;
+//<<< test >>>;//, func_p >>>;
}
"test";
second => now;
string s;
- <<< "test spork exp." >>>;
+ <<< "test spork exp." >>>;
} @=> Shred @shred;
}
C c;
-<<<c>>>;
+<<< c >>>;
me.yield();
second => now;
class C
{
fun void test() {
- <<<"here">>>;
+ <<< "here" >>>;
samp => now;
- <<<"and now">>>;
+ <<< "and now" >>>;
}
spork this.test();
}
a.im;
a + b;
-<<<a - b>>>;
+<<< a - b >>>;
a * b;
a / b;
a => b;
a *=> b;
a /=> b;
-<<<"end">>>;
+<<< "end" >>>;
12 => a.re;
1.4 => a.im;
-<<<a.re>>>;
-<<<a.im>>>;
+<<< a.re >>>;
+<<< a.im >>>;
}
second => now;
//second => now;
-<<<"base ", me>>>;
+<<< "base ", me >>>;
//TestEvent.e => now;
-<<<"ok">>>;
+<<< "ok" >>>;
second => now;
-<<<1 + 2 * 3>>>;
+<<< 1 + 2 * 3 >>>;
int i;
-<<<2 => i>>>;
-<<<i>>>;
-<<<i +=> i>>>;
-<<<13 => i>>>;
-<<<i>>>;
-<<<i +=> i>>>;
-<<<i>>>;
+<<< 2 => i >>>;
+<<< i >>>;
+<<< i +=> i >>>;
+<<< 13 => i >>>;
+<<< i >>>;
+<<< i +=> i >>>;
+<<< i >>>;
-<<<1 + 3 + i>>>;
-<<<i++>>>;
-<<<++i>>>;
-<<<i-->>>;
-<<<--i>>>;
+<<< 1 + 3 + i >>>;
+<<< i++ >>>;
+<<< ++i >>>;
+<<< i-- >>>;
+<<< --i >>>;
int i;
-<<<i>>>;
+<<< i >>>;
int i;
float f;
-do { <<<i++>>>; if(maybe) break; }
+do { <<< i++ >>>; if(maybe) break; }
until(i < 10);
-do { <<<1 +=> f>>>; if(maybe)continue; }
+do { <<< 1 +=> f >>>; if(maybe)continue; }
until(f);
Machine.add("examples/int.gw");
-Machine.compile("int i;<<<120>>>;");
+Machine.compile("int i;<<< 120 >>>;");
//Machine.compile("int i[error];");
-<<<Machine.check("12 => int i; <<<i>>>")>>>;
+<<< Machine.check("12 => int i; <<< i >>>") >>>;
Machine.check("int i[error];");
Machine.check(null);
class C
{
- dtor {<<<1>>>;}
+ dtor {<<< 1 >>>;}
}
C c;
C d;
//me.yield();
-<<<"end of dtor test.">>>;
-<<<c," ", d>>>;
+<<< "end of dtor test." >>>;
+<<< c," ", d >>>;
3 => const int i;
2 => const int y;
switch(i) {
- case 1: <<<1>>>;break;
- case 3: <<<3>>>;break;
- case y: <<<2>>>;break;
+ case 1: <<< 1 >>>;break;
+ case 3: <<< 3 >>>;break;
+ case y: <<< 2 >>>;break;
default:
- <<<"0">>>;
+ <<< "0" >>>;
}
-<<<y>>>;
+<<< y >>>;
"test" => string @s;
-<<< s >>>;
+<<< s >>>;
-<<<"\0\'\\\a\b\f\n\r\t\v">>>;
+<<< "\0\'\\\a\b\f\n\r\t\v" >>>;
'\0';
'\'';
'\\';
Event e;
-spork { <<<second => now>>>; e.broadcast(); };
-<<<e => now>>>;
+spork { <<< second => now >>>; e.broadcast(); };
+<<< e => now >>>;
class C extends int[2] {
- <<<"test">>>;
+ <<< "test" >>>;
123 => int i;
}
C c;
-<<<c.size()>>>;
-<<<c.i>>>;
+<<< c.size() >>>;
+<<< c.i >>>;
{
float variable1;
float variable2;
- <<< variable1=variable2 >>>;
+ <<< variable1=variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1+variable2 >>>;
+ <<< variable1+variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1-variable2 >>>;
+ <<< variable1-variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1*variable2 >>>;
+ <<< variable1*variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1/variable2 >>>;
+ <<< variable1/variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1&&variable2 >>>;
+ <<< variable1&&variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1||variable2 >>>;
+ <<< variable1||variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1==variable2 >>>;
+ <<< variable1==variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1!=variable2 >>>;
+ <<< variable1!=variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1>variable2 >>>;
+ <<< variable1>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1>=variable2 >>>;
+ <<< variable1>=variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1<variable2 >>>;
+ <<< variable1<variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1<=variable2 >>>;
+ <<< variable1<=variable2 >>>;
}
//testing operator for and float
{
float variable2;
- <<< -variable2 >>>;
+ <<< -variable2 >>>;
}
//testing operator for and int
{
int variable2;
- <<< !variable2 >>>;
+ <<< !variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1=>variable2 >>>;
+ <<< variable1=>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1+=>variable2 >>>;
+ <<< variable1+=>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1-=>variable2 >>>;
+ <<< variable1-=>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
- <<< variable1*=>variable2 >>>;
+ <<< variable1*=>variable2 >>>;
}
//testing operator for float and float
{
1 => float variable1;
1 => float variable2;
- <<< variable1/=>variable2 >>>;
+ <<< variable1/=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1=variable2 >>>;
+ <<< variable1=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1+variable2 >>>;
+ <<< variable1+variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1-variable2 >>>;
+ <<< variable1-variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1*variable2 >>>;
+ <<< variable1*variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1/variable2 >>>;
+ <<< variable1/variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1&&variable2 >>>;
+ <<< variable1&&variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1||variable2 >>>;
+ <<< variable1||variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1==variable2 >>>;
+ <<< variable1==variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1!=variable2 >>>;
+ <<< variable1!=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1>variable2 >>>;
+ <<< variable1>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1>=variable2 >>>;
+ <<< variable1>=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1<variable2 >>>;
+ <<< variable1<variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1<=variable2 >>>;
+ <<< variable1<=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1=>variable2 >>>;
+ <<< variable1=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1+=>variable2 >>>;
+ <<< variable1+=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1-=>variable2 >>>;
+ <<< variable1-=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
- <<< variable1*=>variable2 >>>;
+ <<< variable1*=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
1 => float variable2;
- <<< variable1/=>variable2 >>>;
+ <<< variable1/=>variable2 >>>;
}
{
float variable1;
int variable2;
- <<< variable1=variable2 >>>;
+ <<< variable1=variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1+variable2 >>>;
+ <<< variable1+variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1-variable2 >>>;
+ <<< variable1-variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1*variable2 >>>;
+ <<< variable1*variable2 >>>;
}
{
float variable1;
int variable2;
- <<< variable1/variable2 >>>;
+ <<< variable1/variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1&&variable2 >>>;
+ <<< variable1&&variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1||variable2 >>>;
+ <<< variable1||variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1==variable2 >>>;
+ <<< variable1==variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1!=variable2 >>>;
+ <<< variable1!=variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1>variable2 >>>;
+ <<< variable1>variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1>=variable2 >>>;
+ <<< variable1>=variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1<variable2 >>>;
+ <<< variable1<variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1<=variable2 >>>;
+ <<< variable1<=variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1=>variable2 >>>;
+ <<< variable1=>variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1+=>variable2 >>>;
+ <<< variable1+=>variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1-=>variable2 >>>;
+ <<< variable1-=>variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
- <<< variable1*=>variable2 >>>;
+ <<< variable1*=>variable2 >>>;
}
//testing operator for float and int
{
1 => float variable1;
1 => int variable2;
- <<< variable1/=>variable2 >>>;
+ <<< variable1/=>variable2 >>>;
}
fork {
- <<<"start">>>;
+ <<< "start" >>>;
12::samp => now;
me.test_cancel();
- <<<"stop">>>;
+ <<< "stop" >>>;
} @=> Fork @f;
1 => f.cancel;
fun float testf(){ return 1.1; }
fun float testf(float f){ return f; }
-<<<testf()>>>;
-<<<testf(1.4)>>>;
+<<< testf() >>>;
+<<< testf(1.4) >>>;
typedef void func_t();
func_t func_p;
-fun void test1() { <<<"test1">>>; }
-fun void test2() { <<<"test2">>>; }
+fun void test1() { <<< "test1" >>>; }
+fun void test2() { <<< "test2" >>>; }
test1 @=> func_p;
func_p();
func_p();
func_p();
() => func_p;
-<<<func_p>>>;
-<<<func_p()>>>;
+<<< func_p >>>;
+<<< func_p() >>>;
test2 @=> func_p;
func_p();
func_p();
typedef void Test()
// define a few funs
-fun void test1(){ <<<"test">>>; };
-fun void test2(){ <<<"another test">>>; };
-fun void test3(){ <<<"yet another test">>>; };
+fun void test1(){ <<< "test" >>>; };
+fun void test2(){ <<< "another test" >>>; };
+fun void test3(){ <<< "yet another test" >>>; };
// create a fun pointer instance
Test test;
test3 @=> test;
test();
-<<< test3 $ Test>>>;
+<<< test3 $ Test >>>;
class C {
- fun void test<~a~>(a var){ <<<var>>>; }
+ fun void test<~a~>(a var){ <<< var >>>; }
class D { int i;}
}
C->D d;
C->D @d_ref;
-<<< c, " ", d, d_ref >>>;
+<<< c, " ", d, d_ref >>>;
{
int variable1;
int variable2;
-<<< variable1=variable2 >>>;
+<<< variable1=variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1+variable2 >>>;
+<<< variable1+variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1-variable2 >>>;
+<<< variable1-variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1*variable2 >>>;
+<<< variable1*variable2 >>>;
}
//testing operator for int and int
{
int variable1;
1 => int variable2;
-<<< variable1/variable2 >>>;
+<<< variable1/variable2 >>>;
}
//testing operator for int and int
{
int variable1;
1 => int variable2;
-<<< variable1%variable2 >>>;
+<<< variable1%variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1&&variable2 >>>;
+<<< variable1&&variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1||variable2 >>>;
+<<< variable1||variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1==variable2 >>>;
+<<< variable1==variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1!=variable2 >>>;
+<<< variable1!=variable2 >>>;
}
//testing operator for Object and
{
Object @variable1;
-<<< variable1!= null>>>;
+<<< variable1!= null >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1>variable2 >>>;
+<<< variable1>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1>=variable2 >>>;
+<<< variable1>=variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1<variable2 >>>;
+<<< variable1<variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1<=variable2 >>>;
+<<< variable1<=variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1>>variable2 >>>;
+<<< variable1>>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1<<variable2 >>>;
+<<< variable1<<variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1&variable2 >>>;
+<<< variable1&variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1|variable2 >>>;
+<<< variable1|variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1^variable2 >>>;
+<<< variable1^variable2 >>>;
}
//testing operator for and int
{
int variable2;
-<<< -variable2 >>>;
+<<< -variable2 >>>;
}
//testing operator for and int
{
int variable2;
-<<< !variable2 >>>;
+<<< !variable2 >>>;
}
//testing operator for int and
{
int variable1;
-<<< variable1++ >>>;
+<<< variable1++ >>>;
}
//testing operator for and int
{
int variable2;
-<<< ++variable2 >>>;
+<<< ++variable2 >>>;
}
//testing operator for int and
{
int variable1;
-<<< variable1-- >>>;
+<<< variable1-- >>>;
}
//testing operator for and int
{
int variable2;
-<<< --variable2 >>>;
+<<< --variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1=>variable2 >>>;
+<<< variable1=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1+=>variable2 >>>;
+<<< variable1+=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1-=>variable2 >>>;
+<<< variable1-=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1*=>variable2 >>>;
+<<< variable1*=>variable2 >>>;
}
//testing operator for int and int
{
1 => int variable1;
1 => int variable2;
-<<< variable1/=>variable2 >>>;
+<<< variable1/=>variable2 >>>;
}
//testing operator for int and int
{
1 => int variable1;
int variable2;
-<<< variable1%=>variable2 >>>;
+<<< variable1%=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1<<=>variable2 >>>;
+<<< variable1<<=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1>>=>variable2 >>>;
+<<< variable1>>=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1&=>variable2 >>>;
+<<< variable1&=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1|=>variable2 >>>;
+<<< variable1|=>variable2 >>>;
}
//testing operator for int and int
{
int variable1;
int variable2;
-<<< variable1^=>variable2 >>>;
+<<< variable1^=>variable2 >>>;
}
// testing cmp
~1;
-<<< Math.abs(-1) >>>;
-<<< Math.fabs(-1) >>>;
-<<< Math.fabs(-1.0) >>>;
-<<< Math.rand() >>>;
-<<< Math.rand2(0, 0) >>>;
-<<< Math.rand2(-1, 1) >>>;
-<<< Math.rand2(1, -1) >>>;
-<<< Math.randf() >>>;
-<<< Math.rand2f(-1, 1) >>>;
-<<< Math.rand2f(-1.0, 1) >>>;
-<<< Math.rand2f(-1, 1.0) >>>;
-<<< Math.rand2f(-1.0, 1.0) >>>;
-<<< Math.srand(1.2) >>>;
-<<< Math.sgn(1) >>>;
-<<< Math.sgn(-1) >>>;
-<<< Math.sgn(1.0) >>>;
-<<< Math.sgn(-1.0) >>>;
+<<< Math.abs(-1) >>>;
+<<< Math.fabs(-1) >>>;
+<<< Math.fabs(-1.0) >>>;
+<<< Math.rand() >>>;
+<<< Math.rand2(0, 0) >>>;
+<<< Math.rand2(-1, 1) >>>;
+<<< Math.rand2(1, -1) >>>;
+<<< Math.randf() >>>;
+<<< Math.rand2f(-1, 1) >>>;
+<<< Math.rand2f(-1.0, 1) >>>;
+<<< Math.rand2f(-1, 1.0) >>>;
+<<< Math.rand2f(-1.0, 1.0) >>>;
+<<< Math.srand(1.2) >>>;
+<<< Math.sgn(1) >>>;
+<<< Math.sgn(-1) >>>;
+<<< Math.sgn(1.0) >>>;
+<<< Math.sgn(-1.0) >>>;
-<<< Math.hypot(4,5) >>>;
+<<< Math.hypot(4,5) >>>;
// sin
-<<< Math.sin(1) >>>;
-<<< Math.sin(1.0) >>>;
-<<< Math.sinh(1) >>>;
-<<< Math.sinh(1.0) >>>;
-<<< Math.asin(1) >>>;
-<<< Math.asin(1.0) >>>;
-<<< Math.asinh(1) >>>;
-<<< Math.asinh(1.0) >>>;
+<<< Math.sin(1) >>>;
+<<< Math.sin(1.0) >>>;
+<<< Math.sinh(1) >>>;
+<<< Math.sinh(1.0) >>>;
+<<< Math.asin(1) >>>;
+<<< Math.asin(1.0) >>>;
+<<< Math.asinh(1) >>>;
+<<< Math.asinh(1.0) >>>;
// cos
-<<< Math.cos(1) >>>;
-<<< Math.cos(1.0) >>>;
-<<< Math.cosh(1) >>>;
-<<< Math.cosh(1.0) >>>;
-<<< Math.acos(1) >>>;
-<<< Math.acos(1.0) >>>;
-<<< Math.acosh(1) >>>;
-<<< Math.acosh(1.0) >>>;
+<<< Math.cos(1) >>>;
+<<< Math.cos(1.0) >>>;
+<<< Math.cosh(1) >>>;
+<<< Math.cosh(1.0) >>>;
+<<< Math.acos(1) >>>;
+<<< Math.acos(1.0) >>>;
+<<< Math.acosh(1) >>>;
+<<< Math.acosh(1.0) >>>;
// tan
-<<< Math.tan(1) >>>;
-<<< Math.tan(1.0) >>>;
-<<< Math.tanh(1) >>>;
-<<< Math.tanh(1.0) >>>;
-<<< Math.atan(1) >>>;
-<<< Math.atan(1.0) >>>;
-<<< Math.atanh(1) >>>;
-<<< Math.atanh(1.0) >>>;
+<<< Math.tan(1) >>>;
+<<< Math.tan(1.0) >>>;
+<<< Math.tanh(1) >>>;
+<<< Math.tanh(1.0) >>>;
+<<< Math.atan(1) >>>;
+<<< Math.atan(1.0) >>>;
+<<< Math.atanh(1) >>>;
+<<< Math.atanh(1.0) >>>;
-<<< Math.pow(2, 2) >>>;
-<<< Math.pow(2.0, 2) >>>;
-<<< Math.pow(2, 2.0) >>>;
-<<< Math.pow(2.0, 2.0) >>>;
+<<< Math.pow(2, 2) >>>;
+<<< Math.pow(2.0, 2) >>>;
+<<< Math.pow(2, 2.0) >>>;
+<<< Math.pow(2.0, 2.0) >>>;
-<<< Math.sqrt(2) >>>;
-<<< Math.sqrt(2.0) >>>;
-<<< Math.exp(2) >>>;
-<<< Math.exp(2.0) >>>;
-<<< Math.log(2) >>>;
-<<< Math.log(2.0) >>>;
-<<< Math.log2(2) >>>;
-<<< Math.log2(2.0) >>>;
-<<< Math.log10(2) >>>;
-<<< Math.log10(2.0) >>>;
-<<< Math.floor(2) >>>;
-<<< Math.floor(2.0) >>>;
-<<< Math.ceil(2) >>>;
-<<< Math.ceil(2.0) >>>;
-<<< Math.round(2) >>>;
-<<< Math.round(2.0) >>>;
-<<< Math.trunc(2) >>>;
-<<< Math.trunc(2.0) >>>;
-<<< Math.fmod(2, 2) >>>;
-<<< Math.fmod(2.0, 2) >>>;
-<<< Math.fmod(2, 2.0) >>>;
-<<< Math.fmod(2.0, 2.0) >>>;
-<<< Math.remainder(2, 2) >>>;
-<<< Math.remainder(2.0, 2) >>>;
-<<< Math.remainder(2, 2.0) >>>;
-<<< Math.remainder(2.0, 2.0) >>>;
-<<< Math.min(2, 2) >>>;
-<<< Math.min(2.0, 2) >>>;
-<<< Math.min(2, 2.0) >>>;
-<<< Math.min(2.0, 2.0) >>>;
-<<< Math.max(2, 2) >>>;
-<<< Math.max(2.0, 2) >>>;
-<<< Math.max(2, 2.0) >>>;
-<<< Math.max(2.0, 2.0) >>>;
-<<< Math.atan2(2.0, 2.0) >>>;
-<<< Math.isinf(2) >>>;
-<<< Math.isinf(2.0) >>>;
-<<< Math.isnan(2) >>>;
-<<< Math.isnan(2.0) >>>;
+<<< Math.sqrt(2) >>>;
+<<< Math.sqrt(2.0) >>>;
+<<< Math.exp(2) >>>;
+<<< Math.exp(2.0) >>>;
+<<< Math.log(2) >>>;
+<<< Math.log(2.0) >>>;
+<<< Math.log2(2) >>>;
+<<< Math.log2(2.0) >>>;
+<<< Math.log10(2) >>>;
+<<< Math.log10(2.0) >>>;
+<<< Math.floor(2) >>>;
+<<< Math.floor(2.0) >>>;
+<<< Math.ceil(2) >>>;
+<<< Math.ceil(2.0) >>>;
+<<< Math.round(2) >>>;
+<<< Math.round(2.0) >>>;
+<<< Math.trunc(2) >>>;
+<<< Math.trunc(2.0) >>>;
+<<< Math.fmod(2, 2) >>>;
+<<< Math.fmod(2.0, 2) >>>;
+<<< Math.fmod(2, 2.0) >>>;
+<<< Math.fmod(2.0, 2.0) >>>;
+<<< Math.remainder(2, 2) >>>;
+<<< Math.remainder(2.0, 2) >>>;
+<<< Math.remainder(2, 2.0) >>>;
+<<< Math.remainder(2.0, 2.0) >>>;
+<<< Math.min(2, 2) >>>;
+<<< Math.min(2.0, 2) >>>;
+<<< Math.min(2, 2.0) >>>;
+<<< Math.min(2.0, 2.0) >>>;
+<<< Math.max(2, 2) >>>;
+<<< Math.max(2.0, 2) >>>;
+<<< Math.max(2, 2.0) >>>;
+<<< Math.max(2.0, 2.0) >>>;
+<<< Math.atan2(2.0, 2.0) >>>;
+<<< Math.isinf(2) >>>;
+<<< Math.isinf(2.0) >>>;
+<<< Math.isnan(2) >>>;
+<<< Math.isnan(2.0) >>>;
C c;
// read members
-<<< c.i, c.c, c.f, c.v, c.w, c.o >>>;
+<<< c.i, c.c, c.f, c.v, c.w, c.o >>>;
// call fun members
-<<< c.m_i(), " ", c.m_f(), " ", c.m_c(), " ",
- c.m_v(), " ", c.m_w(), " ", c.m_o()>>>;
+<<< c.m_i(), " ", c.m_f(), " ", c.m_c(), " ",
+ c.m_v(), " ", c.m_w(), " ", c.m_o() >>>;
// write members
-<<< 12 => c.i >>>;
-<<< 1.2 => c.f >>>;
-<<< #(0.1, 2.3) => c.c >>>;
-<<< @(0.1, 2.3, 3.4) => c.v >>>;
-<<< @(0.1, 2.3, 3.4, 5.4) => c.w >>>;
-<<< null @=> c.o >>>;
+<<< 12 => c.i >>>;
+<<< 1.2 => c.f >>>;
+<<< #(0.1, 2.3) => c.c >>>;
+<<< @(0.1, 2.3, 3.4) => c.v >>>;
+<<< @(0.1, 2.3, 3.4, 5.4) => c.w >>>;
+<<< null @=> c.o >>>;
}
C c;
-<<<c.testf()>>>;
-<<<c.testf(1.4)>>>;
-<<<1.2>>>;
+<<< c.testf() >>>;
+<<< c.testf(1.4) >>>;
+<<< 1.2 >>>;
Impulse i => FullRect f => blackhole;
Step step => blackhole;
second => now;
-<<<"end">>>;
+<<< "end" >>>;
step =< blackhole;
Object o;
string s;
-<<< o + s >>>;
+<<< o + s >>>;
//! test operator
operator => void (Object o, int i) {
- <<<o, " ", i, " success">>>;
+ <<< o, " ", i, " success" >>>;
}
class C {
//! assign object to C.ref
operator => void (Object o, C c) {
o @=> c.ref;
- <<<"success">>>;
+ <<< "success" >>>;
}
//operator int plusplus(null d, int i){}
int i;
Object o;
-<<<o, " ", i>>>;
+<<< o, " ", i >>>;
12 => i;
//o => i;
C c;
float f;
}
-operator => float (C c, C d){ <<<"float => C: ", c.f => d.f>>>; return 2.0;}
-operator => int (int i, C d){ <<<"int => C: ", i => d.f>>>; return 2;}
-operator => float (float f, C d){ <<<"float => C: ", f => d.f>>>; return 2.0;}
-operator => complex (complex c, C d){ <<<"complex => C: ", c.re => d.f>>>; return #(1.2, 6.1);}
-operator => polar (polar c, C d){ <<<"complex => C: ", c.mod => d.f>>>; return %(2.3, 4.1);}
-operator => Vec3 (Vec3 c, C d){ <<<c.z => d.f>>>; return @(1.2, 6.1, 2.3);}
-operator => Vec4 (Vec4 c, C d){ <<<"Vec4 => C: ", c.w => d.f>>>; return @(1.2, 6.1, 2.3, 9.3);}
+operator => float (C c, C d){ <<< "float => C: ", c.f => d.f >>>; return 2.0;}
+operator => int (int i, C d){ <<< "int => C: ", i => d.f >>>; return 2;}
+operator => float (float f, C d){ <<< "float => C: ", f => d.f >>>; return 2.0;}
+operator => complex (complex c, C d){ <<< "complex => C: ", c.re => d.f >>>; return #(1.2, 6.1);}
+operator => polar (polar c, C d){ <<< "complex => C: ", c.mod => d.f >>>; return %(2.3, 4.1);}
+operator => Vec3 (Vec3 c, C d){ <<< c.z => d.f >>>; return @(1.2, 6.1, 2.3);}
+operator => Vec4 (Vec4 c, C d){ <<< "Vec4 => C: ", c.w => d.f >>>; return @(1.2, 6.1, 2.3, 9.3);}
-operator => float (C d, int c){ <<<"int => C: ", c => d.f>>>; return 2.0;}
-operator => float (C d, float f){ <<<"C => float: ", f => d.f>>>; return 2.0;}
+operator => float (C d, int c){ <<< "int => C: ", c => d.f >>>; return 2.0;}
+operator => float (C d, float f){ <<< "C => float: ", f => d.f >>>; return 2.0;}
-operator => float (Vec3 v, float f){ <<<"vec3 => C: ", f, " ", v.x => f>>>; return 2.0;}
+operator => float (Vec3 v, float f){ <<< "vec3 => C: ", f, " ", v.x => f >>>; return 2.0;}
-operator => complex (C d, complex c){ <<<"complex => C: ", c.re => d.f>>>; return #(1.2, 6.1);}
-operator => polar (C d, polar c){ <<<"complex => C: ", c.mod => d.f>>>; return %(2.3, 4.1);}
-operator => Vec3 (C d, Vec3 c){ <<<c.z => d.f>>>; return @(1.2, 6.1, 2.3);}
-operator => Vec4 (C d, Vec4 c){ <<<"Vec4 => C: ", c.w => d.f>>>; return @(1.2, 6.1, 2.3, 9.3);}
+operator => complex (C d, complex c){ <<< "complex => C: ", c.re => d.f >>>; return #(1.2, 6.1);}
+operator => polar (C d, polar c){ <<< "complex => C: ", c.mod => d.f >>>; return %(2.3, 4.1);}
+operator => Vec3 (C d, Vec3 c){ <<< c.z => d.f >>>; return @(1.2, 6.1, 2.3);}
+operator => Vec4 (C d, Vec4 c){ <<< "Vec4 => C: ", c.w => d.f >>>; return @(1.2, 6.1, 2.3, 9.3);}
C c, d;
12.3 => c.f;
-<<< c => d >>>;
-<<< 2 => d >>>;
-<<< 2.3 => d >>>;
-<<< #(7.2, 1.4) => d >>>;
-<<< %(7.2, 1.4) => d >>>;
-<<< @(7.2, 1.4, 8.3)>>>;
-<<< @(7.2, 1.4, 8.3) => d >>>;
-<<< @(7.2, 1.4, 8.3, 2.3) => d >>>;
+<<< c => d >>>;
+<<< 2 => d >>>;
+<<< 2.3 => d >>>;
+<<< #(7.2, 1.4) => d >>>;
+<<< %(7.2, 1.4) => d >>>;
+<<< @(7.2, 1.4, 8.3) >>>;
+<<< @(7.2, 1.4, 8.3) => d >>>;
+<<< @(7.2, 1.4, 8.3, 2.3) => d >>>;
int i;
2 => float f;
complex cmp;
Vec3 v;
-<<<f>>>;
+<<< f >>>;
v => f;
Vec4 w;
c => i;
-<<<c.f>>>;
-<<<f>>>;
+<<< c.f >>>;
+<<< f >>>;
c => f;
c => cmp;
c => v;
typedef void Test();
fun void test1(){};
Test test0;
- <<<test1 @=> test0>>>;
+ <<< test1 @=> test0 >>>;
}
C c;
-<<<c>>>;
+<<< c >>>;
repeat(3)
- <<<1>>>;
+ <<< 1 >>>;
-<<< "id ", me.id() >>>;
-<<< "running ", me.running() >>>;
-<<< "done ", me.done() >>>;
-<<< "from_Id ", Shred.fromId(0) >>>;
-<<< "from_Id ", Shred.fromId(1) >>>;
-<<< "me ", me >>>;
-<<< "args ", me.args() >>>;
+<<< "id ", me.id() >>>;
+<<< "running ", me.running() >>>;
+<<< "done ", me.done() >>>;
+<<< "from_Id ", Shred.fromId(0) >>>;
+<<< "from_Id ", Shred.fromId(1) >>>;
+<<< "me ", me >>>;
+<<< "args ", me.args() >>>;
for (int i; i < me.args(); i++)
- <<< "arg ", i, me.arg(i)>>>;
-<<<me.dir(), " ", me.path()>>>;
-<<<me.code_dir(), " ", me.code_path()>>>;
+ <<< "arg ", i, me.arg(i) >>>;
+<<< me.dir(), " ", me.path() >>>;
+<<< me.code_dir(), " ", me.code_path() >>>;
//me.exit();
// call to non existant arg
-<<<me.arg(-1)>>>;
+<<< me.arg(-1) >>>;
-fun void t() { 2::second => now; <<<"child ", me.id()>>>; };
+fun void t() { 2::second => now; <<< "child ", me.id() >>>; };
spork t();
-spork \{ 2::second => now; <<<"child ", me.id()>>>; }();
-spork { 2::second => now; <<<"child ", me.id()>>>; };
-<<<"start">>>;
+spork \{ 2::second => now; <<< "child ", me.id() >>>; }();
+spork { 2::second => now; <<< "child ", me.id() >>>; };
+<<< "start" >>>;
second => now;
-<<<me.id(), " end">>>;
+<<< me.id(), " end" >>>;
SinOsc sinosc => dac;
-<<<second>>>;
+<<< second >>>;
5::second => now;
{
12 => int i;
Object o;
-<<<this>>>;
+<<< this >>>;
spork {
"test";
second => now;
string s;
- <<< this, " test spork exp. " , s>>>;
+ <<< this, " test spork exp. " , s >>>;
} @=> Shred @shred;
}
C c;
-<<<c>>>;
+<<< c >>>;
me.yield();
second => now;
class C
{
fun void test(int i) {
- <<<"here => ", i>>>;
+ <<< "here => ", i >>>;
samp => now;
- <<<"and now">>>;
+ <<< "and now" >>>;
}
}
-spork \ a { <<<a>>>;}(1);
+spork \ a { <<< a >>>;}(1);
me.yield();
}
// read members
-<<< C.i, C.c, C.f, C.v, C.w, C.o >>>;
+<<< C.i, C.c, C.f, C.v, C.w, C.o >>>;
// call fun members
-<<< C._i(), " ", C._f(), " ", C._c(), " ", C._v(), " ", C._w(), " ", C._o()>>>;
+<<< C._i(), " ", C._f(), " ", C._c(), " ", C._v(), " ", C._w(), " ", C._o() >>>;
// write members
-<<< 12 => C.i >>>;
-<<< 1.2 => C.f >>>;
-<<< #(0.1, 2.3) => C.c >>>;
-<<< @(0.1, 2.3, 3.4) => C.v >>>;
-<<< @(0.1, 2.3, 3.4, 5.4) => C.w >>>;
-<<< null @=> C.o >>>;
+<<< 12 => C.i >>>;
+<<< 1.2 => C.f >>>;
+<<< #(0.1, 2.3) => C.c >>>;
+<<< @(0.1, 2.3, 3.4) => C.v >>>;
+<<< @(0.1, 2.3, 3.4, 5.4) => C.w >>>;
+<<< null @=> C.o >>>;
-<<< Std.clamp(2, 0, 2) >>>;
-<<< Std.clampf(2, 0, 2) >>>;
-<<< Std.scale(.5, 0, 1, 3, 4) >>>;
-<<< Std.system("echo $PWD") >>>;
-<<< Std.setenv("TEST_VAR", "test me") >>>;
-<<< Std.getenv("TEST_VAR") >>>;
-<<< Std.atoi("102") >>>;
-<<< Std.atof("0.2") >>>;
-<<< Std.itoa(1) >>>;
-<<< Std.ctoa('a') >>>;
-<<< Std.ftoa(1.2) >>>;
-<<< Std.mtof(60) >>>;
-<<< Std.ftom(440) >>>;
-<<< Std.powtodb(440) >>>;
-<<< Std.rmstodb(440) >>>;
-<<< Std.dbtopow(440) >>>;
-<<< Std.dbtorms(440) >>>;
-<<< Std.dbtolin(440) >>>;
-<<< Std.lintodb(440) >>>;
+<<< Std.clamp(2, 0, 2) >>>;
+<<< Std.clampf(2, 0, 2) >>>;
+<<< Std.scale(.5, 0, 1, 3, 4) >>>;
+<<< Std.system("echo $PWD") >>>;
+<<< Std.setenv("TEST_VAR", "test me") >>>;
+<<< Std.getenv("TEST_VAR") >>>;
+<<< Std.atoi("102") >>>;
+<<< Std.atof("0.2") >>>;
+<<< Std.itoa(1) >>>;
+<<< Std.ctoa('a') >>>;
+<<< Std.ftoa(1.2) >>>;
+<<< Std.mtof(60) >>>;
+<<< Std.ftom(440) >>>;
+<<< Std.powtodb(440) >>>;
+<<< Std.rmstodb(440) >>>;
+<<< Std.dbtopow(440) >>>;
+<<< Std.dbtorms(440) >>>;
+<<< Std.dbtolin(440) >>>;
+<<< Std.lintodb(440) >>>;
s.erase(1, 2);
-<<<" su".ltrim()>>>;
-<<<" su ".rtrim()>>>;
-<<<" su ".trim()>>>;
+<<< " su".ltrim() >>>;
+<<< " su ".rtrim() >>>;
+<<< " su ".trim() >>>;
-<<<" su ".charAt(1)>>>;
-<<<" su ".charAt(1, 'n')>>>;
-<<<" su ".charAt(-1)>>>;
-<<<" su ".charAt(-1, 'n')>>>;
+<<< " su ".charAt(1) >>>;
+<<< " su ".charAt(1, 'n') >>>;
+<<< " su ".charAt(-1) >>>;
+<<< " su ".charAt(-1, 'n') >>>;
s.substring(2);
" su ".substring(2);
-<<<" su ".substring(2, 1)>>>;
-<<<"su".insert(1, "test")>>>;
-<<<"su".replace(1, "t")>>>;
-<<<"su".replace(1, 2, "turlututu")>>>;
-<<<" su ".charAt(1, 'n')>>>;
+<<< " su ".substring(2, 1) >>>;
+<<< "su".insert(1, "test") >>>;
+<<< "su".replace(1, "t") >>>;
+<<< "su".replace(1, 2, "turlututu") >>>;
+<<< " su ".charAt(1, 'n') >>>;
//null @=> s;
-<<<1 => s>>>;
-<<<1.0 => s>>>;
-<<< #(2,1) => s >>>;
-<<< %(2,1) => s >>>;
-<<< @(2,1,0) => s >>>;
-<<< @(2,1,0,-1) => s >>>;
-<<<"test" => s>>>; // new
-<<<"test" => s>>>; // new
-<<<s>>>;
-<<< null => s >>>; //test me
-<<< o => s >>>;
-<<<o>>>;
+<<< 1 => s >>>;
+<<< 1.0 => s >>>;
+<<< #(2,1) => s >>>;
+<<< %(2,1) => s >>>;
+<<< @(2,1,0) => s >>>;
+<<< @(2,1,0,-1) => s >>>;
+<<< "test" => s >>>; // new
+<<< "test" => s >>>; // new
+<<< s >>>;
+<<< null => s >>>; //test me
+<<< o => s >>>;
+<<< o >>>;
// look at me!!!
-<<< o => s>>>; // hang . grrr ...
-<<<"test" + "another test" >>>; // mem leak
-<<<"1".toInt()>>>;
-<<<"1".toFloat()>>>;
+<<< o => s >>>; // hang . grrr ...
+<<< "test" + "another test" >>>; // mem leak
+<<< "1".toInt() >>>;
+<<< "1".toFloat() >>>;
//me.exit();
//{ ("test" + s) @=> string @str; } // leak
-<<< 11 +=> s>>>;
-<<< 11.0 +=> s>>>;
-<<< #(21,11) +=> s >>>;
-<<< %(22,12) +=> s >>>;
-<<< @(22,11,11) +=> s >>>;
-<<< @(22,11,11,-11) +=> s >>>;
-<<< o +=> s>>>;
-<<<"test" + s >>>; // also leak
-<<< null +=> s >>>; // also hang
-<<< "test" +=> s>>>; // test me
-<<< "test" == "test" >>>;
-<<< "test" != "test" >>>;
-<<< "test" == "test1" >>>;
-<<< "test" != "test1" >>>;
-<<<string.char('t')>>>;
+<<< 11 +=> s >>>;
+<<< 11.0 +=> s >>>;
+<<< #(21,11) +=> s >>>;
+<<< %(22,12) +=> s >>>;
+<<< @(22,11,11) +=> s >>>;
+<<< @(22,11,11,-11) +=> s >>>;
+<<< o +=> s >>>;
+<<< "test" + s >>>; // also leak
+<<< null +=> s >>>; // also hang
+<<< "test" +=> s >>>; // test me
+<<< "test" == "test" >>>;
+<<< "test" != "test" >>>;
+<<< "test" == "test1" >>>;
+<<< "test" != "test1" >>>;
+<<< string.char('t') >>>;
fun void test(int i) {
switch(i) {
case 1:
- <<<"'i' is 1">>>;
+ <<< "'i' is 1" >>>;
break;
case 2:
- <<<"'i' is 2">>>;
+ <<< "'i' is 2" >>>;
break;
default:
- <<<1, ", ", 2>>>;
+ <<< 1, ", ", 2 >>>;
break;
}
}
fun void test(int i) {
if(i == 2)return;
// if(i == 0)return;
-<<<i>>>;
+<<< i >>>;
return test(--i + 3 - 4);
}
-fun void test<~A~> (A var){ <<< var>>>; }
-fun void test<~A,B~> (A var, B var2){ <<< var>>>; }
+fun void test<~A~> (A var){ <<< var >>>; }
+fun void test<~A,B~> (A var, B var2){ <<< var >>>; }
test<~int~>(1);
test<~float, float~>(3, 1.4);
-fun void test(C cc) { <<< cc.test(2) >>>; }
+fun void test(C cc) { <<< cc.test(2) >>>; }
-fun void test(C cc, int i) { <<<1>>>; <<<cc.test(i, i)>>>; }
+fun void test(C cc, int i) { <<< 1 >>>; <<< cc.test(i, i) >>>; }
class C {
- fun int test<~A~>(A a) { <<<" A ", a>>>; }
- fun int test<~A~>(A a, int i) { <<<" ", a >>>; }
- fun int test<~A~>(A a, int i, int j) { <<<a>>>; }
+ fun int test<~A~>(A a) { <<< " A ", a >>>; }
+ fun int test<~A~>(A a, int i) { <<< " ", a >>>; }
+ fun int test<~A~>(A a, int i, int j) { <<< a >>>; }
}
class D extends C {
- fun int test<~A~>(A a, int i) { <<<this, " extent ", a, __func__>>>; }
+ fun int test<~A~>(A a, int i) { <<< this, " extent ", a, __func__ >>>; }
}
class E extends D {
- fun int test<~A~>(A a, int i) { <<<this, " Extent ", a, __func__>>>; }
+ fun int test<~A~>(A a, int i) { <<< this, " Extent ", a, __func__ >>>; }
}
-<<<C c>>>;
-<<<D d>>>;
-<<<E e>>>;
+<<< C c >>>;
+<<< D d >>>;
+<<< E e >>>;
test(c);
test(d);
test(c,1);
test(d,2);
test(e,3);
-<<<test>>>;
+<<< test >>>;
c.test(1);
e.test(123,3);
e.test(3, 2, 3);
-fun void _test() {<<<"test">>>; }
+fun void _test() {<<< "test" >>>; }
fun void test() { _test(); }
test();
-fun void test<~A,B~>(A a, B b){<<<a, ", ", b>>>;}
+fun void test<~A,B~>(A a, B b){<<< a, ", ", b >>>;}
test(1, 2.1);
test(1.1, 2.1);
test(1.2, 2);
fun void test<~A~>(...) {
vararg.start;
- <<<vararg.i>>>;
+ <<< vararg.i >>>;
vararg.end;
}
test<~int~>(1, 2);
typedef int[2] lol;
class C extends lol { }
C c;
-<<<c.size()>>>;
+<<< c.size() >>>;
int i;
typeof(i) a;
-<<<a>>>;
+<<< a >>>;
typeof(C.i) b;
-<<<b>>>;
+<<< b >>>;
C c;
typeof(c.f) d;
-<<<d>>>;
+<<< d >>>;
-<<<i," ", c>>>;
+<<< i," ", c >>>;
Object @ o;
};
-<<<i, " ", o>>>;
+<<< i, " ", o >>>;
class C { int i; }
operator ++ int (C c) {
- <<<"here">>>;
- <<<c.i++>>>;
+ <<< "here" >>>;
+ <<< c.i++ >>>;
}
C c;
c++;
c++;
-<<<c.i>>>;
+<<< c.i >>>;
vararg.start;
if(i == 0)
- <<<vararg.i>>>;
+ <<< vararg.i >>>;
else if(i == 1)
- <<<vararg.f>>>;
+ <<< vararg.f >>>;
else if(i == 2)
- <<<vararg.c>>>;
+ <<< vararg.c >>>;
else if(i == 3)
- <<<vararg.p>>>;
+ <<< vararg.p >>>;
else if(i == 4)
- <<<vararg.v3>>>;
+ <<< vararg.v3 >>>;
else if(i == 5)
- <<<vararg.v4>>>;
+ <<< vararg.v4 >>>;
else if(i == 6)
- <<<vararg.o>>>;
+ <<< vararg.o >>>;
i++;
vararg.end;
}
Vec3 v, w;
-<<< v.x >>>;
-<<< v.y >>>;
-<<< v.z >>>;
-<<< 1 => v.x >>>;
-<<< 2 => v.y >>>;
-<<< -12 => v.z >>>;
-<<< @(.1, .2, .4) => v >>>;
-<<<v>>>;
-<<< "set ", v.set(1,2,3) >>>;
-<<< "setAll ", v.setAll(1.2) >>>;
-<<< "should be 1.2 1.2 1.2 ", v >>>;
-<<< "Update ", v.update(2)>>>;
-<<< "Update ", v.update(2, .1)>>>;
-<<< "Update ", v.supdate(2)>>>;
-<<< "Update ", v.supdate(2, .1)>>>;
-<<< "magnitude ", v.magnitude() >>>;
-<<< "normalize ", v.normalize() >>>;
-<<< "interp ", v.interp() >>>;
-<<< "interp ", v.interp(2.3) >>>;
-<<< "interp ", v.interp(2.3::samp) >>>;
+<<< v.x >>>;
+<<< v.y >>>;
+<<< v.z >>>;
+<<< 1 => v.x >>>;
+<<< 2 => v.y >>>;
+<<< -12 => v.z >>>;
+<<< @(.1, .2, .4) => v >>>;
+<<< v >>>;
+<<< "set ", v.set(1,2,3) >>>;
+<<< "setAll ", v.setAll(1.2) >>>;
+<<< "should be 1.2 1.2 1.2 ", v >>>;
+<<< "Update ", v.update(2) >>>;
+<<< "Update ", v.update(2, .1) >>>;
+<<< "Update ", v.supdate(2) >>>;
+<<< "Update ", v.supdate(2, .1) >>>;
+<<< "magnitude ", v.magnitude() >>>;
+<<< "normalize ", v.normalize() >>>;
+<<< "interp ", v.interp() >>>;
+<<< "interp ", v.interp(2.3) >>>;
+<<< "interp ", v.interp(2.3::samp) >>>;
w.setAll(1);
v+w;
w/10.;
10.*w;
w*10.;
-<<<@(23).x>>>;
+<<< @(23).x >>>;
Vec4 v, w;
-<<<v>>>;
+<<< v >>>;
-<<< v.x >>>;
-<<< v.y >>>;
-<<< v.z >>>;
-<<< v.w >>>;
+<<< v.x >>>;
+<<< v.y >>>;
+<<< v.z >>>;
+<<< v.w >>>;
-<<< 1 => v.x >>>;
-<<< 1 => v.y >>>;
-<<< 1 => v.z >>>;
-<<< 1 => v.w >>>;
-<<< @(.1, .2, .4, .5) => v >>>;
+<<< 1 => v.x >>>;
+<<< 1 => v.y >>>;
+<<< 1 => v.z >>>;
+<<< 1 => v.w >>>;
+<<< @(.1, .2, .4, .5) => v >>>;
-<<< "set ", v.set(1,2,3,4) >>>;
-<<< "setAll ", v.setAll(1.2) >>>;
-<<< "should be 1.2 1.2 1.2 ", v >>>;
-<<< "magnitude ", v.magnitude() >>>;
-<<< "normalize ", v.normalize() >>>;
+<<< "set ", v.set(1,2,3,4) >>>;
+<<< "setAll ", v.setAll(1.2) >>>;
+<<< "should be 1.2 1.2 1.2 ", v >>>;
+<<< "magnitude ", v.magnitude() >>>;
+<<< "normalize ", v.normalize() >>>;
w.setAll(1);
v+w;
v-w;
12 => int maxDepth;
maxDepth + 1 => int stretchDepth;
-<<<"stretch tree of depth ", stretchDepth, " check: ",
- Tree.new_Tree(0, stretchDepth).check()>>>;
+<<< "stretch tree of depth ", stretchDepth, " check: ",
+ Tree.new_Tree(0, stretchDepth).check() >>>;
Tree.new_Tree(0, maxDepth) @=> Tree@ longLivedTree;
for (int i; i < iterations; ++i)
Tree.new_Tree(i, depth).check() + Tree.new_Tree(-i, depth).check() +=> check;
- <<<iterations * 2, " trees of depth ", depth, " check: ", check>>>;
+ <<< iterations * 2, " trees of depth ", depth, " check: ", check >>>;
4 /=> iterations;
2 +=> depth;
}
-<<<"long lived tree of depth ", maxDepth, " check: ", longLivedTree.check()>>>;
+<<< "long lived tree of depth ", maxDepth, " check: ", longLivedTree.check() >>>;
else
return recursive_fib(n - 2) + recursive_fib(n - 1);
}
-//<<<5 => recursive_fib>>>;
-<<<40 => recursive_fib>>>;
+//<<< 5 => recursive_fib >>>;
+<<< 40 => recursive_fib >>>;
}
}
repeat(5)
- <<<Fib.get(28)>>>;
+ <<< Fib.get(28) >>>;
toggle.activate().value() => val;
}
-<<<toggle.value()>>>;
+<<< toggle.value() >>>;
NthToggle ntoggle;
true => val => ntoggle.state;
ntoggle.activate().value() => val;
}
-<<<ntoggle.value()>>>;
+<<< ntoggle.value() >>>;
Object o;
Object @ref;
"test" => string s;
-//<<<t.assert_equal("test", 1, 1)>>>;
-//<<<t.assert_equal("test", 2, 1)>>>;
-<<<t.assert_equal(s, 1, 1)>>>;
-<<<t.assert_equal(s, 2, 1 + 1)>>>;
-<<<t.assert_equal(s, 2, 1)>>>;
-<<<t.assert_equal(s, o, o)>>>;
-<<<t.assert_equal(s, o, null)>>>;
-<<<t.assert_equal(s, null $ Object, null)>>>;
-<<<t.assert_equal(s, ref, null)>>>;
-<<<t.assert_not_equal(s, 1, 1)>>>;
-<<<t.assert_not_equal(s, 2, 1 + 1)>>>;
-<<<t.assert_not_equal(s, 2, 1)>>>;
-<<<t.assert_not_equal(s, o, o)>>>;
-<<<t.assert_not_equal(s, o, null)>>>;
-<<<t.assert_not_equal(s, null $ Object, null)>>>;
-<<<t.assert_not_equal(s, ref, null)>>>;
+//<<< t.assert_equal("test", 1, 1) >>>;
+//<<< t.assert_equal("test", 2, 1) >>>;
+<<< t.assert_equal(s, 1, 1) >>>;
+<<< t.assert_equal(s, 2, 1 + 1) >>>;
+<<< t.assert_equal(s, 2, 1) >>>;
+<<< t.assert_equal(s, o, o) >>>;
+<<< t.assert_equal(s, o, null) >>>;
+<<< t.assert_equal(s, null $ Object, null) >>>;
+<<< t.assert_equal(s, ref, null) >>>;
+<<< t.assert_not_equal(s, 1, 1) >>>;
+<<< t.assert_not_equal(s, 2, 1 + 1) >>>;
+<<< t.assert_not_equal(s, 2, 1) >>>;
+<<< t.assert_not_equal(s, o, o) >>>;
+<<< t.assert_not_equal(s, o, null) >>>;
+<<< t.assert_not_equal(s, null $ Object, null) >>>;
+<<< t.assert_not_equal(s, ref, null) >>>;
v << @(2.1, 3.2, 4.3);
w << @(2.1, 3.2, 4.3, 5.4);
- <<<i.size()>>>;
+ <<< i.size() >>>;
}
Test_Array t;
-<<<t>>>;
+<<< t >>>;
fun void test() {}
//! operator
operator => void(C c, C d){
- <<<c, " ", d>>>;
+ <<< c, " ", d >>>;
}
}
int i;
-do { <<<i++>>>; }
+do { <<< i++ >>>; }
while(i < 6);
-do { <<<i-->>>; }
+do { <<< i-- >>>; }
while(i);
6 => float f;
-do { <<<1 -=> f>>>; }
+do { <<< 1 -=> f >>>; }
while(f);
5 => int i;
-do { <<<i-->>>; } while(i);
+do { <<< i-- >>>; } while(i);
5 => float f;
-do { <<< 1 -=> f >>>; } while(f > 0.0);
-// do { <<< 1 -=> f >>>; } while(f > 0);
+do { <<< 1 -=> f >>>; } while(f > 0.0);
+// do { <<< 1 -=> f >>>; } while(f > 0);
5 => f;
-do { <<< 1 -=> f >>>; } until(f == 0);
-//do { <<< 1 -=> f >>>; } until(f == 0.0);
+do { <<< 1 -=> f >>>; } until(f == 0);
+//do { <<< 1 -=> f >>>; } until(f == 0.0);
5 => i;
-do { <<< i-- >>>; } until(!i);
+do { <<< i-- >>>; } until(!i);
g.chan(0);
spork { while(true) { Math.rand2f(100, 800) => s.freq; .15::second => now; }};
for(int i; i < 5; i++) {
- <<<g.op()>>>;
+ <<< g.op() >>>;
i => g.op;
2::second => now;
}
{
float variable1;
float variable2;
-<<< variable1=variable2 >>>;
+<<< variable1=variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1+variable2 >>>;
+<<< variable1+variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1-variable2 >>>;
+<<< variable1-variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1*variable2 >>>;
+<<< variable1*variable2 >>>;
}
//testing operator for float and float
{
float variable1;
1 => float variable2;
-<<< variable1/variable2 >>>;
+<<< variable1/variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1&&variable2 >>>;
+<<< variable1&&variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1||variable2 >>>;
+<<< variable1||variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1==variable2 >>>;
+<<< variable1==variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1!=variable2 >>>;
+<<< variable1!=variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1>variable2 >>>;
+<<< variable1>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1>=variable2 >>>;
+<<< variable1>=variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1<variable2 >>>;
+<<< variable1<variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1<=variable2 >>>;
+<<< variable1<=variable2 >>>;
}
//testing operator for and float
{
float variable2;
-<<< -variable2 >>>;
+<<< -variable2 >>>;
}
//testing operator for and int
{
int variable2;
-<<< !variable2 >>>;
+<<< !variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1=>variable2 >>>;
+<<< variable1=>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1+=>variable2 >>>;
+<<< variable1+=>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1-=>variable2 >>>;
+<<< variable1-=>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1*=>variable2 >>>;
+<<< variable1*=>variable2 >>>;
}
//testing operator for float and float
{
float variable1;
float variable2;
-<<< variable1/=>variable2 >>>;
+<<< variable1/=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1=variable2 >>>;
+<<< variable1=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1+variable2 >>>;
+<<< variable1+variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1-variable2 >>>;
+<<< variable1-variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1*variable2 >>>;
+<<< variable1*variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1/variable2 >>>;
+<<< variable1/variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1&&variable2 >>>;
+<<< variable1&&variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1||variable2 >>>;
+<<< variable1||variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1==variable2 >>>;
+<<< variable1==variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1!=variable2 >>>;
+<<< variable1!=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1>variable2 >>>;
+<<< variable1>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1>=variable2 >>>;
+<<< variable1>=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1<variable2 >>>;
+<<< variable1<variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1<=variable2 >>>;
+<<< variable1<=variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1=>variable2 >>>;
+<<< variable1=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1+=>variable2 >>>;
+<<< variable1+=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1-=>variable2 >>>;
+<<< variable1-=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1*=>variable2 >>>;
+<<< variable1*=>variable2 >>>;
}
//testing operator for int and float
{
int variable1;
float variable2;
-<<< variable1/=>variable2 >>>;
+<<< variable1/=>variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1+variable2 >>>;
+<<< variable1+variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1-variable2 >>>;
+<<< variable1-variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1*variable2 >>>;
+<<< variable1*variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1/variable2 >>>;
+<<< variable1/variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1&&variable2 >>>;
+<<< variable1&&variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1||variable2 >>>;
+<<< variable1||variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1==variable2 >>>;
+<<< variable1==variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1!=variable2 >>>;
+<<< variable1!=variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1>variable2 >>>;
+<<< variable1>variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1>=variable2 >>>;
+<<< variable1>=variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1<variable2 >>>;
+<<< variable1<variable2 >>>;
}
//testing operator for float and int
{
float variable1;
int variable2;
-<<< variable1<=variable2 >>>;
+<<< variable1<=variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1=>variable2 >>>;
+<<< variable1=>variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1+variable2 >>>;
+<<< variable1+variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1-variable2 >>>;
+<<< variable1-variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1*variable2 >>>;
+<<< variable1*variable2 >>>;
}
//testing operator for dur and float
{
dur variable1;
float variable2;
-<<< variable1*variable2 >>>;
+<<< variable1*variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1/variable2 >>>;
+<<< variable1/variable2 >>>;
}
//testing operator for dur and float
{
dur variable1;
float variable2;
-<<< variable1/variable2 >>>;
+<<< variable1/variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1>variable2 >>>;
+<<< variable1>variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1>=variable2 >>>;
+<<< variable1>=variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1<variable2 >>>;
+<<< variable1<variable2 >>>;
}
//testing operator for dur and dur
{
dur variable1;
dur variable2;
-<<< variable1<=variable2 >>>;
+<<< variable1<=variable2 >>>;
}
//testing operator for time and time
{
time variable1;
time variable2;
-<<< variable1=>variable2 >>>;
+<<< variable1=>variable2 >>>;
}
//testing operator for dur and time
{
dur variable1;
time variable2;
-<<< variable1=>variable2 >>>;
+<<< variable1=>variable2 >>>;
}
//testing operator for dur and
{
dur variable1;
-<<< variable1=> now>>>;
+<<< variable1=> now >>>;
}
//testing operator for time and dur
{
time variable1;
dur variable2;
-<<< variable1+variable2 >>>;
+<<< variable1+variable2 >>>;
}
//testing operator for dur and time
{
dur variable1;
time variable2;
-<<< variable1+variable2 >>>;
+<<< variable1+variable2 >>>;
}
//testing operator for time and time
{
time variable1;
time variable2;
-<<< variable1>variable2 >>>;
+<<< variable1>variable2 >>>;
}
//testing operator for time and time
{
time variable1;
time variable2;
-<<< variable1>=variable2 >>>;
+<<< variable1>=variable2 >>>;
}
//testing operator for time and time
{
time variable1;
time variable2;
-<<< variable1<variable2 >>>;
+<<< variable1<variable2 >>>;
}
//testing operator for time and time
{
time variable1;
time variable2;
-<<< variable1<=variable2 >>>;
+<<< variable1<=variable2 >>>;
}
int i;
float f,g;
-<<< f + 1.0 >>>;
-<<< f - 1.0 >>>;
-<<< f * 1.0 >>>;
-<<< f / 1.0 >>>;
+<<< f + 1.0 >>>;
+<<< f - 1.0 >>>;
+<<< f * 1.0 >>>;
+<<< f / 1.0 >>>;
-<<< f && 1.0 >>>;
-<<< f || 1.0 >>>;
+<<< f && 1.0 >>>;
+<<< f || 1.0 >>>;
-<<< f == 1.0 >>>;
-<<< f != 1.0 >>>;
+<<< f == 1.0 >>>;
+<<< f != 1.0 >>>;
-<<< 1 > 1.0 >>>;
-<<< 1 >= 1.0 >>>;
-<<< 1 < 1.0 >>>;
-<<< 1 <= 1.0 >>>;
+<<< 1 > 1.0 >>>;
+<<< 1 >= 1.0 >>>;
+<<< 1 < 1.0 >>>;
+<<< 1 <= 1.0 >>>;
-<<< -f >>>;
-<<< !f >>>;
-<<< 1.0 => f>>>;
-<<< 1.0 +=> f>>>;
-<<< 1.0 -=> f>>>;
-<<< 1.0 /=> f>>>;
-<<< 1.0 *=> f>>>;
+<<< -f >>>;
+<<< !f >>>;
+<<< 1.0 => f >>>;
+<<< 1.0 +=> f >>>;
+<<< 1.0 -=> f >>>;
+<<< 1.0 /=> f >>>;
+<<< 1.0 *=> f >>>;
-<<<"if">>>;
+<<< "if" >>>;
-<<< i + 1.0 >>>;
-<<< i - 1.0 >>>;
-<<< i * 1.0 >>>;
-<<< i / 1.0 >>>;
+<<< i + 1.0 >>>;
+<<< i - 1.0 >>>;
+<<< i * 1.0 >>>;
+<<< i / 1.0 >>>;
-<<< i && 1.0 >>>;
-<<< i || 1.0 >>>;
+<<< i && 1.0 >>>;
+<<< i || 1.0 >>>;
-<<< i == 1.0 >>>;
-<<< i != 1.0 >>>;
+<<< i == 1.0 >>>;
+<<< i != 1.0 >>>;
-<<< i > 1.0 >>>;
-<<< i >= 1.0 >>>;
-<<< i < 1.0 >>>;
-<<< i <= 1.0 >>>;
+<<< i > 1.0 >>>;
+<<< i >= 1.0 >>>;
+<<< i < 1.0 >>>;
+<<< i <= 1.0 >>>;
-<<< -i >>>;
-<<< !i >>>;
+<<< -i >>>;
+<<< !i >>>;
-<<<"fi">>>;
-<<< 1.0 => i>>>;
-<<< 1.0 +=> i>>>;
-<<< 1.0 -=> i>>>;
-<<< 1.0 /=> i>>>;
-<<< 1.0 *=> i>>>;
-<<< 1.0 + i >>>;
-<<< 1.0 - i >>>;
-<<< 1.0 * i >>>;
-<<< 1.0 / i >>>;
+<<< "fi" >>>;
+<<< 1.0 => i >>>;
+<<< 1.0 +=> i >>>;
+<<< 1.0 -=> i >>>;
+<<< 1.0 /=> i >>>;
+<<< 1.0 *=> i >>>;
+<<< 1.0 + i >>>;
+<<< 1.0 - i >>>;
+<<< 1.0 * i >>>;
+<<< 1.0 / i >>>;
-<<< i, 1.0 && i >>>;
-<<< i, 1.0 && !i >>>;
-<<< 1.0 || i >>>;
-<<< 0.0 || i >>>;
+<<< i, 1.0 && i >>>;
+<<< i, 1.0 && !i >>>;
+<<< 1.0 || i >>>;
+<<< 0.0 || i >>>;
-//<<< 1.0 == i >>>;
-//<<< 1.0 != i >>>;
+//<<< 1.0 == i >>>;
+//<<< 1.0 != i >>>;
-<<< 1.0 +=> i >>>;
-<<< 1.0 => i >>>;
+<<< 1.0 +=> i >>>;
+<<< 1.0 => i >>>;
-<<< 1.0 -=> i>>>;
-<<< 1.0 /=> i>>>;
-<<< 1.0 *=> i>>>;
+<<< 1.0 -=> i >>>;
+<<< 1.0 /=> i >>>;
+<<< 1.0 *=> i >>>;
-<<< 1.0 > i>>>;
-<<< 1.0 >= i>>>;
-<<< 1.0 < i>>>;
-<<< 1.0 <= i>>>;
-<<<g>>>;
+<<< 1.0 > i >>>;
+<<< 1.0 >= i >>>;
+<<< 1.0 < i >>>;
+<<< 1.0 <= i >>>;
+<<< g >>>;
Object o;
"Object: " => string s;
-<<<s + (o + "")>>>;
+<<< s + (o + "") >>>;
"lol" @=> string @s;
"test" => s;
-<<<"testmem".replace(2, 3, "UKUH")>>>;
+<<< "testmem".replace(2, 3, "UKUH") >>>;
static Vec4 w;
static Object o;
}
-<<<C.i>>>;
-<<<C.f>>>;
-<<<C.c>>>;
-<<<C.v>>>;
-<<<C.w>>>;
-<<<C.o>>>;
+<<< C.i >>>;
+<<< C.f >>>;
+<<< C.c >>>;
+<<< C.v >>>;
+<<< C.w >>>;
+<<< C.o >>>;
// [contains] NullPtrException
int i[1][1];
null @=> i[0];
-<<<i[0][0]>>>;
+<<< i[0][0] >>>;
// [contains] not allowed in auto loop
Object i;
for(auto a: i)
- <<<a>>>;
+ <<< a >>>;
}
C.a;
-<<<C.a>>>;
-<<<--C.a>>>;
+<<< C.a >>>;
+<<< --C.a >>>;
// [contains] right-side operand is non-mutable
10 => const int i;
12 => i;
-<<<i>>>;
+<<< i >>>;
// [contains] empty for loop condition
-<<<"test">>>;
+<<< "test" >>>;
for(;;){}
typedef void test();
test t;
}
-<<<C c>>>;
-<<<c.t>>>;
+<<< C c >>>;
+<<< c.t >>>;
c.t();
// [contains] in function:
-fun void test() { <<<b>>>; }
+fun void test() { <<< b >>>; }
// [contains] Invalid type
-null ? <<<1>>> : <<<2>>>;
+null ? <<< 1 >>> : <<< 2 >>>;
// [contains] argument number does not match for lambda
-\a b { <<<a, " ", b>>>; }(1);
+\a b { <<< a, " ", b >>>; }(1);
// [contains] argument number does not match for lambda
typedef void ptr_t(int i);
-\a b { <<<a, " ", b>>>; } @=> ptr_t ptr;
+\a b { <<< a, " ", b >>>; } @=> ptr_t ptr;
ptr(2);
// [contains] argument number does not match for lambda
typedef void ptr_t(int i);
-\a b { <<<a, " ", b>>>; } @=> ptr_t ptr;
+\a b { <<< a, " ", b >>>; } @=> ptr_t ptr;
fun void test(ptr_t ptr) {
ptr(2);
}
// [contains] conditional must be of type
complex c;
repeat(c)
- <<<"error">>>;
+ <<< "error" >>>;
class C {
int i;
fun static void test() {
- <<<i>>>;
+ <<< i >>>;
}
}
// [contains] NegativeArraySize: while allocating arrays
int i[-1];
-<<<i>>>;
+<<< i >>>;
// [contains] ArrayOutofBounds
int i[2][2];
-<<<i[1][-1]>>>;
-<<<-1>>>;
+<<< i[1][-1] >>>;
+<<< -1 >>>;
C c;
D d;
-<<<c $ D>>>;
-<<<d>>>;
+<<< c $ D >>>;
+<<< d >>>;
// [contains] incompatible array subscript type
Object o;
int i[o];
-<<<i>>>;
+<<< i >>>;
// [contains] NullPtrException
int i[];
for(auto a : i)
- <<<a>>>;
+ <<< a >>>;
C c;
D d;
-<<<c>>>;
-<<<d>>>;
\ No newline at end of file
+<<< c >>>;
+<<< d >>>;
\ No newline at end of file
class C { private int i; }
C c;
-<<<c.i>>>;
+<<< c.i >>>;
class D {
C c;
- <<<c.i>>>;
+ <<< c.i >>>;
}
C c;
D d;
-<<<d.test @=> c.test>>>;
+<<< d.test @=> c.test >>>;
E e;
F f;
G g;
-<<<f $ D>>>;
-<<< [ f, g ] >>>;
-<<<maybe ? f : D>>>;
-<<<c, " ", d, " ", e, " ", g>>>;
+<<< f $ D >>>;
+<<< [ f, g ] >>>;
+<<< maybe ? f : D >>>;
+<<< c, " ", d, " ", e, " ", g >>>;
// [contains] only function calls can be sporked
int i;
-<<<i>>>;
+<<< i >>>;
spork i;
// [contains] arguments do not match for template call
-fun void test<~A~>(){ <<<"func">>>;}
-fun void test<~A~>(int i){<<<"other func">>>;}
+fun void test<~A~>(){ <<< "func" >>>;}
+fun void test<~A~>(int i){<<< "other func" >>>;}
test<~int, float, int~>();
//test<~int~>();
// [contains] unknown type
-fun void my_function<~A~>() { <<<"test">>>; }
+fun void my_function<~A~>() { <<< "test" >>>; }
my_function<~unknown_type~>();
// [contains] keyword 'this' cannot be used inside static functions
class C
{
- fun static void test(){ <<<this>>>; }
+ fun static void test(){ <<< this >>>; }
}
// [contains] unknown type
class C extends Undefined {}
C c;
-<<<c>>>;
\ No newline at end of file
+<<< c >>>;
\ No newline at end of file
Object o;
};
-<<<i, " ", o>>>;
+<<< i, " ", o >>>;
//[contains] cant't assign
class C {
- fun static void test(int i) { <<< "int arg" >>>; }
+ fun static void test(int i) { <<< "int arg" >>>; }
typedef void PtrType(int i);
test @=> PtrType p;
p(1);
class C {
- fun void test(int i) { <<< "int arg" >>>; }
+ fun void test(int i) { <<< "int arg" >>>; }
typedef static void PtrType(int i);
test @=>
PtrType p;
class C {
- fun void test(int i) { <<< "int arg" >>>; }
+ fun void test(int i) { <<< "int arg" >>>; }
typedef void PtrType(int i);
test @=>
static PtrType p;
class C {
- fun static void test(int i) { <<< "int arg" >>>; }
+ fun static void test(int i) { <<< "int arg" >>>; }
typedef static void PtrType(int i);
test @=>
static PtrType p;
p(1);
}
C c;
-<<<c>>>;
+<<< c >>>;
// [contains] can't assign
class C {
- fun void test(int i) { <<< "int arg" >>>; }
+ fun void test(int i) { <<< "int arg" >>>; }
typedef static void PtrType(int i);
test @=>
static PtrType p;
-fun Vec4 test(int i) { <<<"test with arg ", i>>>; }
+fun Vec4 test(int i) { <<< "test with arg ", i >>>; }
//typedef Vec4 PT();
//test @=>
PtrTypeI p;
test @=> p;
//test @=> PT ti;
-<<<test>>>;
-//<<<ti>>>;
-<<<p>>>;
+<<< test >>>;
+//<<< ti >>>;
+<<< p >>>;
//ti();
-<<<"test">>>;
+<<< "test" >>>;
p(2);
-<<<"end">>>;
+<<< "end" >>>;
Callback.callback(p, 6);
//class C{ A key; B value; }
//<~int, int~>C c1;
//<float, float>C c2;
-//<<<c1>>>;
-//<<<c2>>>;
-//<<<c2.value>>>;
+//<<< c1 >>>;
+//<<< c2 >>>;
+//<<< c2.value >>>;
<~int, int~>ClassTemplate ct;
-<<<ct.key>>>;
+<<< ct.key >>>;
//<float, float>ClassTemplate ct2;
-//<<<ct2.key>>>;
+//<<< ct2.key >>>;
//<child, float>ClassTemplate ct3;
-//<<<ct3.key>>>;
+//<<< ct3.key >>>;
-<<<float f>>>;
+<<< float f >>>;
Coverage c;
c.s_i;
-<<< Coverage.i() >>>;
-<<< Coverage.f() >>>;
-<<< Coverage.c() >>>;
-<<< Coverage.v() >>>;
-<<< Coverage.w() >>>;
+<<< Coverage.i() >>>;
+<<< Coverage.f() >>>;
+<<< Coverage.c() >>>;
+<<< Coverage.v() >>>;
+<<< Coverage.w() >>>;
-<<<Coverage.s_i >>>;
-<<<Coverage.s_f >>>;
-<<<Coverage.s_c >>>;
-<<<Coverage.s_v >>>;
-<<<Coverage.s_w >>>;
+<<< Coverage.s_i >>>;
+<<< Coverage.s_f >>>;
+<<< Coverage.s_c >>>;
+<<< Coverage.s_v >>>;
+<<< Coverage.s_w >>>;
-<<<Coverage.sc_i >>>;
-<<<Coverage.sc_f >>>;
-<<<Coverage.sc_c >>>;
-<<<Coverage.sc_v >>>;
-<<<Coverage.sc_w >>>;
+<<< Coverage.sc_i >>>;
+<<< Coverage.sc_f >>>;
+<<< Coverage.sc_c >>>;
+<<< Coverage.sc_v >>>;
+<<< Coverage.sc_w >>>;
-<<< 1 => Coverage.s_i >>>;
-<<< 1.2 => Coverage.s_f >>>;
-<<< #(1.2, 0.1) => Coverage.s_c >>>;
-<<< @(1.2, 0.1, 2.6) => Coverage.s_v >>>;
-<<< @(1.2, 0.1, 2.6, 4.6) => Coverage.s_w >>>;
+<<< 1 => Coverage.s_i >>>;
+<<< 1.2 => Coverage.s_f >>>;
+<<< #(1.2, 0.1) => Coverage.s_c >>>;
+<<< @(1.2, 0.1, 2.6) => Coverage.s_v >>>;
+<<< @(1.2, 0.1, 2.6, 4.6) => Coverage.s_w >>>;
// untyped global enum
-<<<ENUM0>>>;
-<<<ENUM1>>>;
-<<<ENUM2>>>;
-<<<ENUM3>>>;
-<<<ENUM4>>>;
-<<<ENUM5>>>;
-<<<ENUM6>>>;
-<<<ENUM7>>>;
-<<<ENUM8>>>;
-<<<ENUM9>>>;
+<<< ENUM0 >>>;
+<<< ENUM1 >>>;
+<<< ENUM2 >>>;
+<<< ENUM3 >>>;
+<<< ENUM4 >>>;
+<<< ENUM5 >>>;
+<<< ENUM6 >>>;
+<<< ENUM7 >>>;
+<<< ENUM8 >>>;
+<<< ENUM9 >>>;
// typed global enum
-<<<TYPED_ENUM0>>>;
-<<<TYPED_ENUM1>>>;
-<<<TYPED_ENUM2>>>;
-<<<TYPED_ENUM3>>>;
-<<<TYPED_ENUM4>>>;
-<<<TYPED_ENUM5>>>;
-<<<TYPED_ENUM6>>>;
-<<<TYPED_ENUM7>>>;
-<<<TYPED_ENUM8>>>;
-<<<TYPED_ENUM9>>>;
+<<< TYPED_ENUM0 >>>;
+<<< TYPED_ENUM1 >>>;
+<<< TYPED_ENUM2 >>>;
+<<< TYPED_ENUM3 >>>;
+<<< TYPED_ENUM4 >>>;
+<<< TYPED_ENUM5 >>>;
+<<< TYPED_ENUM6 >>>;
+<<< TYPED_ENUM7 >>>;
+<<< TYPED_ENUM8 >>>;
+<<< TYPED_ENUM9 >>>;
// in class
// untyped global enum
-<<<Enum.ENUM0>>>;
-<<<Enum.ENUM1>>>;
-<<<Enum.ENUM2>>>;
-<<<Enum.ENUM3>>>;
-<<<Enum.ENUM4>>>;
-<<<Enum.ENUM5>>>;
-<<<Enum.ENUM6>>>;
-<<<Enum.ENUM7>>>;
-<<<Enum.ENUM8>>>;
-<<<Enum.ENUM9>>>;
+<<< Enum.ENUM0 >>>;
+<<< Enum.ENUM1 >>>;
+<<< Enum.ENUM2 >>>;
+<<< Enum.ENUM3 >>>;
+<<< Enum.ENUM4 >>>;
+<<< Enum.ENUM5 >>>;
+<<< Enum.ENUM6 >>>;
+<<< Enum.ENUM7 >>>;
+<<< Enum.ENUM8 >>>;
+<<< Enum.ENUM9 >>>;
// Enum.typed global enum
-<<<Enum.TYPED_ENUM0>>>;
-<<<Enum.TYPED_ENUM1>>>;
-<<<Enum.TYPED_ENUM2>>>;
-<<<Enum.TYPED_ENUM3>>>;
-<<<Enum.TYPED_ENUM4>>>;
-<<<Enum.TYPED_ENUM5>>>;
-<<<Enum.TYPED_ENUM6>>>;
-<<<Enum.TYPED_ENUM7>>>;
-<<<Enum.TYPED_ENUM8>>>;
-<<<Enum.TYPED_ENUM9>>>;
+<<< Enum.TYPED_ENUM0 >>>;
+<<< Enum.TYPED_ENUM1 >>>;
+<<< Enum.TYPED_ENUM2 >>>;
+<<< Enum.TYPED_ENUM3 >>>;
+<<< Enum.TYPED_ENUM4 >>>;
+<<< Enum.TYPED_ENUM5 >>>;
+<<< Enum.TYPED_ENUM6 >>>;
+<<< Enum.TYPED_ENUM7 >>>;
+<<< Enum.TYPED_ENUM8 >>>;
+<<< Enum.TYPED_ENUM9 >>>;
ArrayExt a;
-<<<a>>>;
-<<<a.size()>>>;
+<<< a >>>;
+<<< a.size() >>>;
Ev ev;
-<<<ev>>>;
+<<< ev >>>;
<~int, int~>PairExt p;
-<<<p>>>;
-<<<p.key>>>;
-<<<p.val>>>;
+<<< p >>>;
+<<< p.key >>>;
+<<< p.val >>>;
-<<<test>>>;
-<<<1 => test>>>;
+<<< test >>>;
+<<< 1 => test >>>;
<~int, float~>Map pp;
-<<<pp>>>;
-<<<pp.size()>>>;
-<<<pp.set(1, 2)>>>;
-<<<pp.get(1)>>>;
+<<< pp >>>;
+<<< pp.size() >>>;
+<<< pp.set(1, 2) >>>;
+<<< pp.get(1) >>>;
+++ /dev/null
-#include "gwion_util.h"
-#include "gwion_ast.h"
-#include "oo.h"
-#include "vm.h"
-#include "env.h"
-#include "type.h"
-#include "object.h"
-#include "instr.h"
-#include "gwion.h"
-#include "operator.h"
-#include "import.h"
-
-GWION_IMPORT(op_err_test) {
- gwi_oper_ini(gwi, "int", "int", "int"); // ignore the check
- gwi_oper_end(gwi, 220, NULL); // ignore the check.
- CHECK_BB(gwi_oper_ini(gwi, "int", "int", "int"))
- CHECK_BB(gwi_oper_end(gwi, op_chuck, NULL))
- return GW_OK;
-}
-//<<<StaticString.self>>>;
-<<<self>>>;
+//<<< StaticString.self >>>;
+<<< self >>>;
-fun void test(){ <<<"test">>>; }
+fun void test(){ <<< "test" >>>; }
PtrType ptr;
test();
test @=> ptr;
FuncTypedef.test_func();
-<<<FuncTypedef.test_func @=> FuncTypedef.ptr>>>;
+<<< FuncTypedef.test_func @=> FuncTypedef.ptr >>>;
<FuncTypedef.PtrType> _ptr;
-<<<FuncTypedef.ptr>>>;
+<<< FuncTypedef.ptr >>>;
FuncTypedef.ptr();
Union u;
-<<<u.i>>>;
-<<<12 => u.f>>>;
-<<<1 => u.i>>>;
-<<<u.i>>>;
-<<<u.f>>>;
-<<<0 => u.i>>>;
-<<<null @=> u.o>>>;
+<<< u.i >>>;
+<<< 12 => u.f >>>;
+<<< 1 => u.i >>>;
+<<< u.i >>>;
+<<< u.f >>>;
+<<< 0 => u.i >>>;
+<<< null @=> u.o >>>;
-<<<"test builtin variadic fun">>>;
+<<< "test builtin variadic fun" >>>;
Variadic v;
"iiii" => string format;
-<<<v, " ", format $ Object>>>;
+<<< v, " ", format $ Object >>>;
v.member(format, 1,2,3,4);
v.member(format, 1,2,3,4);
v.test();
fun void t(int i) {
- <<<i>>>;
+ <<< i >>>;
if(!i)
1/i;
- <<<"id: ", (spork t(i-1)).id()>>>;
+ <<< "id: ", (spork t(i-1)).id() >>>;
me.yield();
//samp => now;
}
//me.yield();
second => now;
me.yield();
-<<<"end">>>;
+<<< "end" >>>;
1 => float f;
}
C c;
-<<<c.f>>>;
+<<< c.f >>>;
class global C {
13 => int i;
}
-<<<g_i>>>;
+<<< g_i >>>;
global C g_c;
-<<<g_c, "->i => ", g_c.i>>>;
-fun global void g_test() { <<<g_i>>>; <<<g_c>>>; <<<g_c.i>>>; <<<"test">>>; }
-//fun global void g_test() { <<<"test">>>; }
-<<<g_test>>>;
-<<<g_test()>>>;
+<<< g_c, "->i => ", g_c.i >>>;
+fun global void g_test() { <<< g_i >>>; <<< g_c >>>; <<< g_c.i >>>; <<< "test" >>>; }
+//fun global void g_test() { <<< "test" >>>; }
+<<< g_test >>>;
+<<< g_test() >>>;
-<<<g_i>>>;
-<<<g_c>>>;
-<<<g_c.i>>>;
-<<<g_test>>>;
+<<< g_i >>>;
+<<< g_c >>>;
+<<< g_c.i >>>;
+<<< g_test >>>;
g_test();
//g_test();
-<<<int i>>>;
+<<< int i >>>;
fun global void this_global_func_will_fail_to_compile() {
- <<<i>>>;
+ <<< i >>>;
}
-<<<global int g_i>>>;
+<<< global int g_i >>>;
-<<<g_i>>>;
+<<< g_i >>>;
class C {
typedef void ptr_t(int i,int j);
- \a b { <<<this, " ", a, " ", b, " test">>>; } @=> ptr_t ptr;
-// `a,b` { <<<"test">>>; } @=>
+ \a b { <<< this, " ", a, " ", b, " test" >>>; } @=> ptr_t ptr;
+// `a,b` { <<< "test" >>>; } @=>
// ptr_t ptr;
// ptr(1,2);
- fun void test(int i, int j) { <<<this, " ", i, " ", j>>>; }
+ fun void test(int i, int j) { <<< this, " ", i, " ", j >>>; }
// fun void test(ptr_t t, int i) {
-//<<<t>>>;
+//<<< t >>>;
// t(2,i);
// }
-// test(`a,b` { <<<this, " lambda argument">>>; }, 2);
+// test(`a,b` { <<< this, " lambda argument" >>>; }, 2);
}
-//<<<C c>>>;
+//<<< C c >>>;
C c;
-<<<c>>>;
-//<<<c.test>>>;
-//<<<c.ptr>>>;
+<<< c >>>;
+//<<< c.test >>>;
+//<<< c.ptr >>>;
//c.ptr(1,2);
-//<<<c.test>>>;
+//<<< c.test >>>;
c.test @=> c.ptr;
//c.ptr;
-//<<<c.ptr>>>;
+//<<< c.ptr >>>;
//c.test(1,2);
c.ptr(1, 2);
//c.ptr(1, 2);
//c.ptr(1, 2);
//(1,2) => c.ptr;
-//c.test(`a,b` { <<<this, "lambda argument">>>; }, 2);
+//c.test(`a,b` { <<< this, "lambda argument" >>>; }, 2);
//c.test(c.ptr, 2);
-//<<<c.ptr>>>;
+//<<< c.ptr >>>;
//c.ptr;
class C {
typedef void ptr_t(int i);
-\a { <<<this, " ", a>>>; } @=>
+\a { <<< this, " ", a >>>; } @=>
ptr_t ptr;
//ptr(3);
-fun void t1(int i) { <<<this, " t1 ", i>>>; }
+fun void t1(int i) { <<< this, " t1 ", i >>>; }
fun void test(ptr_t ptr) {
-<<<this>>>;
+<<< this >>>;
ptr(1);
}
t1 @=> ptr_t t1p;
//test(t1$ptr_t);
test(t1p);
//test(ptr);
-//<<<t1>>>;
-//<<<t1$ptr_t>>>;
+//<<< t1 >>>;
+//<<< t1$ptr_t >>>;
}
-<<<C c>>>;
-<<<c.test(c.ptr)>>>;
-<<<c.ptr(1)>>>;
+<<< C c >>>;
+<<< c.test(c.ptr) >>>;
+<<< c.ptr(1) >>>;
c.test(c.t1p);
12 => int i;
-\a b { <<<"i: ", i, " ", a, " ", b>>>; }(1,2);
+\a b { <<< "i: ", i, " ", a, " ", b >>>; }(1,2);
fun void test() {
- <<<test>>>;
+ <<< test >>>;
}
test();
-fun void _t() { <<<__func__>>>; }
+fun void _t() { <<< __func__ >>>; }
fun int t() {
-//<<<1>>>;
+//<<< 1 >>>;
spork _t();
- spork \a{ <<<__func__, " ", a>>>; }(1);
+ spork \a{ <<< __func__, " ", a >>>; }(1);
- spork { <<<__func__>>>; };
+ spork { <<< __func__ >>>; };
}
spork t();
t();
-fun void _t() { <<<__func__>>>; }
+fun void _t() { <<< __func__ >>>; }
class C {
-<<<this>>>;
-fun void __t() { <<<__func__>>>; }
-fun void __t(int i) { <<<this, " ", __func__, " ", i>>>; }
+<<< this >>>;
+fun void __t() { <<< __func__ >>>; }
+fun void __t(int i) { <<< this, " ", __func__, " ", i >>>; }
fun void t() {
spork _t();
spork _t();
spork this.__t();
spork __t();
-<<<this>>>;
+<<< this >>>;
spork __t(2);
me.yield();
- spork \{ <<<" " , __func__>>>; }();
+ spork \{ <<< " " , __func__ >>>; }();
- spork \a{ <<<__func__, " ", a>>>; }(1);
+ spork \a{ <<< __func__, " ", a >>>; }(1);
- spork { <<<__func__>>>; };
+ spork { <<< __func__ >>>; };
}
spork t();
spork t();
t();
me.yield();
}
-<<<C c>>>;
+<<< C c >>>;
me.yield();
fun void test() {
-// <<<1>>>;
-//spork \{<<<2>>>;}();
+// <<< 1 >>>;
+//spork \{<<< 2 >>>;}();
}
test();
test();
-<<<"end">>>;
+<<< "end" >>>;
me.yield();
fun void test(int i) {
- <<<"test ", i>>>;
+ <<< "test ", i >>>;
if(i > 1)
test(i-1);
}
fun void launch(int i) {
test(12);
- <<<" launch ", i>>>;
+ <<< " launch ", i >>>;
}
spork launch(2);
fun void launch(int i) {
-<<<" launch ", i>>>;
+<<< " launch ", i >>>;
}
//spork launch(2);
me.yield();
-class C { fun static C t() { C c; <<<c, " something">>>;
+class C { fun static C t() { C c; <<< c, " something" >>>;
return c; } }
//C c;
-<<<C.t()>>>;
+<<< C.t() >>>;
//[contains] not enough arguments
#define macro(a, b) a, b
-<<<macro(1)>>>;
+<<< macro(1) >>>;
//[contains] too many arguments
#define macro(a) a
-<<<macro(1,2)>>>;
+<<< macro(1,2) >>>;
//[contains] 'macro' undefined (after undefining)"
#define macro
#ifdef macro
-<<<"'macro' defined">>>;
+<<< "'macro' defined" >>>;
#else
-<<<"'macro' undefined">>>;
+<<< "'macro' undefined" >>>;
#endif
#undef macro
#ifdef macro
-<<<"'macro' defined (after undefining)">>>;
+<<< "'macro' defined (after undefining)" >>>;
#else
-<<<"'macro' undefined (after undefining)">>>;
+<<< "'macro' undefined (after undefining)" >>>;
#endif
#define macro
macro
-<<<"end of test">>>;
+<<< "end of test" >>>;
#define macro(a,b)
macro(1,2);
-<<<"end of test">>>;
+<<< "end of test" >>>;
//[contains] 123
#define macro(...) __VA_ARGS__
-<<<macro(1,2,3)>>>;
+<<< macro(1,2,3) >>>;
//[contains] test
#define macro "test"
-<<<macro>>>;
+<<< macro >>>;
//[contains] test12
#define macro(a,b) "test", a, b
-<<<macro(1,2)>>>;
+<<< macro(1,2) >>>;
-<<<__file__>>>;
+<<< __file__ >>>;
#!/bin/bash
-# [test] #29
+# [test] #28
n=0
[ "$1" ] && n="$1"
int i[][][];
-<<<i>>>;
+<<< i >>>;
fun void print_array(int a[]){
for(int i; i < a.size(); i++)
- <<<a[i]>>>;
+ <<< a[i] >>>;
}
int i[3][3];
1 => i[2][0];
-<<<i.size()>>>;
-<<<i.depth()>>>;
-<<<i.cap()>>>;
+<<< i.size() >>>;
+<<< i.depth() >>>;
+<<< i.cap() >>>;
print_array(i[2]);
i.remove(1);
-<<<i[1][0]>>>;
-<<<i.size()>>>;
-<<<i.depth()>>>;
-<<<i.cap()>>>;
+<<< i[1][0] >>>;
+<<< i.size() >>>;
+<<< i.depth() >>>;
+<<< i.cap() >>>;
print_array(i[1]);
int i;
-<<<i>>>;
+<<< i >>>;
//! document the AST
-<<<new float[3] @=> auto i>>>;
-<<<i>>>;
\ No newline at end of file
+<<< new float[3] @=> auto i >>>;
+<<< i >>>;
\ No newline at end of file
<~int~>Ptr ptr;
int i[4];
for(auto@ a : i)
- <<<*a>>>;
-<<<ptr>>>;
+ <<< *a >>>;
+<<< ptr >>>;
float f;
if(f)
- <<<"not ok">>>;
+ <<< "not ok" >>>;
else
- <<<"ok">>>;
+ <<< "ok" >>>;
while(f)
- <<<"not ok">>>;
+ <<< "not ok" >>>;
1 => f;
-do { <<<"test">>>; }
+do { <<< "test" >>>; }
until(f);
typedef int[2] test;
test var;
-<<<int>>>;
-<<<test>>>;
-<<<var>>>;
-<<<var $ int[]>>>;
+<<< int >>>;
+<<< test >>>;
+<<< var >>>;
+<<< var $ int[] >>>;
-<<< (2.0 $ int) >>>;
+<<< (2.0 $ int) >>>;
E e;
F f;
G g;
-//<<<f $ D>>>;
-<<< [ f, g ] >>>;
-<<<maybe ? f : D>>>;
-<<<c, " ", d, " ", e, " ", g>>>;
+//<<< f $ D >>>;
+<<< [ f, g ] >>>;
+<<< maybe ? f : D >>>;
+<<< c, " ", d, " ", e, " ", g >>>;
class C {
int i;
- do { <<<i++>>>; }
+ do { <<< i++ >>>; }
while(i < 6);
}
class C {
int i;
- do { <<<i++>>>; }
+ do { <<< i++ >>>; }
while(i < 6);
}
}
C c;
-<<<c.j[1]>>>;
+<<< c.j[1] >>>;
class C {
for(int i; i < 3; i++)
- <<<i>>>;
+ <<< i >>>;
}
class C {
- <<<maybe ? "ok" : "not ok">>>;
+ <<< maybe ? "ok" : "not ok" >>>;
}
float f;
} U;
- <<<U>>>;
- <<<U.i>>>;
- <<<U.f>>>;
+ <<< U >>>;
+ <<< U.i >>>;
+ <<< U.f >>>;
12 => U.i;
- <<<U.i>>>;
+ <<< U.i >>>;
12.3 => U.f;
- <<<U.f>>>;
- <<<U.i>>>;
+ <<< U.f >>>;
+ <<< U.i >>>;
}
C c;
-<<<c>>>;
-<<<c.U>>>;
-<<<c.U.i>>>;
-<<<c.U.f>>>;
+<<< c >>>;
+<<< c.U >>>;
+<<< c.U.i >>>;
+<<< c.U.f >>>;
123 => c.U.i;
-<<<c.U.i>>>;
+<<< c.U.i >>>;
1.23 => c.U.f;
-<<<c.U.f>>>;
-<<<c.U.i>>>;
-<<<c.i>>>;
+<<< c.U.f >>>;
+<<< c.U.i >>>;
+<<< c.i >>>;
int i;
repeat(3) {
i++;
- <<<i>>>;
+ <<< i >>>;
}
}
class C {
int i;
- <<<i>>>;
+ <<< i >>>;
switch(i) {
2;
case 1:
A a;
B b;
fun A test() {
- <<<"lol">>>;
+ <<< "lol" >>>;
}
fun void test2<~C~>(C c) {
- <<<c>>>;
+ <<< c >>>;
}
}
-//<<<C>>>;
+//<<< C >>>;
<~int, int~>C c;
<~float, int~>C d;
<~polar, int~>C e;
<~Vec3, int~>C f;
<~Object, int~>C g;
//C c;
-<<<c.a>>>;
-<<<d.a>>>;
-<<<e.a>>>;
-<<<c.test()>>>;
-<<<d.test()>>>;
-<<<e.test()>>>;
-<<<f.test()>>>;
-<<<g.test()>>>;
+<<< c.a >>>;
+<<< d.a >>>;
+<<< e.a >>>;
+<<< c.test() >>>;
+<<< d.test() >>>;
+<<< e.test() >>>;
+<<< f.test() >>>;
+<<< g.test() >>>;
c.test2(2);
int one;
string @ two;
};
- <<<one, " ", two>>>;
+ <<< one, " ", two >>>;
}
10 => const int i;
-<<<i>>>;
+<<< i >>>;
-<<<` new int[2] ` i>>>;
-<<<i>>>;
\ No newline at end of file
+<<< ` new int[2] ` i >>>;
+<<< i >>>;
\ No newline at end of file
do{
- <<<"'do' loop">>>;
+ <<< "'do' loop" >>>;
if(maybe)
break;
else continue;
fun int test(...){
vararg.start;
- <<<"test">>>;
- <<<vararg.i>>>;
+ <<< "test" >>>;
+ <<< vararg.i >>>;
vararg.end;
return 1;
}
-<<< test() >>>;
-<<< test() >>>;
-<<<(1, 7) => test>>>;
-<<<() => test>>>;
+<<< test() >>>;
+<<< test() >>>;
+<<< (1, 7) => test >>>;
+<<< () => test >>>;
enum {
zero, one, two, three
};
-<<<zero, " ", one, " ", two, " ", three>>>;
+<<< zero, " ", one, " ", two, " ", three >>>;
typedef Object[2] Class;
class C extends Class {}
C c;
-<<<c>>>;
+<<< c >>>;
-<<<"test">>>;
-<<< 2.3 $ int >>>;
+<<< "test" >>>;
+<<< 2.3 $ int >>>;
1 => float f;
fun void test(float f){}
1 => test;
// always return 0
-<<< false >>>;
+<<< false >>>;
(2.0 ? "yeah" : "not yeah") => string s;
-<<<s>>>;
+<<< s >>>;
{
if(i == 2)
continue;
- <<<i>>>;
+ <<< i >>>;
}
for(int i; i < 3;)
- <<<i++>>>;
+ <<< i++ >>>;
float f;
for(1 => f; f; 1 -=>f);
class C {
- fun void test(int i) { <<< "int arg" >>>; }
+ fun void test(int i) { <<< "int arg" >>>; }
typedef void Ptr(int i);
test @=>
Ptr p;
p(1);
}
C c;
-<<<c>>>;
+<<< c >>>;
-fun void test() { <<<"test">>>; return; <<<"this won't print. ever.">>>; }
+fun void test() { <<< "test" >>>; return; <<< "this won't print. ever." >>>; }
test();
fun void test(int i){}
fun int test(){}
-<<<test(1)>>>;
-<<<test()>>>;
+<<< test(1) >>>;
+<<< test() >>>;
Object o;
-<<<o>>>;
+<<< o >>>;
me.exit();
-<<<0x12aA>>>;
-<<<0c23>>>;
+<<< 0x12aA >>>;
+<<< 0c23 >>>;
-<<<maybe ? "ok" : "not ok">>>;
+<<< maybe ? "ok" : "not ok" >>>;
Object o;
-if(o)<<<"ok">>>;
+if(o)<<< "ok" >>>;
<~int, int~>Map pp;
-<<<pp>>>;
-<<<pp.size()>>>;
-<<<pp.set(1, 2)>>>;
-<<<pp.get(1)>>>;
+<<< pp >>>;
+<<< pp.size() >>>;
+<<< pp.set(1, 2) >>>;
+<<< pp.get(1) >>>;
class C
{
- operator => void(C c, int i){<<<c, " ", i>>>;}
+ operator => void(C c, int i){<<< c, " ", i >>>;}
// this => this;
//fun void test_op(C c){ this => c; }
this => int i;
int i, j;
-<<<i, " ", j>>>;
+<<< i, " ", j >>>;
Object @ i, a;
-<<<i, a>>>;
+<<< i, a >>>;
float f;
} U;
7.3 => float f;
-<<<U>>>;
-<<<U.i>>>;
-<<<U.f>>>;
+<<< U >>>;
+<<< U.i >>>;
+<<< U.f >>>;
12 => U.i;
-<<<U.i>>>;
+<<< U.i >>>;
12.3 => U.f;
-<<<U.f>>>;
-<<<U.i>>>;
-<<<i>>>;
-<<<f>>>;
+<<< U.f >>>;
+<<< U.i >>>;
+<<< i >>>;
+<<< f >>>;
-class C { union static private { int i; } u;<<<this, " ", u, " ", this.u.i>>>;
+class C { union static private { int i; } u;<<< this, " ", u, " ", this.u.i >>>;
}
C c;
-<<<c>>>;
+<<< c >>>;
-class C { union static { int i; } u;<<<this, " ", u, " ", this.u.i>>>; }
+class C { union static { int i; } u;<<< this, " ", u, " ", this.u.i >>>; }
C c;
-<<<c>>>;
-<<<C.u>>>;
-<<<C.u.i>>>;
+<<< c >>>;
+<<< C.u >>>;
+<<< C.u.i >>>;
switch(maybe) {
- case 1: <<<1>>>;break;
+ case 1: <<< 1 >>>;break;
case 0:
switch(maybe) {
case 1: break;
- case 0:<<<0>>>; break;
+ case 0:<<< 0 >>>; break;
}
break;
}
-<<<new int[3]>>>;
+<<< new int[3] >>>;
-if(!0.0)<<<"ok">>>;
+if(!0.0)<<< "ok" >>>;
-fun Object test(){ Object o; <<<o>>>; return new Object; }
+fun Object test(){ Object o; <<< o >>>; return new Object; }
test();
-<<<0 == 0>>>
+<<< 0 == 0 >>>
;
<~float, int~>Pair p;
-<<<p>>>;
+<<< p >>>;
1 => p.key;
2 => p.val;
-<<<p.key, " ", p.val>>>;
+<<< p.key, " ", p.val >>>;
(2,3) => p.set;
-<<<p.key, " ", p.val>>>;
+<<< p.key, " ", p.val >>>;
int i;
-<<< i++ >>>;
-<<< i >>>;
-<<< i-- >>>;
-<<< i >>>;
-<<< ++i >>>;
-<<< i >>>;
-<<< --i >>>;
-<<< i >>>;
+<<< i++ >>>;
+<<< i >>>;
+<<< i-- >>>;
+<<< i >>>;
+<<< ++i >>>;
+<<< i >>>;
+<<< --i >>>;
+<<< i >>>;
-class C { private int i; <<<i>>>; }
+class C { private int i; <<< i >>>; }
C c;
-<<<c>>>;
+<<< c >>>;
}
C c;
-<<<c>>>;
+<<< c >>>;
class C {
protect int i;
- <<<++i>>>;
+ <<< ++i >>>;
}
C c;
-<<<c.i>>>;
-//<<<++c.i>>>;
+<<< c.i >>>;
+//<<< ++c.i >>>;
//1 => c.i;
2 +=> c.i;
typedef void Test();
-fun void t(){<<<"lol">>>;}
+fun void t(){<<< "lol" >>>;}
t @=> Test test;
test();
int i;
repeat(3) {
i++;
- <<<i>>>;
+ <<< i >>>;
}
int i;
// define a funs that returns 1 if 'i' is non zero, and 0 othervise.
fun int test() { return i ? 1 : 0; }
-<<<test()>>>;
+<<< test() >>>;
1 => i;
-<<<test()>>>;
+<<< test() >>>;
2 => i;
-<<<test()>>>;
+<<< test() >>>;
spork { 5::samp => now;} @=> Shred @s;
spork { samp => now; 4::samp => now; } @=> Shred @t;
spork { 2::samp => now; me.exit(); };
-spork { new Object; <<<"garbage collect me" >>>; 3::samp => now; };
+spork { new Object; <<< "garbage collect me" >>>; 3::samp => now; };
2::samp => now;
12 => int i;
-<<<i>>>;
+<<< i >>>;
int i;
-<<<i>>>;
+<<< i >>>;
Object @ o;
-<<<o>>>;
+<<< o >>>;
-<<<sizeof int>>>;
+<<< sizeof int >>>;
fun void test() {
- spork { <<<2>>>; };
+ spork { <<< 2 >>>; };
}
-//spork { <<<1>>>; };
+//spork { <<< 1 >>>; };
//spork test();
test();
second => now;
class C
{
fun void test(int i){
- <<<i>>>;
+ <<< i >>>;
spork {
- <<<"test2">>>;
+ <<< "test2" >>>;
};
}
// spork test(2);
-// spork { <<<"test", this>>>; };
+// spork { <<< "test", this >>>; };
}
C c;
-<<<c>>>;
+<<< c >>>;
//spork
c.test(1);
c.test(2);
}
D d;
-<<<d>>>;
-<<<D.c.a>>>;
+<<< d >>>;
+<<< D.c.a >>>;
-<<<"test" == "test">>>;
+<<< "test" == "test" >>>;
string s;
-<<<s == s>>>;
-<<<"test" == s>>>;
+<<< s == s >>>;
+<<< "test" == s >>>;
int i;
-<<<i>>>;
+<<< i >>>;
switch(i) {
2;
case 1: break;
class<~A~> C {}
<~int~>C ref;
-<<<ref>>>;
+<<< ref >>>;
<~int, int~>Pair p;
typedef <~int, int~>Pair lol;
lol t;
-<<<t>>>;
-<<<t.key>>>;
+<<< t >>>;
+<<< t.key >>>;
class C extends lol { int i;}
C c;
-<<<c.i>>>;
+<<< c.i >>>;
class<~A~> D {
- <<<"lol">>>;
+ <<< "lol" >>>;
int i;
}
typedef <~int~>D Lol;
float f;
}
E d;
-<<<d>>>;
-<<<d.i>>>;
-<<<d.f>>>;
+<<< d >>>;
+<<< d.i >>>;
+<<< d.f >>>;
class C
{
fun void test() {
- <<<this>>>;
+ <<< this >>>;
}
}
e.signal;
Shred.fromId;
-<<<c.test>>>;
-<<<C.stest>>>;
-<<<e.signal>>>;
-<<<Shred.fromId>>>;
-<<<c.test>>>;
-<<<C.stest>>>;
-<<<e.signal>>>;
-<<<Shred.fromId>>>;
-<<<c.test>>>;
-<<<C.stest>>>;
-<<<e.signal>>>;
-<<<Shred.fromId>>>;
+<<< c.test >>>;
+<<< C.stest >>>;
+<<< e.signal >>>;
+<<< Shred.fromId >>>;
+<<< c.test >>>;
+<<< C.stest >>>;
+<<< e.signal >>>;
+<<< Shred.fromId >>>;
+<<< c.test >>>;
+<<< C.stest >>>;
+<<< e.signal >>>;
+<<< Shred.fromId >>>;
int one;
string @ two;
};
-<<<one, " ", two>>>;
+<<< one, " ", two >>>;
class C { int i; }
++ operator int (C c) {
- <<<"test">>>;
- <<<c>>>;
- <<<++c.i>>>;
+ <<< "test" >>>;
+ <<< c >>>;
+ <<< ++c.i >>>;
}
C c;
-<<<c>>>;
+<<< c >>>;
++c;