Browse Source

print removed from core, test prints moved into library function

Kajetan Johannes Hammerle 3 years ago
parent
commit
dc16c5bf9d
80 changed files with 452 additions and 523 deletions
  1. 0 15
      Compiler.c
  2. 35 17
      Test.c
  3. 10 10
      tests/arrays/alloc
  4. 2 2
      tests/arrays/and
  5. 4 4
      tests/arrays/dec
  6. 4 4
      tests/arrays/inc
  7. 1 1
      tests/arrays/multi
  8. 2 2
      tests/arrays/or
  9. 5 5
      tests/arrays/setop
  10. 2 2
      tests/arrays/shift
  11. 8 8
      tests/arrays/types
  12. 2 2
      tests/arrays/xor
  13. 4 4
      tests/bits/and
  14. 4 4
      tests/bits/invert
  15. 4 4
      tests/bits/or
  16. 4 4
      tests/bits/shift
  17. 4 4
      tests/bits/xor
  18. 9 9
      tests/calc/add
  19. 13 13
      tests/calc/div
  20. 6 6
      tests/calc/mod
  21. 9 9
      tests/calc/mul
  22. 5 5
      tests/calc/sub
  23. 8 8
      tests/cast/cast_float_long
  24. 8 8
      tests/cast/cast_int_float
  25. 6 6
      tests/cast/cast_int_long
  26. 6 6
      tests/comments/line
  27. 6 6
      tests/comments/lines
  28. 14 14
      tests/comparison/equal
  29. 10 10
      tests/comparison/greater
  30. 10 10
      tests/comparison/greater_equal
  31. 10 10
      tests/comparison/less
  32. 10 10
      tests/comparison/less_equal
  33. 14 14
      tests/comparison/not_equal
  34. 12 12
      tests/functions/arguments
  35. 11 11
      tests/functions/forward
  36. 2 2
      tests/functions/function
  37. 4 4
      tests/functions/function2
  38. 5 5
      tests/functions/overloading
  39. 3 3
      tests/functions/recursion
  40. 2 2
      tests/functions/return
  41. 3 3
      tests/functions/return_value
  42. 8 8
      tests/functions/scope
  43. 8 8
      tests/if/and
  44. 7 7
      tests/if/else
  45. 15 15
      tests/if/elseif
  46. 5 5
      tests/if/if
  47. 6 6
      tests/if/invert
  48. 8 8
      tests/if/or
  49. 3 3
      tests/loops/break
  50. 5 5
      tests/loops/continue
  51. 3 3
      tests/loops/for
  52. 1 1
      tests/loops/while
  53. 4 4
      tests/loops/while_post_dec
  54. 4 4
      tests/loops/while_post_inc
  55. 4 4
      tests/loops/while_pre_dec
  56. 4 4
      tests/loops/while_pre_inc
  57. 4 4
      tests/mix
  58. 1 1
      tests/pre/include
  59. 2 2
      tests/pre/list_test
  60. 4 4
      tests/pre/pre
  61. 4 4
      tests/struct_ref/alloc
  62. 4 4
      tests/struct_ref/bool_reference
  63. 4 4
      tests/struct_ref/float_reference
  64. 4 4
      tests/struct_ref/int_reference
  65. 4 4
      tests/struct_ref/long_reference
  66. 5 5
      tests/struct_ref/nested
  67. 12 12
      tests/struct_ref/pass_struct
  68. 4 4
      tests/struct_ref/struct_access
  69. 2 2
      tests/system/time
  70. 2 2
      tests/types/bool
  71. 3 3
      tests/types/null
  72. 14 14
      tests/types/types
  73. 8 8
      tests/vars/set
  74. 5 5
      tests/vars/setop
  75. 0 2
      tokenizer/Token.c
  76. 0 1
      tokenizer/Token.h
  77. 0 3
      utils/ByteCodePrinter.c
  78. 0 2
      vm/Operation.h
  79. 0 55
      vm/Script.c
  80. 0 11
      vm/Script.h

+ 0 - 15
Compiler.c

@@ -755,20 +755,6 @@ static void cReturn() {
     hasReturn = 2;
 }
 
-static void cPrint() {
-    DataType dt = cUnpackedExpression();
-    if(dtIsPointer(dt)) {
-        cAddOperation(OP_PRINT_POINTER);
-        cConsumeToken(T_SEMICOLON);
-        return;
-    }
-    switch(dt.type) {
-        DT_OPERATION(PRINT);
-        default: cError("cannot print type %s", cGetName(dt));
-    }
-    cConsumeToken(T_SEMICOLON);
-}
-
 static void cIf() {
     cConsumeToken(T_OPEN_BRACKET);
     cExpectType(cUnpackedExpression(), dtBool(), "if");
@@ -954,7 +940,6 @@ static void cLine() {
     cAddLine(line);
     switch(t) {
         case T_OPEN_CURVED_BRACKET: cConsumeScope(); break;
-        case T_PRINT: cPrint(); break;
         case T_RETURN: cReturn(); break;
         case T_IF: cIf(); break;
         case T_WHILE: cWhile(); break;

+ 35 - 17
Test.c

@@ -9,6 +9,7 @@
 #include "Compiler.h"
 #include "tokenizer/Tokenizer.h"
 #include "utils/ByteCodePrinter.h"
+#include "utils/Functions.h"
 #include "vm/Script.h"
 
 static int doneTests = 0;
@@ -32,24 +33,32 @@ static void tsPrintToBuffer(const char* format, ...) {
     va_end(args);
 }
 
-static void tsIntPrinter(int i) {
-    tsPrintToBuffer("%d\n", i);
-}
-
-static void tsLongPrinter(long l) {
-    tsPrintToBuffer("%ld\n", l);
+static void tsIntPrinter(Script* sc) {
+    int i;
+    if(sPopInt(sc, &i)) {
+        tsPrintToBuffer("%d\n", i);
+    }
 }
 
-static void tsFloatPrinter(float f) {
-    tsPrintToBuffer("%.2f\n", f);
+static void tsLongPrinter(Script* sc) {
+    long l;
+    if(sPopLong(sc, &l)) {
+        tsPrintToBuffer("%ld\n", l);
+    }
 }
 
-static void tsBoolPrinter(bool b) {
-    tsPrintToBuffer(b ? "true\n" : "false\n");
+static void tsFloatPrinter(Script* sc) {
+    float f;
+    if(sPopFloat(sc, &f)) {
+        tsPrintToBuffer("%.2f\n", f);
+    }
 }
 
-static void tsPointerPrinter(Pointer* p) {
-    tsPrintToBuffer("(%d, %d)\n", p->array, p->offset);
+static void tsBoolPrinter(Script* sc) {
+    bool b;
+    if(sPopBool(sc, &b)) {
+        tsPrintToBuffer(b ? "true\n" : "false\n");
+    }
 }
 
 static void tsAppend(const char* s) {
@@ -154,12 +163,21 @@ static void tsScanDirectory() {
     }
 }
 
+static void tsAddPrinter(Structs* sts, DataType in, ScriptFunction sf) {
+    Function f;
+    gfInit(&f, "test", dtVoid(), sf);
+    fAddArgument(&f, in, sts);
+    gfsAdd(&f);
+}
+
 void tsStart(const char* path) {
-    sSetIntPrinter(tsIntPrinter);
-    sSetLongPrinter(tsLongPrinter);
-    sSetFloatPrinter(tsFloatPrinter);
-    sSetBoolPrinter(tsBoolPrinter);
-    sSetPointerPrinter(tsPointerPrinter);
+    Structs sts;
+    stsInit(&sts);
+    tsAddPrinter(&sts, dtInt(), tsIntPrinter);
+    tsAddPrinter(&sts, dtLong(), tsLongPrinter);
+    tsAddPrinter(&sts, dtFloat(), tsFloatPrinter);
+    tsAddPrinter(&sts, dtBool(), tsBoolPrinter);
+
     doneTests = 0;
     allTests = 0;
     tsAppend(path);

+ 10 - 10
tests/arrays/alloc

@@ -3,24 +3,24 @@ void main() {
     int* a = new int[4];
     int** b = &a;
     int* c = *b;
-    print a == c;
-    print &start != a;
+    test(a == c);
+    test(&start != a);
     
-    print length(a);
-    print length(b);
-    print length(c);
+    test(length(a));
+    test(length(b));
+    test(length(c));
     
     a[0] = 50;
     a[1] = 60;
     a[2] = 70;
     a[3] = 80;
     
-    print a[0];
-    print a[1];
-    print a[2];
-    print a[3]; 
+    test(a[0]);
+    test(a[1]);
+    test(a[2]);
+    test(a[3]); 
        
-    print *a;
+    test(*a);
     
     delete a;
 }

+ 2 - 2
tests/arrays/and

@@ -2,7 +2,7 @@ void main() {
     int* a = new int[1];
     a[0] = 7;
     a[0] &= 15;
-    print a[0];
+    test(a[0]);
     a[0] &= 9;
-    print a[0];
+    test(a[0]);
 }

+ 4 - 4
tests/arrays/dec

@@ -3,8 +3,8 @@ void main() {
     a[0] = 0;
     a[0]--;
     --a[0];
-    print a[0]--;
-    print a[0]--;
-    print --a[0];
-    print --a[0];
+    test(a[0]--);
+    test(a[0]--);
+    test(--a[0]);
+    test(--a[0]);
 }

+ 4 - 4
tests/arrays/inc

@@ -3,8 +3,8 @@ void main() {
     a[0] = 0;
     a[0]++;
     ++a[0];
-    print a[0]++;
-    print a[0]++;
-    print ++a[0];
-    print ++a[0];
+    test(a[0]++);
+    test(a[0]++);
+    test(++a[0]);
+    test(++a[0]);
 }

+ 1 - 1
tests/arrays/multi

@@ -20,7 +20,7 @@ void main() {
     int** array = multiArray(2, 3);
     for(int x = 0; x < length(array); x++) {
         for(int y = 0; y < length(array[x]); y++) {
-            print array[x][y];
+            test(array[x][y]);
         }   
     }
     deleteMultiArray(array);

+ 2 - 2
tests/arrays/or

@@ -2,7 +2,7 @@ void main() {
     int* a = new int[1];
     a[0] = 0;
     a[0] |= 2;
-    print a[0];
+    test(a[0]);
     a[0] |= 5;
-    print a[0];
+    test(a[0]);
 }

+ 5 - 5
tests/arrays/setop

@@ -5,29 +5,29 @@ void main() {
     a[0] += 5;
     a[0] += 10;
     a[0] += 20;
-    print a[0];
+    test(a[0]);
 
     a[0] = 5;
     a[0] -= 5;
     a[0] -= -10;
     a[0] -= 20;
-    print a[0];
+    test(a[0]);
 
     a[0] = 5;
     a[0] *= 2;
     a[0] *= 3;
     a[0] *= 4;
-    print a[0];
+    test(a[0]);
 
     a[0] = 100;
     a[0] /= 2;
     a[0] /= 3;
     a[0] /= 4;
-    print a[0];
+    test(a[0]);
 
     a[0] = 100;
     a[0] %= 120;
     a[0] %= 90;
     a[0] %= 3;
-    print a[0];
+    test(a[0]);
 }

+ 2 - 2
tests/arrays/shift

@@ -3,10 +3,10 @@ void main() {
     a[0] = 1;
     a[0] <<= 2;
     a[0] <<= 3;
-    print a[0];
+    test(a[0]);
 
     a[0] = 100;
     a[0] >>= 2;
     a[0] >>= 3;
-    print a[0];
+    test(a[0]);
 }

+ 8 - 8
tests/arrays/types

@@ -24,12 +24,12 @@ void main() {
     h[2]->a += 2;
     (*h[2]).a += 2;
     
-    print a[2];
-    print b[2];
-    print c[2];
-    print d[2].a;
-    print *e[2];
-    print *f[2];
-    print *g[2];
-    print (*h[2]).a;
+    test(a[2]);
+    test(b[2]);
+    test(c[2]);
+    test(d[2].a);
+    test(*e[2]);
+    test(*f[2]);
+    test(*g[2]);
+    test((*h[2]).a);
 }

+ 2 - 2
tests/arrays/xor

@@ -2,7 +2,7 @@ void main() {
     int* a = new int[1];
     a[0] = 0;
     a[0] ^= 2;
-    print a[0];
+    test(a[0]);
     a[0] ^= 7;
-    print a[0];
+    test(a[0]);
 }

+ 4 - 4
tests/bits/and

@@ -1,13 +1,13 @@
 void main() {
     int a = 7;
     a = a & 15;
-    print a;
+    test(a);
     a &= 9;
-    print a;
+    test(a);
     
     long b = 7L;
     b = b & 15L;
-    print b;
+    test(b);
     b &= 9L;
-    print b;
+    test(b);
 }

+ 4 - 4
tests/bits/invert

@@ -1,6 +1,6 @@
 void main() {
-    print ~0;
-    print ~~~(~7);
-    print ~0L;
-    print ~~~(~7L);
+    test(~0);
+    test(~~~(~7));
+    test(~0L);
+    test(~~~(~7L));
 }

+ 4 - 4
tests/bits/or

@@ -1,13 +1,13 @@
 void main() {
     int a = 0;
     a = a | 2;
-    print a;
+    test(a);
     a |= 5;
-    print a;
+    test(a);
     
     long b = 0L;
     b = b | 2L;
-    print b;
+    test(b);
     b |= 5L;
-    print b;
+    test(b);
 }

+ 4 - 4
tests/bits/shift

@@ -2,20 +2,20 @@ void main() {
     int a = 1;
     a = a << 2;
     a <<= 3;
-    print a;
+    test(a);
 
     a = 100;
     a = a >> 2;
     a >>= 3;
-    print a;
+    test(a);
     
     long b = 1L;
     b = b << 2L;
     b <<= 3L;
-    print b;
+    test(b);
 
     b = 100L;
     b = b >> 2L;
     b >>= 3L;
-    print b;
+    test(b);
 }

+ 4 - 4
tests/bits/xor

@@ -1,13 +1,13 @@
 void main() {
     int a = 0;
     a = a ^ 2;
-    print a;
+    test(a);
     a ^= 7;
-    print a;
+    test(a);
     
     long b = 0L;
     b = b ^ 2L;
-    print b;
+    test(b);
     b ^= 7L;
-    print b;
+    test(b);
 }

+ 9 - 9
tests/calc/add

@@ -1,11 +1,11 @@
 void main() {
-    print 1;
-    print 2 + 3;
-    print 3 + 4 + 5;
-    print 6 + 7 + 8 + 9;
-    print 3.5 + 5.5;
-    print 4.0 + 1.0;
-    print 1.0 + -2.0;
-    print 6 + -7 + 8 + -9;
-    print 2L + 3L;
+    test(1);
+    test(2 + 3);
+    test(3 + 4 + 5);
+    test(6 + 7 + 8 + 9);
+    test(3.5 + 5.5);
+    test(4.0 + 1.0);
+    test(1.0 + -2.0);
+    test(6 + -7 + 8 + -9);
+    test(2L + 3L);
 }

+ 13 - 13
tests/calc/div

@@ -1,15 +1,15 @@
 void main() {
-    print 1 / 2;
-    print 7 / 3;
-    print 7.0 / 3.0;
-    print 7.0 / 3.0;
-    print 7.0 / 3.0;
-    print 3 / 4 + 5;
-    print 6 + 7 / 8 + 9;
-    print 3.5 / 5.5;
-    print 4.0 / 1.0;
-    print 1.0 / 2.0;
-    print 20 * 2 / 3 / 5;
-    print 20.0 * 2.0 / 3.0 / 5.0;
-    print 7L / 3L;
+    test(1 / 2);
+    test(7 / 3);
+    test(7.0 / 3.0);
+    test(7.0 / 3.0);
+    test(7.0 / 3.0);
+    test(3 / 4 + 5);
+    test(6 + 7 / 8 + 9);
+    test(3.5 / 5.5);
+    test(4.0 / 1.0);
+    test(1.0 / 2.0);
+    test(20 * 2 / 3 / 5);
+    test(20.0 * 2.0 / 3.0 / 5.0);
+    test(7L / 3L);
 }

+ 6 - 6
tests/calc/mod

@@ -1,8 +1,8 @@
 void main() {
-    print 1 % 5;
-    print 3 % 5;
-    print 5 % 5;
-    print 7 % 5;
-    print 9 % 5;
-    print 9L % 5L;
+    test(1 % 5);
+    test(3 % 5);
+    test(5 % 5);
+    test(7 % 5);
+    test(9 % 5);
+    test(9L % 5L);
 }

+ 9 - 9
tests/calc/mul

@@ -1,11 +1,11 @@
 void main() {
-    print 2 * 3;
-    print 3 + 4 * 5;
-    print 6 + 7 * 8 + 9;
-    print (3 + 4) * 5;
-    print ((3 + 2) * (5 + 1));
-    print ((3.0 + 2.0) * (5.0 + 1.0));
-    print ((3.0 + 2.0) * (5.0 + 1.0));
-    print -3 * -5;
-    print -3L * -5L;
+    test(2 * 3);
+    test(3 + 4 * 5);
+    test(6 + 7 * 8 + 9);
+    test((3 + 4) * 5);
+    test(((3 + 2) * (5 + 1)));
+    test(((3.0 + 2.0) * (5.0 + 1.0)));
+    test(((3.0 + 2.0) * (5.0 + 1.0)));
+    test(-3 * -5);
+    test(-3L * -5L);
 }

+ 5 - 5
tests/calc/sub

@@ -1,7 +1,7 @@
 void main() {
-    print 0 - 5;
-    print 2 - 5 + 3 - 6;
-    print 2 - (5 + 3) - 6;
-    print -(7 - 8);
-    print -(7L - 8L);
+    test(0 - 5);
+    test(2 - 5 + 3 - 6);
+    test(2 - (5 + 3) - 6);
+    test(-(7 - 8));
+    test(-(7L - 8L));
 }

+ 8 - 8
tests/cast/cast_float_long

@@ -1,14 +1,14 @@
 void main() {
     long l = 3L;
-    print (float)l;
-    print (long)(float)l;
-    print (float)(long)(float)l;
+    test((float)l);
+    test((long)(float)l);
+    test((float)(long)(float)l);
     
     float f = 4.2;
-    print (long)f;
-    print (float)(long)f;
-    print (long)(float)(long)f;
+    test((long)f);
+    test((float)(long)f);
+    test((long)(float)(long)f);
     
-    print (float)6 / 5.0;
-    print 6L / (long)5.0;
+    test((float)6 / 5.0);
+    test(6L / (long)5.0);
 }

+ 8 - 8
tests/cast/cast_int_float

@@ -1,14 +1,14 @@
 void main() {
     int i = 3;
-    print (float)i;
-    print (int)(float)i;
-    print (float)(int)(float)i;
+    test((float)i);
+    test((int)(float)i);
+    test((float)(int)(float)i);
     
     float f = 4.2;
-    print (int)f;
-    print (float)(int)f;
-    print (int)(float)(int)f;
+    test((int)f);
+    test((float)(int)f);
+    test((int)(float)(int)f);
     
-    print (float)6 / 5.0;
-    print 6 / (int)5.0;
+    test((float)6 / 5.0);
+    test(6 / (int)5.0);
 }

+ 6 - 6
tests/cast/cast_int_long

@@ -1,11 +1,11 @@
 void main() {
     long l = 3L;
-    print (int)l;
-    print (long)(int)l;
-    print (int)(long)(int)l;
+    test((int)l);
+    test((long)(int)l);
+    test((int)(long)(int)l);
     
     int i = 4;
-    print (long)i;
-    print (int)(long)i;
-    print (long)(int)(long)i;
+    test((long)i);
+    test((int)(long)i);
+    test((long)(int)(long)i);
 }

+ 6 - 6
tests/comments/line

@@ -1,8 +1,8 @@
 void main() {
-    print 1;
-    print 2; //print 3;
-    //print 4; print 5;
-    print 6; //print 7;
-    print 8;
-    //print 9;
+    test(1);
+    test(2); //test(3);
+    //test(4); test(5);
+    test(6); //test(7);
+    test(8);
+    //test(9);
 }

+ 6 - 6
tests/comments/lines

@@ -1,8 +1,8 @@
 void main() {
-    print 1;
-    print 2; /*print 3;
-    print 4; print 5;*/
-    print 6; /*print 7;****/
-    print 8;
-    /*print 9;*/
+    test(1);
+    test(2); /*test(3);
+    test(4); test(5);*/
+    test(6); /*test(7);****/
+    test(8);
+    /*test(9);*/
 }

+ 14 - 14
tests/comparison/equal

@@ -1,16 +1,16 @@
 void main() {
-    print 0 == 5;
-    print 4 == 5;
-    print 5 == 5;
-    print 6 == 5;
-    print 10 == 5;
-    print 0.0 == 5.0;
-    print 4.0 == 5.0;
-    print 5.0 == 5.0;
-    print 6.0 == 5.0;
-    print 10.0 == 5.0;
-    print false == false;
-    print true == false;
-    print false == true;
-    print true == true;
+    test(0 == 5);
+    test(4 == 5);
+    test(5 == 5);
+    test(6 == 5);
+    test(10 == 5);
+    test(0.0 == 5.0);
+    test(4.0 == 5.0);
+    test(5.0 == 5.0);
+    test(6.0 == 5.0);
+    test(10.0 == 5.0);
+    test(false == false);
+    test(true == false);
+    test(false == true);
+    test(true == true);
 }

+ 10 - 10
tests/comparison/greater

@@ -1,12 +1,12 @@
 void main() {
-    print 0 > 5;
-    print 4 > 5;
-    print 5 > 5;
-    print 6 > 5;
-    print 10 > 5;
-    print 0.0 > 5.0;
-    print 4.0 > 5.0;
-    print 5.0 > 5.0;
-    print 6.0 > 5.0;
-    print 10.0 > 5.0;
+    test(0 > 5);
+    test(4 > 5);
+    test(5 > 5);
+    test(6 > 5);
+    test(10 > 5);
+    test(0.0 > 5.0);
+    test(4.0 > 5.0);
+    test(5.0 > 5.0);
+    test(6.0 > 5.0);
+    test(10.0 > 5.0);
 }

+ 10 - 10
tests/comparison/greater_equal

@@ -1,12 +1,12 @@
 void main() {
-    print 0 >= 5;
-    print 4 >= 5;
-    print 5 >= 5;
-    print 6 >= 5;
-    print 10 >= 5;
-    print 0.0 >= 5.0;
-    print 4.0 >= 5.0;
-    print 5.0 >= 5.0;
-    print 6.0 >= 5.0;
-    print 10.0 >= 5.0;
+    test(0 >= 5);
+    test(4 >= 5);
+    test(5 >= 5);
+    test(6 >= 5);
+    test(10 >= 5);
+    test(0.0 >= 5.0);
+    test(4.0 >= 5.0);
+    test(5.0 >= 5.0);
+    test(6.0 >= 5.0);
+    test(10.0 >= 5.0);
 }

+ 10 - 10
tests/comparison/less

@@ -1,12 +1,12 @@
 void main() {
-    print 0 < 5;
-    print 4 < 5;
-    print 5 < 5;
-    print 6 < 5;
-    print 10 < 5;
-    print 0.0 < 5.0;
-    print 4.0 < 5.0;
-    print 5.0 < 5.0;
-    print 6.0 < 5.0;
-    print 10.0 < 5.0;
+    test(0 < 5);
+    test(4 < 5);
+    test(5 < 5);
+    test(6 < 5);
+    test(10 < 5);
+    test(0.0 < 5.0);
+    test(4.0 < 5.0);
+    test(5.0 < 5.0);
+    test(6.0 < 5.0);
+    test(10.0 < 5.0);
 }

+ 10 - 10
tests/comparison/less_equal

@@ -1,12 +1,12 @@
 void main() {
-    print 0 <= 5;
-    print 4 <= 5;
-    print 5 <= 5;
-    print 6 <= 5;
-    print 10 <= 5;
-    print 0.0 <= 5.0;
-    print 4.0 <= 5.0;
-    print 5.0 <= 5.0;
-    print 6.0 <= 5.0;
-    print 10.0 <= 5.0;
+    test(0 <= 5);
+    test(4 <= 5);
+    test(5 <= 5);
+    test(6 <= 5);
+    test(10 <= 5);
+    test(0.0 <= 5.0);
+    test(4.0 <= 5.0);
+    test(5.0 <= 5.0);
+    test(6.0 <= 5.0);
+    test(10.0 <= 5.0);
 }

+ 14 - 14
tests/comparison/not_equal

@@ -1,16 +1,16 @@
 void main() {
-    print 0 != 5;
-    print 4 != 5;
-    print 5 != 5;
-    print 6 != 5;
-    print 10 != 5;
-    print 0.0 != 5.0;
-    print 4.0 != 5.0;
-    print 5.0 != 5.0;
-    print 6.0 != 5.0;
-    print 10.0 != 5.0;
-    print false != false;
-    print true != false;
-    print false != true;
-    print true != true;
+    test(0 != 5);
+    test(4 != 5);
+    test(5 != 5);
+    test(6 != 5);
+    test(10 != 5);
+    test(0.0 != 5.0);
+    test(4.0 != 5.0);
+    test(5.0 != 5.0);
+    test(6.0 != 5.0);
+    test(10.0 != 5.0);
+    test(false != false);
+    test(true != false);
+    test(false != true);
+    test(true != true);
 }

+ 12 - 12
tests/functions/arguments

@@ -1,20 +1,20 @@
 void wusi(int c, int d) {
-    print c;
-    print d;
+    test(c);
+    test(d);
 }
 
 void test(int a, int b) {
-    print a;
-    print b;
+    test(a);
+    test(b);
     wusi(a, b);
 }
 
-void test(float f) {
-    print f;
+void test2(float f) {
+    test(f);
 }
 
-void test(bool b) {
-    print b;
+void test2(bool b) {
+    test(b);
 }
 
 void main() {
@@ -23,8 +23,8 @@ void main() {
 
     test(a, b);
 
-    print a;
-    print b;
-    test(5.5);
-    test(true);
+    test(a);
+    test(b);
+    test2(5.5);
+    test2(true);
 }

+ 11 - 11
tests/functions/forward

@@ -1,19 +1,19 @@
-void test();
-void test(int a);
+void wusi();
+void wusi(int a);
 
 void main() {
-    test();
-    test(1);
-    test();
+    wusi();
+    wusi(1);
+    wusi();
 }
 
-void test() {
-    print 4;
-    print 5;
+void wusi() {
+    test(4);
+    test(5);
 }
 
-void test(int a) {
-    print a;
-    print 6;
+void wusi(int a) {
+    test(a);
+    test(6);
 }
 

+ 2 - 2
tests/functions/function

@@ -1,6 +1,6 @@
 void test() {
-    print 4;
-    print 5;
+    test(4);
+    test(5);
 }
 
 void main() {

+ 4 - 4
tests/functions/function2

@@ -1,11 +1,11 @@
 void wusi() {
-    print 6;
-    print 7;
+    test(6);
+    test(7);
 }
 
 void test() {
-    print 4;
-    print 5;
+    test(4);
+    test(5);
     wusi();
 }
 

+ 5 - 5
tests/functions/overloading

@@ -1,12 +1,12 @@
 void test(int a, int b) {
-    print a + 1;
-    print b + 2;
+    test(a + 1);
+    test(b + 2);
 }
 
 void test(int a, int b, int c) {
-    print a + 3;
-    print b + 4;
-    print c + 100;
+    test(a + 3);
+    test(b + 4);
+    test(c + 100);
 }
 
 void main() {

+ 3 - 3
tests/functions/recursion

@@ -6,7 +6,7 @@ int fac(int n) {
 }
 
 void main() {
-    print fac(5);
-    print fac(7);
-    print fac(12);
+    test(fac(5));
+    test(fac(7));
+    test(fac(12));
 }

+ 2 - 2
tests/functions/return

@@ -1,7 +1,7 @@
 void test() {
-    print 5;
+    test(5);
     return;
-    print 6;
+    test(6);
 }
 
 void main() {

+ 3 - 3
tests/functions/return_value

@@ -1,13 +1,13 @@
 int test();
 
 int test(int a, int b) {
-    print 5;
+    test(5);
     return a + b;
 }
 
 void main() {
-    print test();
-    print test(2, 4);
+    test(test());
+    test(test(2, 4));
 }
 
 int test() {

+ 8 - 8
tests/functions/scope

@@ -1,18 +1,18 @@
 void test(int a, int b) {
-    print a;
-    print b;
+    test(a);
+    test(b);
     a = 4;
     b = 5;
-    print a;
-    print b;
+    test(a);
+    test(b);
 }
 
 void main() {
     int a = 2;
     int b = 3;
-    print a;
-    print b;
+    test(a);
+    test(b);
     test(a, b);
-    print a;
-    print b;
+    test(a);
+    test(b);
 }

+ 8 - 8
tests/if/and

@@ -1,15 +1,15 @@
 bool test() {
-    print 1;
+    test(1);
     return true;
 }
 
 void main() {
-    print false && false;
-    print true && false;
-    print false && true;
-    print true && true;
+    test(false && false);
+    test(true && false);
+    test(false && true);
+    test(true && true);
 
-    print false && test() && test();
-    print true && test() && false && test();
-    print true && test() && test();
+    test(false && test() && test());
+    test(true && test() && false && test());
+    test(true && test() && test());
 }

+ 7 - 7
tests/if/else

@@ -1,15 +1,15 @@
 void main() {
-    print 5;
+    test(5);
     if(true) {
-        print 6;
+        test(6);
     } else {
-        print 7;
+        test(7);
     }
-    print 8;
+    test(8);
     if(false) {
-        print 9;
+        test(9);
     } else {
-        print 10;
+        test(10);
     }
-    print 11;
+    test(11);
 }

+ 15 - 15
tests/if/elseif

@@ -1,27 +1,27 @@
-void test(int a) {
+void wusi(int a) {
     if(a == 1) {
-        print 10;
+        test(10);
     } else if(a == 1) {
-        print 100;
+        test(100);
     } else if(a == 2) {
-        print 20;
+        test(20);
     } else if(a == 3) {
-        print 30;
+        test(30);
     } else if(a == 2) {
-        print 200;
+        test(200);
     } else if(a == 4) {
-        print 40;
+        test(40);
     } else {
-        print 50;
+        test(50);
     }
 }
 
 void main() {
-    test(0);
-    test(1);
-    test(2);
-    test(3);
-    test(4);
-    test(5);
-    test(6);
+    wusi(0);
+    wusi(1);
+    wusi(2);
+    wusi(3);
+    wusi(4);
+    wusi(5);
+    wusi(6);
 }

+ 5 - 5
tests/if/if

@@ -1,11 +1,11 @@
 void main() {
-    print 5;
+    test(5);
     if(true) {
-        print 6;
+        test(6);
     }
-    print 7;
+    test(7);
     if(false) {
-        print 8;
+        test(8);
     }
-    print 9;
+    test(9);
 }

+ 6 - 6
tests/if/invert

@@ -1,8 +1,8 @@
 void main() {
-    print !true;
-    print !false;
-    print !!true;
-    print !!false;
-    print !!!true;
-    print !!!false;
+    test(!true);
+    test(!false);
+    test(!!true);
+    test(!!false);
+    test(!!!true);
+    test(!!!false);
 }

+ 8 - 8
tests/if/or

@@ -1,15 +1,15 @@
 bool test() {
-    print 1;
+    test(1);
     return true;
 }
 
 void main() {
-    print false || false;
-    print true || false;
-    print false || true;
-    print true || true;
+    test(false || false);
+    test(true || false);
+    test(false || true);
+    test(true || true);
 
-    print false || test() || test();
-    print false || test() || true || test();
-    print true || test() || test();
+    test(false || test() || test());
+    test(false || test() || true || test());
+    test(true || test() || test());
 }

+ 3 - 3
tests/loops/break

@@ -1,6 +1,6 @@
 void main() {
     for(int i = 0; i < 10; i++) {
-        print i;
+        test(i);
         if(i == 4) {
             break;
         }
@@ -10,9 +10,9 @@ void main() {
             break;
         }
         while(true) {
-            print x;
+            test(x);
             break;
-            print 100;
+            test(100);
         }
         if(x == 1) {
             break;

+ 5 - 5
tests/loops/continue

@@ -3,18 +3,18 @@ void main() {
         if(i == 4) {
             continue;
         }
-        print i;
+        test(i);
     }
     for(int x = 0; x < 3; ++x) {
         if(x == 1) {
             continue;
         }
         for(int y = 0; y < 3; y++) {
-            print x;
+            test(x);
             if(x == 2) {
                 continue;
             }
-            print y;
+            test(y);
         }
         int i = 0;
         while(i < 5) {
@@ -22,7 +22,7 @@ void main() {
             if(i == 3) {
                 continue;
             }
-            print i;
+            test(i);
         }
         continue;
     }
@@ -32,6 +32,6 @@ void main() {
         if(i == 3) {
             continue;
         }
-        print i;
+        test(i);
     }
 }

+ 3 - 3
tests/loops/for

@@ -1,11 +1,11 @@
 void main() {
     for(int i = 0; i < 10; i++) {
-        print i;
+        test(i);
     }
     for(int x = 0; x < 3; ++x) {
         for(int y = 0; y < 3; y++) {
-            print x;
-            print y;
+            test(x);
+            test(y);
         }
     }
 }

+ 1 - 1
tests/loops/while

@@ -1,7 +1,7 @@
 void main() {
     int a = 0;
     while(a < 5) {
-        print a;
+        test(a);
         a = a + 1;
     }
 }

+ 4 - 4
tests/loops/while_post_dec

@@ -1,23 +1,23 @@
 void main() {
     int a = 5;
     while(a > 0) {
-        print a--;
+        test(a--);
     }
 
     a = 5;
     while(a > 0) {
-        print a;
+        test(a);
         a--;
     }
     
     long b = 5L;
     while(b > 0L) {
-        print b--;
+        test(b--);
     }
 
     b = 5L;
     while(b > 0L) {
-        print b;
+        test(b);
         b--;
     }
 }

+ 4 - 4
tests/loops/while_post_inc

@@ -1,23 +1,23 @@
 void main() {
     int a = 0;
     while(a < 5) {
-        print a++;
+        test(a++);
     }
 
     a = 0;
     while(a < 5) {
-        print a;
+        test(a);
         a++;
     }
     
     long b = 0L;
     while(b < 5L) {
-        print b++;
+        test(b++);
     }
 
     b = 0L;
     while(b < 5L) {
-        print b;
+        test(b);
         b++;
     }
 }

+ 4 - 4
tests/loops/while_pre_dec

@@ -1,23 +1,23 @@
 void main() {
     int a = 5;
     while(a > 0) {
-        print --a;
+        test(--a);
     }
 
     a = 5;
     while(a > 0) {
-        print a;
+        test(a);
         --a;
     }
     
     long b = 5L;
     while(b > 0L) {
-        print --b;
+        test(--b);
     }
 
     b = 5L;
     while(b > 0L) {
-        print b;
+        test(b);
         --b;
     }
 }

+ 4 - 4
tests/loops/while_pre_inc

@@ -1,23 +1,23 @@
 void main() {
     int a = 0;
     while(a < 5) {
-        print ++a;
+        test(++a);
     }
 
     a = 0;
     while(a < 5) {
-        print a;
+        test(a);
         ++a;
     }
     
     long b = 0L;
     while(b < 5L) {
-        print ++b;
+        test(++b);
     }
 
     b = 0L;
     while(b < 5L) {
-        print b;
+        test(b);
         ++b;
     }
 }

+ 4 - 4
tests/mix

@@ -16,12 +16,12 @@ void main() {
     int* c = &a;
 
     if(a + b < 20 && a > 3) {
-        print 1;
+        test(1);
     }
     
-    print *c;
-    print (&a)[0];
-    print *&*&a;
+    test(*c);
+    test((&a)[0]);
+    test(*&*&a);
     a = *&a;
     
     a = test();

+ 1 - 1
tests/pre/include

@@ -1,5 +1,5 @@
 #define WUSI
-    print 5;
+    test(5);
 #end
 
 int test() {

+ 2 - 2
tests/pre/list_test

@@ -10,11 +10,11 @@ void main() {
     }
     
     for(int i = 0; i < listGetLength(intList); i++) {
-        print listGetIndex(intList, i);
+        test(listGetIndex(intList, i));
     }
     
     for(int i = 0; i < listGetLength(floatList); i++) {
-        print listGetIndex(floatList, i);
+        test(listGetIndex(floatList, i));
     }
     
     listDelete(intList);

+ 4 - 4
tests/pre/pre

@@ -1,7 +1,7 @@
 #include "include"
 
 #define BAUM 
-    print 6; 
+    test(6); 
 #end 
 
 #define GUSI 
@@ -13,8 +13,8 @@
 #end
 
 #define HUSI
-    print 1;
-    print 2;
+    test(1);
+    test(2);
 #end
 
 
@@ -23,5 +23,5 @@ void main() {
     IF BAUM }
     HUSI
     HUSI
-    print test();
+    test(test());
 }

+ 4 - 4
tests/struct_ref/alloc

@@ -11,8 +11,8 @@ void main() {
     a.i = 7;
     a.l = 8L;
     a.b = true;
-    print a.f;
-    print a.i;
-    print a.l;
-    print a.b;
+    test(a.f);
+    test(a.i);
+    test(a.l);
+    test(a.b);
 }

+ 4 - 4
tests/struct_ref/bool_reference

@@ -6,10 +6,10 @@ void main() {
     bool a = true;
     bool* b = &a;
     a = false;
-    print a;
-    print *b;
+    test(a);
+    test(*b);
     test(&a);
     test(b);
-    print a;
-    print *b;
+    test(a);
+    test(*b);
 }

+ 4 - 4
tests/struct_ref/float_reference

@@ -7,10 +7,10 @@ void main() {
     float a = 5.0;
     float* b = &a;
     a = 6.0;
-    print a;
-    print *b;
+    test(a);
+    test(*b);
     test(&a);
     test(b);
-    print a;
-    print *b;
+    test(a);
+    test(*b);
 }

+ 4 - 4
tests/struct_ref/int_reference

@@ -7,10 +7,10 @@ void main() {
     int a = 5;
     int* b = &a;
     a = 6;
-    print a;
-    print *(b);
+    test(a);
+    test(*(b));
     test(&a);
     test(b);
-    print a;
-    print *b;
+    test(a);
+    test(*b);
 }

+ 4 - 4
tests/struct_ref/long_reference

@@ -7,10 +7,10 @@ void main() {
     long a = 5L;
     long* b = &a;
     a = 6L;
-    print a;
-    print *(b);
+    test(a);
+    test(*(b));
     test(&a);
     test(b);
-    print a;
-    print *b;
+    test(a);
+    test(*b);
 }

+ 5 - 5
tests/struct_ref/nested

@@ -21,9 +21,9 @@ void main() {
     B* ba = &b;
     ba->d.a = 4;
     
-    print b.a;
-    print b.b;
-    print b.c;
-    print b.d.a;
-    print b.d.b;
+    test(b.a);
+    test(b.b);
+    test(b.c);
+    test(b.d.a);
+    test(b.d.b);
 }

+ 12 - 12
tests/struct_ref/pass_struct

@@ -4,25 +4,25 @@ struct A {
 };
 
 void test(A a) {
-    print a.i;
-    print a.b;
+    test(a.i);
+    test(a.b);
     
     a.i = 2;
     a.b = false;
     
-    print a.i;
-    print a.b;
+    test(a.i);
+    test(a.b);
 }
 
 void test(A* a) {
-    print a->i;
-    print a->b;
+    test(a->i);
+    test(a->b);
     
     a->i = 2;
     a->b = false;
     
-    print a->i;
-    print a->b;
+    test(a->i);
+    test(a->b);
 }
 
 void main() {
@@ -30,11 +30,11 @@ void main() {
     a.i = 3;
     a.b = true;
     test(a);
-    print a.i;
-    print a.b;
+    test(a.i);
+    test(a.b);
     test(&a);
-    print a.i;
-    print a.b;
+    test(a.i);
+    test(a.b);
     
     int c = 3;
 }

+ 4 - 4
tests/struct_ref/struct_access

@@ -23,8 +23,8 @@ void main() {
     ++a.w;
     a.w--;
     --a.w;
-    print a.w++;
-    print ++a.w;
-    print a.w--;
-    print --a.w;
+    test(a.w++);
+    test(++a.w);
+    test(a.w--);
+    test(--a.w);
 }

+ 2 - 2
tests/system/time

@@ -3,11 +3,11 @@ void main() {
     long l2 = getMillis();
     long l3 = getMillis();
     long l4 = getMillis();
-    print l1 <= l2 && l2 <= l3 && l3 <= l4;
+    test(l1 <= l2 && l2 <= l3 && l3 <= l4);
     
     l1 = getNanos();
     l2 = getNanos();
     l3 = getNanos();
     l4 = getNanos();
-    print l1 < l2 && l2 < l3 && l3 < l4;
+    test(l1 < l2 && l2 < l3 && l3 < l4);
 }

+ 2 - 2
tests/types/bool

@@ -1,4 +1,4 @@
 void main() {
-    print true;
-    print false;
+    test(true);
+    test(false);
 }

+ 3 - 3
tests/types/null

@@ -5,7 +5,7 @@ int** test() {
 void main() {
     int** b = test();
     int*** c = &b;
-    print b == *c;
-    print length(b);
-    print length(c);
+    test(b == *c);
+    test(length(b));
+    test(length(c));
 }

+ 14 - 14
tests/types/types

@@ -40,31 +40,31 @@ A* structFunction(A* a) {
 
 void main() {
     int i = intFunction();
-    print i;
+    test(i);
     long l = longFunction();
-    print l;
+    test(l);
     bool b = boolFunction();
-    print b;
+    test(b);
     float f = floatFunction();
-    print f;
+    test(f);
     
-    print *intFunction(&i);
-    print *longFunction(&l);
-    print *boolFunction(&b);
-    print *floatFunction(&f);
+    test(*intFunction(&i));
+    test(*longFunction(&l));
+    test(*boolFunction(&b));
+    test(*floatFunction(&f));
     
-    print intFunction(&i)[0];
-    print longFunction(&l)[0];
-    print boolFunction(&b)[0];
-    print floatFunction(&f)[0];
+    test(intFunction(&i)[0]);
+    test(longFunction(&l)[0]);
+    test(boolFunction(&b)[0]);
+    test(floatFunction(&f)[0]);
     
     A a;
     a.a = 53453;
-    print structFunction(&a)->a;
+    test(structFunction(&a)->a);
     structFunction(&a)->a = 123443;
     structFunction(&a)[0].a += 3;
     (*structFunction(&a)).a += 1;
     (&a)->a += 4;
     (*(&a)).a += 5;
-    print structFunction(&a)->a;
+    test(structFunction(&a)->a);
 }

+ 8 - 8
tests/vars/set

@@ -7,16 +7,16 @@ void main() {
     {
         int a = 5;
         int b = 6;
-        print a;
-        print b;
+        test(a);
+        test(b);
     }
     {
         int c = 7;
-        print c;
-        print d;
+        test(c);
+        test(d);
     }
-    print a;
-    print b + 10;
-    print c;
-    print d;
+    test(a);
+    test(b + 10);
+    test(c);
+    test(d);
 }

+ 5 - 5
tests/vars/setop

@@ -3,29 +3,29 @@ void main() {
     a += 5;
     a += 10;
     a += 20;
-    print a;
+    test(a);
 
     a = 5;
     a -= 5;
     a -= -10;
     a -= 20;
-    print a;
+    test(a);
 
     a = 5;
     a *= 2;
     a *= 3;
     a *= 4;
-    print a;
+    test(a);
 
     a = 100;
     a /= 2;
     a /= 3;
     a /= 4;
-    print a;
+    test(a);
 
     a = 100;
     a %= 120;
     a %= 90;
     a %= 3;
-    print a;
+    test(a);
 }

+ 0 - 2
tokenizer/Token.c

@@ -51,7 +51,6 @@ const char* tGetName(Token token) {
         case T_INCREMENT: return "++";
         case T_DECREMENT: return "--";
         case T_LITERAL: return "literal";
-        case T_PRINT: return "print";
         case T_IF: return "if";
         case T_ELSE: return "else";
         case T_WHILE: return "while";
@@ -84,7 +83,6 @@ const char* tGetName(Token token) {
     }
 
 Token tFromName(const char* name) {
-    MATCH_TOKEN("print", T_PRINT);
     MATCH_TOKEN("nullptr", T_NULLPTR);
     MATCH_TOKEN("true", T_TRUE);
     MATCH_TOKEN("false", T_FALSE);

+ 0 - 1
tokenizer/Token.h

@@ -48,7 +48,6 @@ typedef enum {
     T_INCREMENT,
     T_DECREMENT,
     T_LITERAL,
-    T_PRINT,
     T_IF,
     T_ELSE,
     T_WHILE,

+ 0 - 3
utils/ByteCodePrinter.c

@@ -176,9 +176,6 @@ static void btConsumeOperation() {
         PRINT_INTEGRAL_OP(BIT_XOR);
         PRINT_INTEGRAL_OP(LEFT_SHIFT);
         PRINT_INTEGRAL_OP(RIGHT_SHIFT);
-        PRINT_NUMBER_OP(PRINT);
-        PRINT_OP(OP_PRINT_BOOL);
-        PRINT_OP(OP_PRINT_POINTER);
         PRINT_OP_INT(OP_GOTO);
         PRINT_OP_INT(OP_IF_GOTO);
         PRINT_OP_INT(OP_PEEK_FALSE_GOTO);

+ 0 - 2
vm/Operation.h

@@ -35,8 +35,6 @@ typedef enum Operation {
     OP_INTEGRAL(BIT_XOR),
     OP_INTEGRAL(LEFT_SHIFT),
     OP_INTEGRAL(RIGHT_SHIFT),
-    OP_TYPE(PRINT),
-    OP_PRINT_POINTER,
     OP_LINE,
     OP_GOTO,
     OP_IF_GOTO,

+ 0 - 55
vm/Script.c

@@ -15,32 +15,6 @@ void sError(Script* sc, const char* format, ...) {
     va_end(args);
 }
 
-static void sIntPrinter(int i) {
-    printf("%d\n", i);
-}
-
-static void sLongPrinter(long l) {
-    printf("%ld\n", l);
-}
-
-static void sFloatPrinter(float f) {
-    printf("%.2f\n", f);
-}
-
-static void sBoolPrinter(bool b) {
-    puts(b ? "true" : "false");
-}
-
-static void sPointerPrinter(Pointer* b) {
-    printf("(%d, %d)\n", b->array, b->offset);
-}
-
-static IntPrinter intPrinter = sIntPrinter;
-static LongPrinter longPrinter = sLongPrinter;
-static FloatPrinter floatPrinter = sFloatPrinter;
-static BoolPrinter boolPrinter = sBoolPrinter;
-static PointerPrinter pointerPrinter = sPointerPrinter;
-
 static bool sRead(Script* sc, void* buffer, int length) {
     if(sc->readIndex + length > sc->code->length) {
         sError(sc, "cannot read expected %d bytes of data from bytecode");
@@ -169,13 +143,6 @@ static void sPushNullPointer(Script* sc) {
     sPushPointer(sc, &p);
 }
 
-static void sPrintPointer(Script* sc) {
-    Pointer p;
-    if(sPopPointer(sc, &p)) {
-        pointerPrinter(&p);
-    }
-}
-
 #define PRINT(type, Type, printer)                                             \
     {                                                                          \
         type value;                                                            \
@@ -494,7 +461,6 @@ static void sCall(Script* sc) {
 #define CASE_TYPE(TYPE, Type, type)                                            \
     case OP_STORE_##TYPE: sStore(sc, sizeof(type)); break;                     \
     case OP_RETURN_##TYPE: RETURN(type, Type); break;                          \
-    case OP_PRINT_##TYPE: PRINT(type, Type, type##Printer); break;             \
     case OP_EQUAL_##TYPE: BOOL_OP(type, Type, ==); break;                      \
     case OP_LOAD_##TYPE: sLoad(sc, sizeof(type)); break;
 
@@ -559,7 +525,6 @@ static void sConsumeInstruction(Script* sc) {
         case OP_DELETE: sDeleteArray(sc); break;
         case OP_LENGTH: sLength(sc); break;
         case OP_STORE_POINTER: sStore(sc, sizeof(Pointer)); break;
-        case OP_PRINT_POINTER: sPrintPointer(sc); break;
         case OP_EQUAL_POINTER: sEqualPointer(sc); break;
         case OP_INT_TO_FLOAT: CAST(Int, int, Float); break;
         case OP_FLOAT_TO_INT: CAST(Float, float, Int); break;
@@ -603,24 +568,4 @@ void sRun(Script* sc) {
             return;
         }
     }
-}
-
-void sSetIntPrinter(IntPrinter p) {
-    intPrinter = p;
-}
-
-void sSetLongPrinter(LongPrinter p) {
-    longPrinter = p;
-}
-
-void sSetFloatPrinter(FloatPrinter p) {
-    floatPrinter = p;
-}
-
-void sSetBoolPrinter(BoolPrinter p) {
-    boolPrinter = p;
-}
-
-void sSetPointerPrinter(PointerPrinter p) {
-    pointerPrinter = p;
 }

+ 0 - 11
vm/Script.h

@@ -35,15 +35,4 @@ bool sPushFloat(Script* sc, float f);
 bool sPopBool(Script* sc, bool* b);
 bool sPushBool(Script* sc, bool b);
 
-typedef void (*IntPrinter)(int);
-void sSetIntPrinter(IntPrinter p);
-typedef void (*LongPrinter)(long);
-void sSetLongPrinter(LongPrinter p);
-typedef void (*FloatPrinter)(float);
-void sSetFloatPrinter(FloatPrinter p);
-typedef void (*BoolPrinter)(bool);
-void sSetBoolPrinter(BoolPrinter p);
-typedef void (*PointerPrinter)(Pointer*);
-void sSetPointerPrinter(PointerPrinter p);
-
 #endif