-Subproject commit 10f8920c058a9499259a6ab2aa6982084bcbd528
+Subproject commit a065796b43b43260ef290667711261058467158d
-adc => Gain g => dac;
+adc => var Gain g => dac;
g.chan(0);
spork { while(true) { g.gain() == (.2 ? .2 : .1) => g.gain; .15::second => now; }};
-for(int i; i < 5; i++) {
+for(var int i; i < 5; i++) {
<<< g.op() >>>;
i => g.op;
<<< g.op() >>>;
[1,2,3,4];
[ [1,2,3,4], [1,2,3,4] ];
<<< [1,2,3,4] >>>;
-int i[];
-int j[3];
-Object o[2];
-Object p[2][3];
-Object r[2][3][4];
-Object s[2][3][4][5];
-Object t[2][12][3][4][5];
+var int i[];
+var int j[3];
+var Object o[2];
+var Object p[2][3];
+var Object r[2][3][4];
+var Object s[2][3][4][5];
+var Object t[2][12][3][4][5];
[1,2,3,4] @=> i;
-int k[1][1];
+var int k[1][1];
<<< i, " ", j, " ", o, " ", p, " ", r, " ", s, " ", t, " ", k >>>;
class A
{
- int i;
+ var int i;
}
-A a[4][4];
+var A a[4][4];
<<< a[2][3] >>>;
<<< 2 => a[2][3].i >>>;
-int i[4][4];
+var int i[4][4];
<<< 54 => i[2][3] >>>;
-float f[4][4];
+var float f[4][4];
<<< f[2][3] >>>;
<<< 12.345 => f[2][3] >>>;
-Object i[4];
+var Object i[4];
foreach(a: i)
<<< a >>>;
1.3 => test;
test(1);
test(1.3);
-C->D d => test;
+var C.D d => test;
class C
{
- int i;
- Object o;
+ var int i;
+ var Object o;
}
-C c;
+var C c;
<<< c >>>;
class C
{
- int i;
- float f;
- Object o;
+ var int i;
+ var float f;
+ var Object o;
operator @dtor void () { <<< "dtor" >>>; }
}
-C c;
+var C c;
<<< c >>>;
}
<<< zero, " ", one, " ", two, " ", three >>>;
}
-C c;
+var C c;
<<< c >>>;
class C {
typedef void func_t();
#! typedef static void s_func_t();
- func_t func_p;
+ var func_t func_p;
#! static fun c_t s_func_p;
#! static s_func_t s_ptr;
fun void test() { <<< "member function." >>>; }
}
-C c;
+var C c;
c.func_p();
#!test @=> c.s_func_p;
class C
{
- 12 => int i;
- Object o;
+ 12 => var int i;
+ var Object o;
spork {
"test";
second => now;
- string s;
+ var string s;
<<< "test spork exp." >>>;
- } @=> Shred ref shred;
+ } @=> ref Shred shred;
}
-C c;
+var C c;
<<< c >>>;
me.yield();
second => now;
spork this.test();
}
-C c;
+var C c;
spork c.test();
me.yield();
4::samp => now;
-Event e;
+var Event e;
spork {second => now; e.broadcast(); };
spork \{second => now; e.broadcast(); }();
#!2::second => now;
class global TestEvent {
- static Event e;
+ static var Event e;
}
second => now;
#!second => now;
class global InvalidGlobalClass {
- inkrt i;
+ var inkrt i;
}
-InvalidGlobalClass c;
+var InvalidGlobalClass c;
-int i;
+var int i;
<<< 2 => i >>>;
<<< i >>>;
<<< i +=> i >>>;
<<< i +=> i >>>;
<<< i >>>;
-<<< 1 + 3 + i >>>;
+<<< 1 + 3 + i >>>;
<<< i++ >>>;
<<< ++i >>>;
<<< i-- >>>;
-int i;
+var int i;
<<< i >>>;
-Object o;
+var Object o;
o;
-SinOsc s;
+var SinOsc s;
-int i;
-float f;
+var int i;
+var float f;
do { <<< i++ >>>; if(maybe) break; }
until(i < 10);
do { <<< 1 +=> f >>>; if(maybe)continue; }
operator @dtor void () {<<< 1 >>>;}
}
-C c;
-C d;
+var C c;
+var C d;
#!me.yield();
<<< "end of dtor test." >>>;
<<< c," ", d >>>;
-"test" => string ref s;
+"test" => ref string s;
<<< s >>>;
-Event e;
+var Event e;
spork { <<< second => now >>>; e.broadcast(); };
<<< e => now >>>;
-Event e;
+var Event e;
spork { second => now; e.signal(); };
e => now;
class C extends int[2] {
<<< "test" >>>;
- 123 => int i;
+ 123 => var int i;
}
-C c;
+var C c;
<<< c.size() >>>;
<<< c.i >>>;
#! coverage for 'float'. (generated by util/coverage.sh)
-float a;
+var float a;
#!testing operator for float and float
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1+variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1-variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1*variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1/variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1&&variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1||variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1==variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1!=variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1>variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1>=variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1<variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1<=variable2 >>>;
}
#!testing operator for and float
{
- float variable2;
+ var float variable2;
<<< -variable2 >>>;
}
#!testing operator for and int
{
- int variable2;
+ var int variable2;
<<< !variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1=>variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1+=>variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1-=>variable2 >>>;
}
#!testing operator for float and float
{
- float variable1;
- float variable2;
+ var float variable1;
+ var float variable2;
<<< variable1*=>variable2 >>>;
}
#!testing operator for float and float
{
- 1 => float variable1;
- 1 => float variable2;
+ 1 => var float variable1;
+ 1 => var float variable2;
<<< variable1/=>variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1+variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1-variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1*variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1/variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1&&variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1||variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1==variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1!=variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1>variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1>=variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1<variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1<=variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1=>variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1+=>variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1-=>variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- float variable2;
+ var int variable1;
+ var float variable2;
<<< variable1*=>variable2 >>>;
}
#!testing operator for int and float
{
- int variable1;
- 1 => float variable2;
+ var int variable1;
+ 1 => var float variable2;
<<< variable1/=>variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1+variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1-variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1*variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1/variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1&&variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1||variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1==variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1!=variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1>variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1>=variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1<variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1<=variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1=>variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1+=>variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1-=>variable2 >>>;
}
#!testing operator for float and int
{
- float variable1;
- int variable2;
+ var float variable1;
+ var int variable2;
<<< variable1*=>variable2 >>>;
}
#!testing operator for float and int
{
- 1 => float variable1;
- 1 => int variable2;
+ 1 => var float variable1;
+ 1 => var int variable2;
<<< variable1/=>variable2 >>>;
}
-Impulse imp => FullRect fr => dac;
+var Impulse imp => var FullRect fr => dac;
samp => now;
1 => imp.next;
samp => now;
typedef void func_t();
-func_t func_p;
+var func_t func_p;
fun void test1() { <<< "test1" >>>; }
fun void test2() { <<< "test2" >>>; }
test1 @=> func_p;
fun void test3(){ <<< "yet another test" >>>; };
#! create a fun pointer instance
-Test test;
+var Test test;
#! assign it a fun
test1 @=> test;
-Impulse imp => HalfRect fr => dac;
+var Impulse imp => var HalfRect fr => dac;
samp => now;
1 => imp.next;
samp => now;
test $ t_ptr;
\{ <<< __func__ >>>; } $ t_ptr;#!; => test;
\{ <<< __func__ >>>; } => test;
- \a{} @=> t_ptr1 ptr1;
+ \a{} @=> var t_ptr1 ptr1;
}
-C c;
+var C c;
fun void test(<~int~>Ptr p) {
<<< *p >>>;
}
-int i => test;
+var int i => test;
-Impulse imp => dac;
+var Impulse imp => dac;
1 => imp.next;
<<< imp.next() >>>;
samp => now;
class C {
- fun void test<~a~>(a var){ <<< var >>>; }
- class D { int i;}
+ fun void test<~A~>(A a){ <<< a >>>; }
+ class D { var int i;}
}
-C c;
-C->D d;
-C->D ref d_ref;
+var C c;
+var C.D d;
+ref C.D d_ref;
<<< c, " ", d, d_ref >>>;
#! coverage for 'int'. (generated by util/coverage.sh)
-int a;
+var int a;
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1+variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1-variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1*variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- 1 => int variable2;
+ var int variable1;
+ 1 => var int variable2;
<<< variable1/variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- 1 => int variable2;
+ var int variable1;
+ 1 => var int variable2;
<<< variable1%variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1&&variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1||variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1==variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1!=variable2 >>>;
}
-#!testing operator for Object and
-{
- Object ref variable1;
-<<< variable1!= null >>>;
-}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1>=variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1<variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1<=variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1>>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1<<variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1&variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1|variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1^variable2 >>>;
}
#!testing operator for and int
{
- int variable2;
+ var int variable2;
<<< -variable2 >>>;
}
#!testing operator for and int
{
- int variable2;
+ var int variable2;
<<< !variable2 >>>;
}
#!testing operator for int and
{
- int variable1;
+ var int variable1;
<<< variable1++ >>>;
}
#!testing operator for and int
{
- int variable2;
+ var int variable2;
<<< ++variable2 >>>;
}
#!testing operator for int and
{
- int variable1;
+ var int variable1;
<<< variable1-- >>>;
}
#!testing operator for and int
{
- int variable2;
+ var int variable2;
<<< --variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1+=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1-=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1*=>variable2 >>>;
}
#!testing operator for int and int
{
- 1 => int variable1;
- 1 => int variable2;
+ 1 => var int variable1;
+ 1 => var int variable2;
<<< variable1/=>variable2 >>>;
}
#!testing operator for int and int
{
- 1 => int variable1;
- int variable2;
+ 1 => var int variable1;
+ var int variable2;
<<< variable1%=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1<<=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1>>=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1&=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1|=>variable2 >>>;
}
#!testing operator for int and int
{
- int variable1;
- int variable2;
+ var int variable1;
+ var int variable2;
<<< variable1^=>variable2 >>>;
}
#! testing cmp
-~1;
class C
{
- int i;
- float f;
- Object o;
+ var int i;
+ var float f;
+ var Object o;
fun int m_i() { return i; }
fun float m_f() { return f; }
fun Object m_o() { return o; }
}
-C c;
+var C c;
#! read members
<<< c.i, c.f, c.o >>>;
}
}
-C c;
+var C c;
<<< c.testf() >>>;
<<< c.testf(1.4) >>>;
<<< 1.2 >>>;
-SinOsc s => Gain g => HalfRect h => blackhole;
-s => ZeroX z => blackhole;
+var SinOsc s => var Gain g => var HalfRect h => blackhole;
+s => var ZeroX z => blackhole;
17 => s.init;
(1024, .17) => s.init;
-Impulse i => FullRect f => blackhole;
-Step step => blackhole;
+var Impulse i => var FullRect f => blackhole;
+var Step step => blackhole;
second => now;
<<< "end" >>>;
step =< blackhole;
-Object o;
-string s;
+var Object o;
+var string s;
<<< o + s >>>;
}
class C {
- Object ref ref_object;
+ ref Object ref_object;
}
#!! assign object to C.ref
}
#!operator int plusplus(null d, int i){}
-int i;
-Object o;
+var int i;
+var Object o;
<<< o, " ", i >>>;
12 => i;
#!o => i;
-C c;
+var C c;
o => c;
class C
{
- float f;
+ var float f;
}
operator => float (C c, C d){ <<< "float => C: ", c.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;}
-C c, d;
+var C c, d;
12.3 => c.f;
<<< c => d >>>;
<<< 2 => d >>>;
<<< 2.3 => d >>>;
-int i;
-2 => float f;
-complex cmp;
+var int i;
+2 => var float f;
<<< f >>>;
c => i;
<<< c.f >>>;
<<< f >>>;
c => f;
-c => cmp;
}
class D extends C {
}
-D d;
-d :=> <~C~>Ptr pd;
+var D d;
+d :=> var <~C~>Ptr pd;
class C {
typedef void Test();
fun void test1(){};
- Test test0;
+ var Test test0;
<<< test1 @=> test0 >>>;
}
-C c;
+var C c;
<<< c >>>;
-12 => int i;
+12 => var int i;
<<<i $ <~int~>Ptr >>>;
-int i;
-i :=> <~int~>Ptr pti;
+var int i;
+i :=> var <~int~>Ptr pti;
<<<12 => *pti, " ", *pti>>>;
<<< "from_Id ", Shred.fromId(1) >>>;
<<< "me ", me >>>;
<<< "args ", me.args() >>>;
-for (int i; i < me.args(); i++)
+for (var int i; i < me.args(); i++)
<<< "arg ", i, me.arg(i) >>>;
<<< me.dir(), " ", me.path() >>>;
<<< me.code_dir(), " ", me.code_path() >>>;
-SinOsc sinosc => dac;
+var SinOsc sinosc => dac;
1::second => now;
sinosc.freq(220);
1::second => now;
-SinOsc sinosc => dac;
+var SinOsc sinosc => dac;
<<< second >>>;
5::second => now;
fun float freq(float f) { (2 * f) => (this $ SinOsc).freq; }
}
-Sine s => dac;
+var Sine s => dac;
220 => s.freq;
second => now;
class C
{
- 12 => int i;
- Object o;
+ 12 => var int i;
+ var Object o;
<<< this >>>;
spork {
"test";
second => now;
- string s;
+ var string s;
<<< this, " test spork exp. " , s >>>;
- } @=> Shred ref shred;
+ } @=> ref Shred shred;
}
-C c;
+var C c;
<<< c >>>;
me.yield();
second => now;
}
}
-C c;
+var C c;
spork c.test(2);
me.yield();
4::samp => now;
class C
{
- static int i;
- static float f;
- static Object o;
+ static var int i;
+ static var float f;
+ static var Object o;
fun int m_i() { return i; }
fun float m_f() { return f; }
-Step step => dac;
+var Step step => dac;
.1 => step.next;
samp => now;
<<<step.next()>>>;
-string s;
+var string s;
"CamelCase" => s;
<<< "test" => s >>>;
<<< null @=> s >>>; #!test me
-fun void test<~A~> (A var){ <<< var >>>; }
-fun void test<~A,B~> (A var, B var2){ <<< var >>>; }
+fun void test<~A~> (A a){ <<< a >>>; }
+fun void test<~A,B~> (A a, B b){ <<< a >>>; }
test<~int~>(1);
test<~float, float~>(3, 1.4);
}
-<<< C c >>>;
-<<< D d >>>;
-<<< E e >>>;
+<<< var C c >>>;
+<<< var D d >>>;
+<<< var E e >>>;
test(c);
test(d);
-SinOsc s :=> Dtrig dtrig => blackhole;
+var SinOsc s :=> var Dtrig dtrig => blackhole;
second => now;
s :=< dtrig;
#!int i[];
typedef int[2] lol;
class C extends lol { }
-C c;
+var C c;
<<< c.size() >>>;
-int i[2];
+var int i[2];
<<< typeof(i) >>>;
<<< typeof(1) >>>;
-int i;
-<<<typeof(i) j>>>;
+var int i;
+<<< var typeof(i) j>>>;
-Gain a => SinOsc s => blackhole;
+var Gain a => var SinOsc s => blackhole;
-Gain a;
-SinOsc s => blackhole;
+var Gain a;
+var SinOsc s => blackhole;
a =< s;
-class C { int i; }
+class C {
+ var int i;
+}
+
operator ++ int (C c) {
<<< "here" >>>;
<<< c.i++ >>>;
}
-C c;
+var C c;
c++;
c++;
<<< c.i >>>;
fun void test(...) {
- int i;
+ var int i;
varloop vararg {
if(i == 0)
<<< vararg $ int >>>;
-Impulse imp => ZeroX fr => dac;
+var Impulse imp => var ZeroX fr => dac;
samp => now;
-1 => imp.next;
samp => now;
-Subproject commit 1c83920b6f482bfd70f6f6f71e074208c33581d4
+Subproject commit 25b4ae8cf9910effbf486fb11e0d8b0ea53ddd21
<<<test ~= this, " ", this>>>;
}
-C u => dac;
+var C u => dac;
<<< u >>>;
#! use default tick
<<<test ~= this, " ", this>>>;
}
-C u => dac;
+var C u => dac;
<<< u >>>;
samp => now;
<<< u.last() >>>;
<<<test ~= this, " ", this>>>;
}
-C u => dac;
+var C u => dac;
<<< u >>>;
samp => now;
<<< u.last() >>>;
<<<test ~= this, " ", this>>>;
}
-C u => dac;
+var C u => dac;
<<< u >>>;
samp => now;
<<< u.last() >>>;
<<<test ~= this, " ", this>>>;
}
-C u => dac;
+var C u => dac;
<<< u >>>;
samp => now;
<<< u.last() >>>;
#! [contains] NullTickException
typedef float ptr_t(float);
-ptr_t ptr ~= UsrUGen u;
+var ptr_t ptr ~= var UsrUGen u;
class Tester
{
- fun int assert<~A~>_equal(string description, A a, A b){ if(a == b) return 0; return 1; }
- fun int assert<~A~>_not_equal(string description, A a, A b){ if(a != b) return 0; return 1; }
+ fun int assert_equal<~A~>(string description, A a, A b){ if(a == b) return 0; return 1; }
+ fun int assert_not_equal<~A~>(string description, A a, A b){ if(a != b) return 0; return 1; }
}
-Tester t;
-Object o;
-Object ref ref;
-"test" => string s;
+var Tester t;
+var Object o;
+ref Object oref;
+"test" => var string s;
#!<<< t.assert_equal("test", 1, 1) >>>;
#!<<< t.assert_equal("test", 2, 1) >>>;
<<< t.assert_equal(s, 1, 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_equal(s, oref, 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_not_equal(s, oref, null) >>>;
class Test_Array
{
- int i[4];
- float f[4];
+ var int i[4];
+ var float f[4];
i[0];
f[0];
<<< i.size() >>>;
}
-Test_Array t;
+var Test_Array t;
<<< t >>>;
class C
{
#!! has an int
- int i;
+ var int i;
#!! a fun
fun void test() {}
#!! operator
-int i;
+var int i;
do { <<< i++ >>>; }
while(i < 6);
do { <<< i-- >>>; }
while(i);
-6 => float f;
+6 => var float f;
do { <<< 1 -=> f >>>; }
while(f);
-5 => int i;
+5 => var int i;
do { <<< i-- >>>; } while(i);
-5 => float f;
+5 => var float f;
do { <<< 1 -=> f >>>; } while(f > 0.0);
#! do { <<< 1 -=> f >>>; } while(f > 0);
5 => f;
#! thanks to afl-fuzz
-SinOsc ref s, t;
-Gain g => dac;
+ref SinOsc s, t;
+var Gain g => dac;
1 => t.freq;
s => g;
t => g;
g.chan(0);
spork { while(true) { Math.rand2f(100, 800) => s.freq; .15::second => now; }};
-for(int i; i < 5; i++) {
+for(var int i; i < 5; i++) {
<<< g.op() >>>;
i => g.op;
2::second => now;
+++ /dev/null
-#! coverage for 'float'. (generated by util/coverage.sh)
-
-float a;
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1=variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1+variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1-variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1*variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- 1 => float variable2;
-<<< variable1/variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1&&variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1||variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1==variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1!=variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1>variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1>=variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1<variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1<=variable2 >>>;
-}
-
-#!testing operator for and float
-{
- float variable2;
-<<< -variable2 >>>;
-}
-
-#!testing operator for and int
-{
- int variable2;
-<<< !variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1=>variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1+=>variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1-=>variable2 >>>;
-}
-
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1*=>variable2 >>>;
-}
-#!testing operator for float and float
-{
- float variable1;
- float variable2;
-<<< variable1/=>variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1=variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1+variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1-variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1*variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1/variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1&&variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1||variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1==variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1!=variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1>variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1>=variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1<variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1<=variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1=>variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1+=>variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1-=>variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1*=>variable2 >>>;
-}
-
-#!testing operator for int and float
-{
- int variable1;
- float variable2;
-<<< variable1/=>variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1+variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1-variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1*variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1/variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1&&variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1||variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1==variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1!=variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1>variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1>=variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1<variable2 >>>;
-}
-
-#!testing operator for float and int
-{
- float variable1;
- int variable2;
-<<< variable1<=variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1=>variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1+variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1-variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1*variable2 >>>;
-}
-
-#!testing operator for dur and float
-{
- dur variable1;
- float variable2;
-<<< variable1*variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1/variable2 >>>;
-}
-
-#!testing operator for dur and float
-{
- dur variable1;
- float variable2;
-<<< variable1/variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1>variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1>=variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1<variable2 >>>;
-}
-
-#!testing operator for dur and dur
-{
- dur variable1;
- dur variable2;
-<<< variable1<=variable2 >>>;
-}
-
-#!testing operator for time and time
-{
- time variable1;
- time variable2;
-<<< variable1=>variable2 >>>;
-}
-
-#!testing operator for dur and time
-{
- dur variable1;
- time variable2;
-<<< variable1=>variable2 >>>;
-}
-
-#!testing operator for dur and
-{
- dur variable1;
-<<< variable1=> now >>>;
-}
-
-#!testing operator for time and dur
-{
- time variable1;
- dur variable2;
-<<< variable1+variable2 >>>;
-}
-
-#!testing operator for dur and time
-{
- dur variable1;
- time variable2;
-<<< variable1+variable2 >>>;
-}
-
-#!testing operator for time and time
-{
- time variable1;
- time variable2;
-<<< variable1>variable2 >>>;
-}
-
-#!testing operator for time and time
-{
- time variable1;
- time variable2;
-<<< variable1>=variable2 >>>;
-}
-
-#!testing operator for time and time
-{
- time variable1;
- time variable2;
-<<< variable1<variable2 >>>;
-}
-
-#!testing operator for time and time
-{
- time variable1;
- time variable2;
-<<< variable1<=variable2 >>>;
-}
+++ /dev/null
-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 >>>;
-
-<<< 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 >>>;
-
-<<< "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 >>>;
-<<< !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 >>>;
-
-
-#!<<< 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 >>>;
-Object o;
-"Object: " => string s;
+var Object o;
+"Object: " => var string s;
<<< s + (o + "") >>>;
-"lol" @=> string ref s;
+"lol" @=> ref string s;
"test" => s;
<<< "testmem".replace(2, 3, "UKUH") >>>;
class C
{
- static int i;
- static float f;
- static Object o;
+ static var int i;
+ static var float f;
+ static var Object o;
}
<<< C.i >>>;
<<< C.f >>>;
-UGen ref u;
+ref UGen u;
#!u.last(); #! should fail => fails.
-SinOsc s => Gain g => dac;
-for(-1 => int i;i < 6; i++)
+ref SinOsc s => ref Gain g => dac;
+for(-1 => var int i;i < 6; i++)
i => g.op;
samp => now;
s.last();
#! [contains] cannot
-void this_won_t_work;
+var void this_won_t_work;
-Gain ref g => dac;
+ref Gain g => dac;
#! [contains] is abstract, declare as ref
-Shred shred;
+var Shred shred;
#! [contains] has already been defined in parent class
class C {
- int i;
+ var int i;
}
class CC extends C {
- int i;
+ var int i;
}
#! [contains] do not provide array
-[1,2,3,4] @=> int loop[1];
+[1,2,3,4] @=> var int loop[1];
#! [contains] array depths do not match
-[1,2,3,4] @=> int k[1][1];
+[1,2,3,4] @=> var int k[1][1];
#! [contains] partially empty array init
-int i[2][];
+var int i[2][];
#! [contains] partially empty array init
-int i[][3];
+var int i[][3];
#! [contains] exceeds defined dimension
- int i[2];
+var int i[2];
i[0][0];
#! [contains] NegativeArraySize
-int i[2][-1];
+var int i[2][-1];
#! [contains] NullPtrException
-int i[1][1];
+var int i[1][1];
null @=> i[0];
<<< i[0][0] >>>;
#! [contains] ArrayOutofBounds
-Object o[1][1];
+var Object o[1][1];
o[1];
#! [contains] has no member
-int i[2][2];
+var int i[2][2];
i[0].test;
#! [contains] ArrayOutofBounds
-Object i[1];
+var Object i[1];
i[1];
#! [contains] ArrayOutofBounds
-Object i[1][1];
+var Object i[1][1];
i[1][0];
#! [contains] ref array must not have array expression
-int ref my_array[2];
+ref int my_array[2];
#! [contains] array types do not match
-[1,2,3,4] @=> Object k[1];
+[1,2,3,4] @=> var Object k[1];
#! [contains] no match found for operator
-int => auto ae @=> auto A;
+var int i => var auto ae @=> var auto A;
#! [contains] not allowed in auto loop
-Object i;
+var Object i;
foreach(a: i)
<<< a >>>;
#! [contains] cannot find class
class C {
class D {
- int i;
+ var int i;
}
}
class E extends C {
- C->D d;
+ var C.D d;
}
class F {
- F->D d;
+ var F.D d;
}
-F f;
+var F f;
#! [contains] can't infer
-auto i;
+var auto i;
#! [contains] declared inside
class c {
- c var;
+ var c myvar;
}
#! [contains] function name 'test' conflicts with previously defined value
-class C { int test;
+class C {
+ var int test;
}
class D extends C {
#! [contains] NullPtrException
-UGen ref u;
+ref UGen u;
adc => u;
#! [contains] already defined
- class C{}
+class C{}
class C{}
#! [contains] empty for loop condition
<<< "test" >>>;
-for(int i;;){}
+for(var int i;;){}
class C
{
typedef void test();
- test t;
+ var test t;
}
-<<< C c >>>;
+<<< var C c >>>;
<<< c.t >>>;
c.t();
#! [contains] NullPtrException
class C
{
- int i;
+ var int i;
}
-C ref c;
+ref C c;
c.i;
#! [contains] EmptyPointerException
-<~int~>Ptr t;
+var <~int~>Ptr t;
<<< *t >>>;
#! [contains] already been defined
-int i;
+var int i;
enum i
{
test
#! [contains] NullPtrException
-Event ref e;
+ref Event e;
e => now;
#! [contains] can't assign
class C extends Event{}
-Event e @=> C o;
+var Event e @=> var C o;
#! [contains] unknown type
class C extends UGen {
- D d;
+ var D d;
}
}
class D {
typedef void t_ptr();
- C->t_ptr ptr;
+ var C.t_ptr ptr;
}
#! [contains] unknown type
- fun void my_func(unknown_type unknown_arg){}
+fun void my_func(unknown_type unknown_arg){}
#! [contains] unknown type
-fun void test() { skfuv sd; }
+fun void test() { var skfuv sd; }
#! [contains] function call using a non-function value
- null();
+null();
#! [contains] NullPtrException
typedef void Test();
-Test test;
+var Test test;
test();
#! [contains] must be defined with empty
- fun int[1] my_func(int i[]){}
+fun int[1] my_func(int i[]){}
#! [contains] unknown type
- fun unknwon_type my_function(){}
+fun unknwon_type my_function(){}
#! [contains] cannot declare variables of size
- fun void test(void v){}
+fun void test(void v){}
-#! [contains]
- fun void test()
-{
+#! [contains]
+fun void test() {
fun void nested(){}
}
#! [contains] has already been defined in the same scope
-int i;
+var int i;
fun void i(){}
#! [contains] while defining
-class C{0=>int i;}operator@implicit int(C c){return c;i;}fun void test(int i){<<<i>>>;}C c;c=>test;
+class C {
+ 0 => var int i;
+}
+operator @implicit int(C c) {
+ return c;
+}
+
+fun void test(int i){<<<i>>>;}
+var C c;
+c=>test;
#! [contains] invalid array acces expression
-int j[];
+var int j[];
j[1,2,3,4] @=> i;
#! [contains] array depths do not match
-int i[2][2];
+var int i[2][2];
i << 2;
#! [contains] can't cast
class C {}
class D {}
-D d;
+var D d;
d $ C;
#! [contains] 'global' can only be used at class scope
class C {
{
- global int i;
+ global var int i;
}
}
#! [contains] 'global' can only be used at file scope
{
-global int i;
+global var int i;
}
#! [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 >>>; } @=> var 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 >>>; } @=> var ptr_t ptr;
fun void test(ptr_t p) {
p(2);
}
#! [contains]
class C {
- int i;
+ var int i;
fun static void test() {
<<< i >>>;
}
#! [contains] from/to a multi-variable declaration
-int i, ii => float f;
+var int i, ii => var float f;
#! [contains] conflicts with previously defined value
class C {
- int test;
+ var int test;
}
class D extends C {
#! [contains] NegativeArraySize: while allocating arrays
-int i[-1];
+var int i[-1];
<<< i >>>;
#! [contains] ArrayOutofBounds
-int i[2][2];
+var int i[2][2];
<<< i[1][-1] >>>;
<<< -1 >>>;
class C{}
class D{}
-C c;
-D d;
+var C c;
+var D d;
<<< c $ D >>>;
<<< d >>>;
#! [contains] does not have members - invalid use in dot expression
-int i;
-i.nothing;
+var int i;
+i.nothing;
class C{
class private D{}
}
-int->D d;
+var int.D d;
#! [contains] template call of non-function value
-int test;
+var int test;
test<~int~>();
class C {
typedef void t_ptr();
}
-C->t_ptr ptr;
+var C.t_ptr ptr;
ptr();
#! [contains] non-static member 'i' used from static function
class C {
- int i;
+ var int i;
fun static void test() { <<< i >>>; }
}
#! [contains] can't use nonnull type in class extend
-class C extends Object nonnull {
+class C extends nonnull Object {
}
}
-global C c;
+global var C c;
#! [contains] NullPtrException
-int i[];
+var int i[];
i[0];
#! [contains] NullPtrException
-int i[][];
+var int i[][];
i[0][0];
#! [contains] NullPtrException
-int i[];
+var int i[];
foreach(a : i)
<<< a >>>;
#! [contains] no match found for operator
- Object o;
+var Object o;
null +=> o;
}
-C c[1];
-C d[2][4];
+var C c[1];
+var C d[2][4];
c => d;
#! [contains] conflicts with previously defined value
class C
{
- int test;
+ var int test;
}
class D extends C
fun void test() {}
}
-C c;
-D d;
+var C c;
+var D d;
<<< c >>>;
-<<< d >>>;
\ No newline at end of file
+<<< d >>>;
#! [contains] no match found for operator
-Object o;
+var Object o;
o++;
#! [contains] can't access private
-class C { private int i; }
+class C { private var int i; }
-C c;
+var C c;
<<< c.i >>>;
fun private void test(){}
}
-C c;
+var C c;
c.test();
fun private void test(){}
}
-C c;
+var C c;
c.test;
#! [contains] can only be used at class scope
-private int i;
+private var int i;
#! [contains] can't access private
-class C { private int i; }
+class C { private var int i; }
class D {
- C c;
+ var C c;
<<< c.i >>>;
}
-1 :=> <~int~>Ptr pd;
+1 :=> var <~int~>Ptr pd;
#! [contains] can't assign non member function to member function pointer
class C {
typedef void Test();
- Test test;
+ var Test test;
}
fun void test(){}
-C c;
+var C c;
test @=> c.test;
class D extends C {}
-D d;
-d :=> <~int~>Ptr pd;
+var D d;
+d :=> var <~int~>Ptr pd;
#! [contains] can't assign member function to non member function pointer
typedef void Test();
-Test test;
+var Test test;
class D {
fun void test(){}
}
-D d;
+var D d;
d.test @=> test;
#! [contains] can't assign member function to a pointer of an other class
class C {
typedef void Test();
- Test test;
+ var Test test;
}
class D {
fun void test(){}
}
-C c;
-D d;
+var C c;
+var D d;
<<< d.test @=> c.test >>>;
#! [contains] has already been defined in the same scope
-int i;
+var int i;
typedef void i();
-1 :=> <~int~>Ptr i;
+1 :=> var <~int~>Ptr i;
fun void test(float f){}
typedef void Test();
-Test t;
+var Test t;
test @=> t;
class F extends E {}
class G extends C {}
-C c;
-D d;
-E e;
-F f;
-G g;
+var C c;
+var D d;
+var E e;
+var F f;
+var G g;
<<< f $ D >>>;
<<< [ f, g ] >>>;
<<< maybe ? f : D >>>;
#! [contains] only function calls can be sporked
-int i;
+var int i;
<<< i >>>;
spork i;
#! [contains] can only be used at class scope
-static int i;
+static var int i;
#! [contains] you must provide template types
class<~A~> C {
- A a;
+ var A a;
}
-C c;
+var C c;
}
-<<< C c >>>;
-<<< D d >>>;
-<<< E e >>>;
+<<< var C c >>>;
+<<< var D d >>>;
+<<< var E e >>>;
test(c);
test(d);
fun void test<~A~>(float f) {}
fun void test<~A~>() {}
}
-C c;
+var C c;
#!c.test<~int~>();
c.test<~int~>(2.3);
c.test<~int~>(2.3, 2.3);
#! [contains] is not template
-<~int~>Object o;
+var <~int~>Object o;
#! [contains] unknown type
-fun void test(B->C a){}
+fun void test(B.C a){}
#! [contains] pre-defined types
typedef void t_ptr<~A~>();
-<~int~>t_ptr iptr;
+var <~int~>t_ptr iptr;
fun void test<~A~>() {
- A a;
+ var A a;
<<< __func__, " ", a>>>;
}
<<< __func__ >>>;
}
-test @=> B b;
+test @=> var B b;
#!<<< iptr<~int~>() >>>;
<<< b() >>>;
<<< b<~int~>() >>>;
-typeof( 1 + 2 ) i;
\ No newline at end of file
+var typeof( 1 + 2 ) i;
#! [contains] no match found for operator
-int i;
+var int i;
*i;
#! [contains] unknown type
class C extends Undefined {}
-C c;
-<<< c >>>;
\ No newline at end of file
+var C c;
+<<< c >>>;
#! [contains]
- union
+union
{
one; two;
};
#! [contains] unknown type
#! hit the error with an unknown type
-unknown_type variable;
+var unknown_type variable;
#! [contains] has already been defined in the same scope
-int i;
-int i;
+var int i;
+var int i;
#! [contains] cannot access member
class C {
- int i;
+ var int i;
}
C.i;
12::samp => now;
me.test_cancel();
<<< "stop" >>>;
-} @=> Fork ref f;
+} @=> ref Fork f;
1 => f.set_cancel;
2::samp => now;
return 12;
}
-fork test() @=> <~int~>TypedFork ref sh;
+fork test() @=> ref <~int~>TypedFork sh;
<<< typeof(sh) >>>;
sh.ev => now;
<<< sh.retval >>>;
-fork { <<< __func__ >>>; } @=> Fork ref f;
+fork { <<< __func__ >>>; } @=> ref Fork f;
second => now;
f.join();
-fork { <<< __func__ >>>; minute => now; } @=> Fork ref f;
+fork { <<< __func__ >>>; minute => now; } @=> ref Fork f;
f.join();
class C {
fun static void test(int i) { <<< "int arg" >>>; }
typedef void PtrType(int i);
- test @=> PtrType p;
+ test @=> var PtrType p;
p(1);
test @=> p;
p(1);
}
-C c;
+var C c;
fun void test(int i) { <<< "int arg" >>>; }
typedef static void PtrType(int i);
test @=>
- PtrType p;
+ var PtrType p;
p(1);
test @=> p;
p(1);
}
-C c;
+
+var C c;
class C {
fun void test(int i) { <<< "int arg" >>>; }
typedef void PtrType(int i);
- test @=> static PtrType p;
+ test @=> static var PtrType p;
p(1);
test @=> p;
p(1);
}
-C c;
+
+var C c;
class C {
fun static void test(int i) { <<< "int arg" >>>; }
typedef static void PtrType(int i);
- test @=> static PtrType p;
+ test @=> static var PtrType p;
p(1);
test @=> p;
p(1);
}
-C c;
+
+var C c;
<<< c >>>;
class C {
fun void test(int i) { <<< "int arg" >>>; }
typedef static void PtrType(int i);
- test @=> static PtrType p;
+ test @=> static var PtrType p;
p(1);
test @=> p;
p(1);
}
-C c;
+
+var C c;
typedef void ptr_t();
-ptr_t t @=> ptr_t t2;
+var ptr_t t @=> var ptr_t t2;
#! [contains] Hello, generated function pointer!
fun void test() { <<< "Hello, generated function pointer!" >>>; }
-test @=> auto p;
+test @=> var auto p;
p();
fun int test(int i) { <<< "test with arg ", i >>>; }
-PtrTypeI p;
+var PtrTypeI p;
test @=> p;
<<< test >>>;
<<< p >>>;
#!<<< c2 >>>;
#!<<< c2.value >>>;
-<~int, int~>ClassTemplate ct;
+var <~int, int~>ClassTemplate ct;
<<< ct.key >>>;
#!<float, float>ClassTemplate ct2;
#!<<< ct2.key >>>;
-<<< float f >>>;
-Coverage c;
+<<< var float f >>>;
+var Coverage c;
c.s_i;
<<< Coverage.i() >>>;
<<< Coverage.f() >>>;
-ArrayExt a;
+var ArrayExt a;
<<< a >>>;
<<< a.size() >>>;
fun void test(){ <<< "test" >>>; }
-PtrType ptr;
+var PtrType ptr;
test();
test @=> ptr;
ptr();
FuncTypedef.test_func();
<<< FuncTypedef.test_func @=> FuncTypedef.ptr >>>;
-<FuncTypedef.PtrType> _ptr;
+var FuncTypedef.PtrType _ptr;
<<< FuncTypedef.ptr >>>;
FuncTypedef.ptr();
-<~int, float~>Map pp;
+var <~int, float~>Map pp;
<<< pp >>>;
<<< pp.size() >>>;
<<< pp.set(1, 2) >>>;
-Trig trig => dac;
+var Trig trig => dac;
adc :=> trig;
adc :=< trig;
-Trig2 trig2 => dac;
+var Trig2 trig2 => dac;
adc :=> trig2;
adc :=< trig2;
-Typedef t;
+var Typedef t;
#!fun int test(int i) { <<< i >>>; }
#!test @=> t;
<<< t >>>;
-Union u;
+var Union u;
<<< u.i >>>;
<<< 12 => u.f >>>;
<<< 1 => u.i >>>;
-<<< <~Event~>U u>>>;
+<<< var <~Event~>U u>>>;
<<< u.a >>>;
<<< "test builtin variadic fun" >>>;
-Variadic v;
-"iiii" => string format;
+var Variadic v;
+"iiii" => var string format;
<<< v, " ", format $ Object >>>;
v.member(format, 1,2,3,4);
v.member(format, 1,2,3,4);
typedef int INT;
-INT i;
+var INT i;
<<< i $ int >>>;
#! [contains] 1
-class C { 10 => int i; }
+class C {
+ 10 => var int i;
+}
operator @conditionnal int(C c) {
<<< __func__ >>>;
return c.i;
}
-C c;
+var C c;
while(c) <<<c.i>>>;
#! [contains] 12
class C {
- 12 => int i;
+ 12 => var int i;
}
operator @implicit int (C c) {
}
fun void test(int i) { <<< i >>>; }
-C c;
+var C c;
c => test;
fun void test(INT i) { <<< i >>>; }
fun void test2(int i) { <<< i >>>; }
1 => test;
-INT i => test2;
+var INT i => test2;
class C {
operator @gack void() { <<< __func__ >>>; }
}
-<<< C c >>>;
+<<< var C c >>>;
<<< c >>>;
#! [contains] 1
-class C { 10 => int i; }
+class C {
+ 10 => var int i;
+}
operator @unconditionnal int(C c) {
<<< __func__ >>>;
return !c.i;
}
-C c;
+var C c;
until(c) <<<c.i>>>;
#! [contains] Hello, interpolation! 1
-1 => int my;
+1 => var int my;
<<< `Hello, interpolation! ${ my }` >>>;
#! [contains] 1 Hello, interpolation!
-1 => int my;
+1 => var int my;
<<< `${my} Hello, interpolation!` >>>;
#! [contains] Hello, interpolation! 1
-1 => int my;
-`Hello, interpolation! ${ my }` => string s;
+1 => var int my;
+`Hello, interpolation! ${ my }` => var string s;
<<< s >>>;
-int i;
+var int i;
match (i) {
case _ : <<< "success" >>>;
-} where int a;
+} where var int a;
class C {
-int m_i;
+ var int m_i;
typedef void t_fptr0();
typedef void t_fptr1(int i);
fun void test() { <<< this , " ", __func__ >>>;}
fun void test(int i) { <<< __func__, " ", i >>>;}
-#! fun t_fptr call() {
-#! <<< this >>>;
-#! return test $ t_fptr;
-#! }
-#! spork call();
-#! me.yield();
-#!<<< this >>>;
-#! test @=>
-test @=> t_fptr0 ptr0;
-test @=> t_fptr1 ptr1;
-<<<ptr0>>>;
+ test @=> var t_fptr0 ptr0;
+ test @=> var t_fptr1 ptr1;
+ <<<ptr0>>>;
spork ptr0();
-#! spork ptr1(2);
me.yield();
}
-<<< C c >>>;
-#!<<< c.test >>>;
-#!<<< c.call() >>>;
+<<< var C c >>>;
fun void test<~A~>(A a) { <<< a >>>; }
}
-class D extends C {
-}
+class D extends C {}
-D d;
+var D d;
d.test(1);
d.test(2.3);
operator @dtor void () { <<< __func__ >>>; }
}
-E e;
+var E e;
operator @dtor void () { <<< __func__ >>>; }
}
-<~float~>C c;
+var <~float~>C c;
<<< c >>>;
<<< c.test() >>>;
<<< c.i >>>;
}
-<~int,int~>D d;
+var <~int,int~>D d;
class <~A,B~>E extends <~float,B~>D {
}
-<~int,int~>E e;
+
+var <~int,int~>E e;
class C {
- 1 => float f;
+ 1 => var float f;
}
-C c;
+var C c;
<<< c.f >>>;
class C {
- int i;
+ var int i;
class D {
i;
}
class C {
- int i;
+ var int i;
class D {
this.i;
}
-123 => global int global_func_i;
+123 => global var int global_func_i;
class global GlobalFuncClass {
- 13 => int i;
+ 13 => var int i;
}
<<< global_func_i >>>;
-global GlobalFuncClass g_c;
+global var GlobalFuncClass g_c;
<<< g_c, "->i => ", g_c.i >>>;
fun global void g_test() { <<< global_func_i >>>; <<< g_c >>>; <<< g_c.i >>>; <<< "test" >>>; }
#!fun global void g_test() { <<< "test" >>>; }
<<< g_c.i >>>;
<<< g_test >>>;
g_test();
-
-#!g_test();
-#!g_test();
-<<< global int global_var_i >>>;
+<<< global var int global_var_i >>>;
test => f;
f(test);
}
-C c;
+
+var C c;
<<< 1.9 > 1 >>>;
-int i;
+var int i;
<<< .1 -=> i >>>;
-typeof(1) i;
+var typeof(1) i;
<<< i >>>;
class C {
typedef void ptr_t(int i,int j);
- \a b { <<< this, " ", a, " ", b, " test" >>>; } @=> ptr_t ptr;
-#! typeof(a,b) { <<< "test" >>>; } @=>
-#! ptr_t ptr;
-#! ptr(1,2);
+ \a b { <<< this, " ", a, " ", b, " test" >>>; } @=> var ptr_t ptr;
fun void test(int i, int j) { <<< this, " ", i, " ", j >>>; }
-#! fun void test(ptr_t t, int i) {
-#!<<< t >>>;
-#! t(2,i);
-#! }
-#! test(typeof(a,b) { <<< this, " lambda argument" >>>; }, 2);
}
-#!<<< C c >>>;
-C c;
+var C c;
<<< c >>>;
-#!<<< c.test >>>;
-#!<<< c.ptr >>>;
-#!c.ptr(1,2);
-#!<<< c.test >>>;
c.test @=> 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(typeof(a,b) { <<< this, "lambda argument" >>>; }, 2);
-#!c.test(c.ptr, 2);
-#!<<< c.ptr >>>;
-#!c.ptr;
class C {
-typedef void ptr_t(int i);
-\a { <<< this, " ", a >>>; } @=> ptr_t ptr;
-#!ptr(3);
-fun void t1(int i) { <<< this, " t1 ", i >>>; }
-fun void test(ptr_t p) {
-<<< this >>>;
- p(1);
+ typedef void ptr_t(int i);
+ \a { <<< this, " ", a >>>; } @=> var ptr_t ptr;
+ fun void t1(int i) { <<< this, " t1 ", i >>>; }
+ fun void test(ptr_t p) {
+ <<< this >>>;
+ p(1);
+ }
+ t1 @=> var ptr_t t1p;
+ test(t1p);
}
-t1 @=> ptr_t t1p;
-#!test(t1$ptr_t);
-test(t1p);
-#!test(ptr);
-#!<<< t1 >>>;
-#!<<< t1$ptr_t >>>;
-}
-<<< C c >>>;
+<<< var C c >>>;
<<< c.test(c.ptr) >>>;
<<< c.ptr(1) >>>;
c.test(c.t1p);
-12 => int i;
+12 => var int i;
\a b { <<< "i: ", i, " ", a, " ", b >>>; }(1,2);
-typeof(1) i;
+var typeof(1) i;
}
class <~A,B~> D extends <~A~>C {
class <~A~>Child {
- A a;
+ var A a;
}
- <~A~>Child child;
+ var <~A~>Child child;
}
-<~int~>D d;
+var <~int~>D d;
class C {
-fun A pure<~A~>(A i) { return i; }
-<<< 2 => pure >>>;
-<<< 2 => pure >>>;
-<<< 3 => pure >>>;
-<<< 4 => pure >>>;
-<<< 2.2 => pure >>>;
+ fun A pure<~A~>(A i) {
+ return i;
+ }
+ <<< 2 => pure >>>;
+ <<< 2 => pure >>>;
+ <<< 3 => pure >>>;
+ <<< 4 => pure >>>;
+ <<< 2.2 => pure >>>;
}
-C c;
+
+var C c;
fun void test<~A~>(int i, A a) {
- A b;
+ var A b;
<<< __func__, " ", a >>>;
<<< i, " ", a >>>;
if(i)
fun void test<~A~>(int i) {
- A a;
+ var A a;
<<< a >>>;
<<< __func__, " ", i, " ", a >>>;
if(i)
-#!me.exit();
- test<~float~>((i-2));
+ test<~float~>((i-2));
}
test<~float~>(2);
fun void test<~A~>(int i) {
- A a;
+ var A a;
<<< a >>>;
-#! <<< __func__, " ", i, " ", a >>>;
if(i)
-#!me.exit();
test<~float~>((i-2));
}
test<~Object~>(2);
fun void test<~A~>(A i) {
- A a;
+ var A a;
<<< a , " ", __func__>>>;
<<< i, " ", a >>>;
if(i > 0)
-#!me.exit();
test(i-2.0);
}
test<~int~>(2);
fun void test<~A~>(A i) {
- A a;
+ var A a;
<<< a >>>;
<<< i, " ", a, " ", i > 1 >>>;
if(i > 1) {
-#! 2 -=> i;
-#! i => A a;
-#! test(a);
.1 -=> i;
test(i);
-#! test(i);
}
}
test(2.0);
fun void test<~A~>(int i) {
<<< __func__ >>>;
-
<<< 1 >>>;
}
+
test<~int~>(1);
-new Object @=> Object nonnull o;
+new Object @=> nonnull Object o;
fun void _t() { <<< __func__ >>>; }
fun int t() {
-#!<<< 1 >>>;
spork _t();
spork \a{ <<< __func__, " ", a >>>; }(1);
fun void _t() { <<< __func__ >>>; }
class C {
-<<< this >>>;
-fun void __t() { <<< __func__ >>>; }
-fun void __t(int i) { <<< this, " ", __func__, " ", i >>>; }
-fun void t() {
+ <<< 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();
+ me.yield();
spork \{ <<< " " , __func__ >>>; }();
spork \a{ <<< __func__, " ", a >>>; }(1);
t();
me.yield();
}
-<<< C c >>>;
+<<< var C c >>>;
me.yield();
class C {
-typedef void t_fptr(int i);
-fun void test(int i) { <<< this , " ", __func__, " ", i >>>;}
-test @=> t_fptr ptr;
+ typedef void t_fptr(int i);
+ fun void test(int i) { <<< this , " ", __func__, " ", i >>>;}
+ test @=> var t_fptr ptr;
}
typedef void t_fptr(int i);
fun void test(int i) { <<< __func__, " ", i >>>;}
-test @=> t_fptr ptr;
+test @=> var t_fptr ptr;
<<< ptr >>>;
spork ptr(2);
me.yield();
-<<<C c>>>;
+<<<var C c>>>;
<<< c.ptr >>>;
spork c.ptr(3);
me.yield();
typedef void t_fptr(int i, int);
fun void test(int i, int j) { <<< this ,
" ", __func__, " ", i, " " , j >>>;}
- test @=> t_fptr ptr;
-<<< this, ptr >>>;
-#! ptr(2);
+ test @=> var t_fptr ptr;
+ <<< this, ptr >>>;
spork ptr(1,2);
-#! me.yield();
second => now;
}
-<<<C c>>>;
+<<<var C c>>>;
fun void test() {
-#! <<< 1 >>>;
-#!spork \{<<< 2 >>>;}();
}
-test();
-test();
+test();
+test();
<<< "end" >>>;
me.yield();
fun void test(int i) {
- <<< "test ", i >>>;
+ <<< "test ", i >>>;
if(i > 1)
test(i-1);
}
}
spork launch(2);
-#!second => now;
me.yield();
-#!.1::samp => now;
launch(12);
fun void launch(int i) {
<<< " launch ", i >>>;
}
-#!spork launch(2);
me.yield();
-class C { fun static C t() { C c; <<< c, " something" >>>;
-return c; } }
-#!C c;
+class C {
+ fun static C t() {
+ var C c;
+ <<< c, " something" >>>;
+ return c;
+ }
+}
+
<<< C.t() >>>;
-#!C.t<~float~>();
-#!C.t<~Object~>();
class D extends C {
}
-#!<<< "here" >>>;
-D d;
+var D d;
<<< d >>>;
-#!<<< d.t() >>>;
<<< d.t<~int~>() >>>;
-#!d.t<~Object~>();
class <~A~>Parent {
class <~B~>C {
- 12 => A a;
- 13 => B B;
+ 12 => var A a;
+ 13 => var B B;
}
}
-<~int, int~>Parent->C c;
+var <~int, int~>Parent.C c;
<<< c.a >>>;
}
-<<< E e >>>;
+<<< var E e >>>;
e.test(123,3);
class C {
typedef static void func_t<~A~>(A a);
fun static void myfunc<~A~>(A a) { <<< a >>>; }
- myfunc @=> static func_t ptr;
+ myfunc @=> static var func_t ptr;
ptr(1);
}
-C c;
+var C c;
class <~A~>C {
typedef static void func_t<~A~>(A a);
fun static void myfunc<~A~>(A a) { <<< a >>>; }
- myfunc @=> static func_t ptr;
+ myfunc @=> static var func_t ptr;
ptr(1);
}
-<~int~>C c;
+var <~int~>C c;
class C {
typedef void t_ptr();
- t_ptr iptr;
+ var t_ptr iptr;
fun void test() {
<<< this, " ", __func__ >>>;
<<< iptr() >>>;
<<< iptr() >>>;
}
-<<<C c>>>;
- <<< c.iptr >>>;
- <<< c.iptr() >>>;
- <<< c.iptr() >>>;
+
+<<<var C c>>>;
+<<< c.iptr >>>;
+<<< c.iptr() >>>;
+<<< c.iptr() >>>;
class C {
typedef void t_ptr(...);
- t_ptr iptr;
+ var t_ptr iptr;
fun void test(...) {
<<< this, " ", __func__ >>>;
<<< iptr() >>>;
<<< iptr() >>>;
}
-<<<C c>>>;
- <<< c.iptr >>>;
- <<< c.iptr(1) >>>;
- <<< c.iptr(1,2) >>>;
+
+<<<var C c>>>;
+<<< c.iptr >>>;
+<<< c.iptr(1) >>>;
+<<< c.iptr(1,2) >>>;
class C {
typedef void t_ptr<~A~>();
- <~int~>t_ptr iptr;
+ var <~int~>t_ptr iptr;
fun void test<~A~>() {
<<< this, " ", __func__ >>>;
<<< iptr() >>>;
<<< iptr() >>>;
}
-<<<C c>>>;
- <<< c.iptr >>>;
- <<< c.iptr() >>>;
- <<< c.iptr() >>>;
+
+<<<var C c>>>;
+<<< c.iptr >>>;
+<<< c.iptr() >>>;
+<<< c.iptr() >>>;
class C {
typedef static void t_ptr<~A~>();
- <~int~>t_ptr iptr;
+ var <~int~>t_ptr iptr;
fun static void test<~A~>() {
<<< __func__ >>>;
}
test @=> iptr;
-#! test<~int~>();
<<< iptr() >>>;
- <<< iptr() >>>;
+ <<< iptr() >>>;
}
-<<<C c>>>;
-#! <<< c.iptr >>>;
-#! <<< c.iptr() >>>;
-#! <<< c.iptr() >>>;
+
+<<<var C c>>>;
typedef void t_ptr<~A~>();
-t_ptr ptr;
+var t_ptr ptr;
fun void test<~A~>() {
<<< __func_ >>>;
test @=> ptr;
ptr<~int~>();
-
-
-#!typedef <~int~>t_ptr B;
-#!B B;
-#!<<<b>>>;
-#!<<< B<~int~>() >>>;
typedef void ptr_t<~A~>(myPtr ptr);
-<~ <~A~> Ptr~>ptr_t t;
+var <~ <~A~> Ptr~>ptr_t t;
typedef int[1] Array;
typedef Array[1] MyArray;
-MyArray a;
+var MyArray a;
<<< a >>>;
<<< a[0] >>>;
<<< a[0][0] >>>;
class C {}
class D extends C {}
-C c;
-D d;
+var C c;
+var D d;
<<< typeof(c) < typeof(d) >>>;
<<< typeof(c) > typeof(d) >>>;
<<< C < D >>>;
fun void test(...) {
<<< vararg >>>;
- <<< vararg.cpy() @=> Vararg ref new_arg >>>;
+ <<< vararg.cpy() @=> ref Vararg new_arg >>>;
}
test(1);
-Object ref o;
-o $ Event nonnull;
+ref Object o;
+o $ nonnull Event;
-Object ref o;
+ref Object o;
o $ Object;
-fun void test(Object nonnull o) { <<< o >>>; }
+fun void test(nonnull Object o) { <<< o >>>; }
-Object ref o => test;
+ref Object o => test;
-Object nonnull o @=> Object ref p;
+nonnull Object o @=> ref Object p;
-Object nonnull o, p;
+nonnull Object o, p;
o @=> p;
-new Object nonnull @=> Object nonnull o;
+new nonnull Object @=> nonnull Object o;
-(Object nonnull o) $ Object nonnull;
+(nonnull Object o) $ nonnull Object;
-Object nonnull o;
+nonnull Object o;
-new Object @=> Object nonnull ref o;
+new Object @=> nonnull ref Object o;
#! [contains] NullPtrException
-Object ref o;
-<<< o $ Object nonnull >>>;
+ref Object o;
+<<< o $ nonnull Object >>>;
#! [contains} NullPtrException
-fun void test(Object nonnull o) {
+fun void test(nonnull Object o) {
<<< o >>>;
}
-Object ref ref => test;
+ref Object o => test;
#! [contains] NullPtrException
-Object ref ref_object;
-<<< ref_object $ Object nonnull >>>;
+ref Object ref_object;
+<<< ref_object $ nonnull Object >>>;
-fun void test(Object nonnull o) { <<< o >>>; }
-Object nonnull o => test;
+fun void test(nonnull Object o) { <<< o >>>; }
+nonnull Object o => test;
-fun void test(Object nonnull o) { <<< o >>>; }
-Object nonnull o => test;
+fun void test(nonnull Object o) { <<< o >>>; }
+nonnull Object o => test;
-new Object @=> Object nonnull o;
+new Object @=> nonnull Object o;
-new Object $ Object nonnull;
+new Object $ nonnull Object;
-fun void test(Object nonnull o) { <<< o >>>; }
+fun void test(nonnull Object o) { <<< o >>>; }
new Object => test;
#! [contains] can't assign
-null @=> Object nonnull o;
+null @=> nonnull Object o;
#! [contains] can't cast
-null $ Object nonnull;
+null $ nonnull Object;
#! [contains] can't implicitly cast
-fun void test(Object nonnull o) { <<< o >>>; }
+fun void test(nonnull Object o) { <<< o >>>; }
null => test;
-new Object @=> Object nonnull o;
+new Object @=> nonnull Object o;
#! [contains] NullPtrException
-Object ref o @=> Object nonnull p;
+ref Object o @=> nonnull Object p;
#! [contains] NullPtrException
-(Object ref o) $ Object nonnull;
+(ref Object o) $ nonnull Object;
#! [contains] NullPtrException
-fun void test(Object nonnull o) { <<< o >>>; }
-Object ref o => test;
+fun void test(nonnull Object o) { <<< o >>>; }
+ref Object o => test;
#! [contains] NullPtrException
-Object ref a @=> Object nonnull o;
+ref Object a @=> nonnull Object o;
<<< o >>>;
#! [contains] can't implicitly cast
-fun void test(Object nonnull o) { <<< o >>>; }
+fun void test(nonnull Object o) { <<< o >>>; }
null => test;
#! [contains] void types can't be nonnull
-void nonnull i;
+nonnull void i;
}
test();
}
-C c;
+var C c;
class<~A~> E{}
class G extends ld
{A0I:}
- <~A~>d d;
+ var <~A~>d d;
}
-<~int~>D d;
+var <~int~>D d;
-<<< [1,2,3] @=> auto i >>>;
+<<< [1,2,3] @=> var auto i >>>;
<<< i[1:2] >>>;
<<< i[:2] >>>;
<<< i[2: -1] >>>;
-"test" @=> string s0;
-"_test" @=> string s1;
+"test" @=> var string s0;
+"_test" @=> var string s1;
<<< s0 == s0 >>>;
<<< s0 == s1 >>>;
-"test test" => string s;
+"test test" => var string s;
s.erase(-1, 0);
s.erase(0, -1);
class C {
1 => test;
fun int test(int i) {
- 13 => int j;
+ 13 => var int j;
return j;
}
}
-C c;
-12 => c.test => int ret;
+
+var C c;
+12 => c.test => var int ret;
<<< 1394 >>>;
<<<ret>>>;
struct S {
- 13 => int i;
+ 13 => var int i;
operator @gack void() { <<< "test", i >>>; }
<<< this >>>;
}
-S s;
+
+var S s;
<<< s >>>;
struct global GlobalStruct {
- int i;
- float f;
- string s;
+ var int i;
+ var float f;
+ var string s;
}
struct global GlobalStructWithCtor {
- int i;
- float f;
- string s;
+ var int i;
+ var float f;
+ var string s;
}
-global GlobalStruct global_s;
-GlobalStructWithCtor sctor;
+global var GlobalStruct global_s;
+var GlobalStructWithCtor sctor;
-GlobalStruct s;
+var GlobalStruct s;
class C {
struct S {
- string s;
- float a;
- 11 => int i;
- 13 => float f;
+ var string s;
+ var float a;
+ 11 => var int i;
+ 13 => var float f;
}
- S s;
+ var S s;
<<< "after ctor" >>>;
}
-C c;
+
+var C c;
<<< c.s.i >>>;
struct S {
- 4 => int i;
- 12 => int j;
+ 4 => var int i;
+ 12 => var int j;
fun int test() { <<< "test", i >>>; }
test();
}
-S s;
+
+var S s;
s.test();
struct S {
- float f;
+ var float f;
fun void test() { <<< __func__, f >>>; }
}
-S s;
+var S s;
12.3 => s.f;
s.test();
struct S {
- int i;
- float f;
+ var int i;
+ var float f;
}
fun S test() {
- S s;
+ var S s;
12 => s.i;
12 => s.f;
return s;
class C {
struct S {
- 12 => int i;
- "testing::" => string s;
- 13 => float f;
+ 12 => var int i;
+ "testing::" => var string s;
+ 13 => var float f;
<<< __func__ >>>;
}
- static S s;
+ static var S s;
}
-C c;
+
+var C c;
struct S {
- int i;
- int j;
- 12 => static int si;
+ var int i;
+ var int j;
+ 12 => static var int si;
fun static void test() { <<< __func__, si >>>; }
test();
}
-S s;
+
+var S s;
s.test();
struct <~A~> S{
- A a0;
- A a1;
+ var A a0;
+ var A a1;
}
-<~int~>S si;
-<~float~>S sf;
+var <~int~>S si;
+var <~float~>S sf;
<<< si.a0 >>>;
<<< sf.a0 >>>;
struct S {
- int i;
+ var int i;
}
-S s;
+
+var S s;
<<< s.i >>>;
<<< 12 => s.i >>>;
<<< s.i >>>;
-int i[][][];
+var int i[][][];
<<< i >>>;
fun void print_array(int a[]){
- for(int i; i < a.size(); i++)
+ for(var int i; i < a.size(); i++)
<<< a[i] >>>;
}
-int i[5][3];
+var int i[5][3];
1 => i[2][0];
<<< i.size() >>>;
class C
{
typedef void Test();
- Test test;
+ var Test test;
fun void func(){}
}
-C c;
+
+var C c;
c.func @=> c.test;
-int i;
+var int i;
<<< i >>>;
#!! document the AST
-int i[2][2];
+var int i[2][2];
foreach(ref a : i)
<<< a >>>;
<<< i >>>;
-<<< new float[3] @=> auto i >>>;
-<<< i >>>;
\ No newline at end of file
+<<< new float[3] @=> var auto i >>>;
+<<< i >>>;
}
-C i[2];
+var C i[2];
foreach(ref a : i)
<<< a >>>;
-<~int~>Ptr ptr;
-int i[4];
+var <~int~>Ptr ptr;
+var int i[4];
foreach(ref a : i)
<<< *a >>>;
<<< ptr >>>;
-me @=> auto a;
+me @=> var auto a;
fun static float s_test(float f) {}
}
-C c;
+var C c;
c.test();
() => c.test;
-1 => int i;
+1 => var int i;
-float f;
+var float f;
if(f)
<<< "not ok" >>>;
else
typedef void test_t<~A~>();
-test_t nonnull t;
+nonnull test_t t;
t<~int~>();
typedef int[2] test;
-test var;
+var test vv;
<<< int >>>;
<<< test >>>;
-<<< var >>>;
-<<< var $ int[] >>>;
+<<< v >>>;
+<<< v $ int[] >>>;
class F extends E {}
class G extends C {}
-C c;
-D d;
-E e;
-F f;
-G g;
+var C c;
+var D d;
+var E e;
+var F f;
+var G g;
#!<<< f $ D >>>;
<<< [ f, g ] >>>;
<<< maybe ? f : D >>>;
#! [contains] a
-'a' => char c;
+'a' => var char c;
<<< c >>>;
-int array[][][];
-typeof(array) other_array;
+var int array[][][];
+var typeof(array) other_array;
<<< other_array >>>;
class C {
- 1 => int i;
+ 1 => var int i;
}
class C {
<<< 1 $ float >>>;
}
-C c;
+
+var C c;
class C {
- int i;
+ var int i;
do { <<< i++ >>>; }
while(i < 6);
}
class C {
- int i;
+ var int i;
do { <<< i++ >>>; }
while(i < 6);
}
class C {
- int i[];
- int j[2];
-#! Machine.shreds() @=> i;
-#! null @=> i;
+ var int i[];
+ var int j[2];
}
-C c;
+var C c;
<<< c.j[1] >>>;
samp;
minute;
5::samp;
- float f;
+ var float f;
2.4 => f;
f ::samp => now;
}
class C {
- for(int i; i < 3; i++)
+ for(var int i; i < 3; i++)
<<< i >>>;
}
class C {
goto here;
here:
- ;
-
+ ;
}
class C {
- int i, j;
+ var int i, j;
}
class C {
- Object ref i, a;
+ ref Object i, a;
}
class C {
- 12 => int _i;
+ 12 => var int _i;
union {
int i;
float f;
<<< U.i >>>;
}
-C c;
+var C c;
<<< c >>>;
<<< c.U >>>;
}
}
-<~int~>C->D d;
+var <~int~>C.D d;
class C {
- int i;
+ var int i;
repeat(3) {
i++;
<<< i >>>;
class C {
- int i;
+ var int i;
}
class C {
- Object ref o;
+ ref Object o;
}
class<~A,B~> C {
- A a;
- B b;
+ var A a;
+ var B b;
fun A test() {
<<< "lol" >>>;
}
}
}
-#!<<< C >>>;
-<~int, int~>C c;
-<~float, int~>C d;
-<~Object, int~>C g;
-#!C c;
+var <~int, int~>C c;
+var <~float, int~>C d;
+var <~Object, int~>C g;
<<< c.a >>>;
<<< d.a >>>;
<<< c.test() >>>;
class C {
- int i;
+ var int i;
i++;
}
class C {
- int i;
- now + 1.0::samp => time t;
+ var int i;
+ now + 1.0::samp => var time t;
until(now >= t) {
i++;
if(i == 3)
class C {
- int i;
- now + 3::samp => time t;
+ var int i;
+ now + 3::samp => var time t;
while(now < t) {
i++;
samp => now;
-<<<int #! this a partial comment !# i>>>;
+<<< var int #! this a partial comment !# i>>>;
class <~A~>C {
\a{};
[ 1 ];
- int i,j;
- typeof(i) k;
+ var int i,j;
+ var typeof(i) k;
'a';
true $ int;
i++;
union <~A~>U{ int ui; };
typeof(i);
if(i) i; else i;
- for(int; i < 1; ++i);
- int array[2];
+ for(var int _i; _i < 1; ++_i);
+ var int array[2];
array[0];
foreach(a : array);
repeat(1);
match i,2 {
case 12 when 0:;
case _,2 when 0:;
- } where int b;
+ } where var int b;
enum { zero };
typedef int Int;
goto end;
end:
while(0){ <<< __func__ >>>; }
}
-<~int~>C c;
+
+var <~int~>C c;
-<<< typeof( new int[2] ) i >>>;
-<<< i >>>;
\ No newline at end of file
+<<< var typeof( new int[2] ) i >>>;
+<<< i >>>;
class C {
- int iiii;
+ var int iiii;
<<< this.iii >>>;
}
-int i[];
+var int i[];
Machine.shreds() @=> i;
-#!null @=> i;
samp;
minute;
5::samp;
-float f;
+var float f;
2.4 => f;
f ::samp => now;
-second => dur d;
+second => var dur d;
2.3::d;
typedef Object[2] Class;
class C extends Class {}
-C c;
+var C c;
<<< c >>>;
class <~A~> C {
- A a;
+ var A a;
}
class D extends <~int~>C {}
-D d;
+
+var D d;
<<<d.a>>>;
<<< "test" >>>;
<<< 2.3 $ int >>>;
-1 => float f;
+1 => var float f;
fun void test(float _f){}
1 => test;
class C {
class D {
- int i;
+ var int i;
}
}
class E extends C {
- C->D d;
+ var C.D d;
}
class F {
- E->D d;
+ var E.D d;
}
}
class E extends C {
- D d;
+ var D d;
}
-E e;
+
+var E e;
<<< e.d >>>;
-(2.0 ? "yeah" : "not yeah") => string s;
+(2.0 ? "yeah" : "not yeah") => var string s;
<<< s >>>;
-for(int i; i < 4; i++)
+for(var int i; i < 4; i++)
{
if(i == 2)
continue;
<<< i >>>;
}
-for(int i; i < 3;)
+for(var int i; i < 3;)
<<< i++ >>>;
-float f;
+var float f;
for(1 => f; f; 1 -=>f);
-for(int i; i< 3; i++) {
+for(var int i; i< 3; i++) {
if(maybe)
break;
else continue;
class C {
- int i;
+ var int i;
}
-C c;
+var C c;
c $ C;
typedef void test(int);
-(test t)(2);
+(var test t)(2);
class C {
fun void test(int i) { <<< "int arg" >>>; }
typedef void ptr_t(int i);
- test @=>
- ptr_t p;
+ test @=> var ptr_t p;
p(1);
test @=> p;
p(1);
}
-C c;
+
+var C c;
<<< c >>>;
class C {
-typedef global void global_fptr(int i);
+ typedef global void global_fptr(int i);
}
}
class D {
typedef void t_ptr();
- C->t_ptr ptr;
+ var C.t_ptr ptr;
}
}
}
-Sine s => dac;
+var Sine s => dac;
220 => s.freq;
second => now;
-Object o;
+var Object o;
<<< o >>>;
me.exit();
class <~A, B~> C{}
class <~A~> D {}
-<~ <~int~>D, <~int~>D ~>C c;
+var <~ <~int~>D, <~int~>D ~>C c;
<<< c >>>;
-<<< int i >>>;
+<<< var int i >>>;
fun global void this_global_func_will_fail_to_compile() {
<<< i >>>;
}
-<<< global int g_i >>>;
+<<< global var int g_i >>>;
-Object o;
+var Object o;
if(o)<<< "ok" >>>;
class C {
- Event e;
+ var Event e;
spork {second => now; e.broadcast(); };
spork \{second => now; e.broadcast(); }();
#!2::second => now;
e => now;
}
-C c;
+var C c;
-<~int, int~>Map pp;
+var <~int, int~>Map pp;
<<< pp >>>;
<<< pp.size() >>>;
<<< pp.set(1, 2) >>>;
operator => void(C c, int i){<<< c, " ", i >>>;}
#! this => this;
#!fun void test_op(C c){ this => c; }
- this => int i;
+ this => var int i;
}
-C c;
+
+var C c;
#!c.test_op(c);
-int i, j;
+var int i, j;
<<< i, " ", j >>>;
-Object ref i, a;
+ref Object i, a;
<<< i, a >>>;
-15 => int i;
+15 => var int i;
union {
int i;
float f;
} U;
-7.3 => float f;
+7.3 => var float f;
<<< U >>>;
<<< U.i >>>;
<<< U.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;
+
+var C c;
<<< c >>>;
-class C { union static { int i; } u;<<< this, " ", u, " ", this.u.i >>>; }
-C c;
+class C {
+ union static {
+ int i;
+ } u;
+ <<< this, " ", u, " ", this.u.i >>>;
+}
+
+var C c;
<<< c >>>;
<<< C.u >>>;
<<< C.u.i >>>;
new Object;
-new Object @=> Object refref;
+new Object @=> var Object refref;
new Event;
-Event ev;
-ev @=> Event ref e;
+var Event ev;
+ev @=> ref Event e;
new Event @=> e;
ev @=> e;
null @=> e;
}
-global C c;
+global var C c;
-Object o;
+var Object o;
<<< !o >>>;
-fun Object test(){ Object o; <<< o >>>; return new Object; }
+fun Object test(){ var Object o; <<< o >>>; return new Object; }
test();
-<~float, int~>Pair p;
+var <~float, int~>Pair p;
<<< p >>>;
1 => p.key;
2 => p.val;
class C {
fun void test() {}
}
+
class D extends C {
fun void test() {}
}
-int i;
+var int i;
<<< i++ >>>;
<<< i >>>;
<<< i-- >>>;
-class C { private int i; <<< i >>>; }
-C c;
+class C {
+ private var int i;
+ <<< i >>>;
+}
+
+var C c;
<<< c >>>;
test();
}
-C c;
+var C c;
<<< c >>>;
class C {
- protect int i;
+ protect var int i;
<<< ++i >>>;
}
-C c;
+
+var C c;
<<< c.i >>>;
#!<<< ++c.i >>>;
#!1 => c.i;
typedef void Test();
fun void t(){<<< "lol" >>>;}
-t @=> Test test;
+t @=> var Test test;
test();
typedef void Test();
fun void t0(){}
-t0 @=> Test test;
+t0 @=> var Test test;
test();
fun void test() {
test(2);
}
+
fun void test(int i) {
<<< i >>>;
}
+
test();
test();
-int i;
+var int i;
repeat(3) {
i++;
<<< i >>>;
#! define a simple variable: 'i'.
-int i;
+var int i;
#! define a funs that returns 1 if 'i' is non zero, and 0 othervise.
fun int test() { return i ? 1 : 0; }
<<< test() >>>;
typedef int[2]Type;
-Type nonnull type;
+nonnull Type type;
<<<type>>>;
foreach(ref a : type);
#! catch free gc
-Event e;
+var Event e;
spork { e => now; };
spork { samp => now; 4::samp => now;};
-spork { 5::samp => now;} @=> Shred ref s;
-spork { samp => now; 4::samp => now; } @=> Shred ref t;
+spork { 5::samp => now;} @=> ref Shred s;
+spork { samp => now; 4::samp => now; } @=> ref Shred t;
spork { 2::samp => now; me.exit(); };
spork { new Object; <<< "garbage collect me" >>>; 3::samp => now; };
2::samp => now;
-12 => int i;
+12 => var int i;
<<< i >>>;
-int i;
+var int i;
<<< i >>>;
-Object ref o;
+ref Object o;
<<< o >>>;
fun void test() {
- spork { <<< 2 >>>; };
+ spork { <<< 2 >>>; };
}
-#!spork { <<< 1 >>>; };
-#!spork test();
-test();
+
+test();
second => now;
<<< "test2" >>>;
};
}
-#! spork test(2);
-#! spork { <<< "test", this >>>; };
}
-C c;
+
+var C c;
<<< c >>>;
-#!spork
c.test(1);
c.test(2);
samp => now;
class C {
- static int i;
- typedef static void Test(){};
- static Test test;
+ static var int i;
+ typedef static void Test();
+ static var Test test;
}
-C c;
+var C c;
c.i;
C.i;
c.test;
class<~A~> C {
- A a;
+ var A a;
}
class D {
- static <~int~>C c;
+ static var <~int~>C c;
}
-D d;
+var D d;
<<< d >>>;
<<< D.c.a >>>;
<<< "test" == "test" >>>;
-string s;
+var string s;
<<< s == s >>>;
<<< "test" == s >>>;
class <~A~>C {}
-<~int, float~>C c;
+
+var <~int, float~>C c;
class<~A~> C {}
-<~int~>C c;
+var <~int~>C c;
<<< c >>>;
typedef int ptr_t<~A~>(A);
-ptr_t ptr;
+var ptr_t ptr;
<<<ptr>>>;
fun int test<~A~>(A a) { <<< a >>>; }
test @=> ptr;
<<< ptr >>>;
-#!3;
-#!3 => test;
ptr<~int~>(2);
ptr<~float~>(2.3);
class <~A~>C {
fun void test() {
- <~A~>C c;
+ var <~A~>C c;
}
}
-<~int~>C c;
+var <~int~>C c;
-<~int, int~>Pair p;
+var <~int, int~>Pair p;
typedef <~int, int~>Pair lol;
-lol t;
+var lol t;
<<< t >>>;
<<< t.key >>>;
-class C extends lol { int i;}
-C c;
+class C extends lol { var int i;}
+var C c;
<<< c.i >>>;
class<~A~> D {
<<< "lol" >>>;
- int i;
+ var int i;
}
typedef <~int~>D Lol;
class E extends Lol {
- float f;
+ var float f;
}
-E d;
+var E d;
<<< d >>>;
<<< d.i >>>;
<<< d.f >>>;
}
}
-C c;
+var C c;
c.test();
}
}
-C c;
+var C c;
c.test();
typedef int[2] Type;
-Type type;
+var Type type;
foreach(a : type);
typedef void t_ptr(int i);
typedef t_ptr A;
-A a;
+var A a;
<<<a>>>;
fun void test(int i) { <<< __func__ , " ", i>>>; }
class C {
typedef void t_ptr();
typedef t_ptr A;
-A a;
+var A a;
<<<a>>>;
fun void test() { <<< __func__ >>>; }
a();
}
-C c;
+var C c;
typedef void t_ptr<~A~>();
-<~int~>t_ptr iptr;
-<~float~>t_ptr fptr;
+var <~int~>t_ptr iptr;
+var <~float~>t_ptr fptr;
fun void test<~A~>() {
<<< __func__ >>>;
}
typedef <~int~>t_ptr B;
-B b;
+var B b;
<<< b >>>;
test @=> b;
<<< b >>>;
typedef <~float~>t_ptr C;
-C c;
+var C c;
<<< c >>>;
test @=> c;
<<< c >>>;
class C {
typedef void t_ptr<~A~>();
- <~int~>t_ptr iptr;
+ var <~int~>t_ptr iptr;
fun void test<~A~>() {
<<< this, " ", __func__ >>>;
<<< iptr() >>>;
#! <<< iptr() >>>;
}
-<<<C c>>>;
+<<<var C c>>>;
<<< c.iptr() >>>;
#! <<< c.iptr() >>>;
#! just to check uncalled fun to not push the stack
class C { fun void test(){} fun static void stest() {}}
-C c;
-Event e;
+var C c;
+var Event e;
c.test;
C.stest;
-
-typeof(typeof(1)) i;
+var typeof(typeof(1)) i;
A a;
};
-<~float~>U u;
+var <~float~>U u;
<<< u.a >>>;
-int i;
-now + 1.0::samp => time t;
+var int i;
+now + 1.0::samp => var time t;
until(now >= t) {
i++;
if(i == 3)
me.exit();
samp => now;
}
-float f;
+var float f;
until(f) {
1 +=> f;
}
-class C { int i; }
+class C {
+ var int i;
+}
+
++ operator int (C c) {
<<< "test" >>>;
<<< c >>>;
<<< ++c.i >>>;
}
-C c;
+
+var C c;
<<< c >>>;
++c;
fun void test(...) {
- Object o;
+ var Object o;
vararg.start;
vararg $ Object @=> o;
vararg.end;
-int i;
-now + 3::samp => time t;
+var int i;
+now + 3::samp => var time t;
while(now < t) {
i++;
samp => now;