summaryrefslogtreecommitdiff
path: root/tmp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-10-14 20:38:27 +0000
committerPaul Buetow <paul@buetow.org>2008-10-14 20:38:27 +0000
commitd527f50159f056dc165fa7eaf7bf80425a1e758d (patch)
tree03e8aa97c25fbc014876e5113dd66d4a44adac4d /tmp
parent71185ab0ab0b08b4d5bb2e750ff85e11f105a453 (diff)
GC removed, temporaly
Diffstat (limited to 'tmp')
-rw-r--r--tmp/test.fy6
-rw-r--r--tmp/test.out62
2 files changed, 42 insertions, 26 deletions
diff --git a/tmp/test.fy b/tmp/test.fy
index 7e030a5..adb8384 100644
--- a/tmp/test.fy
+++ b/tmp/test.fy
@@ -1,12 +1,18 @@
#my foo = [1 2 3];
+# Prints num of elements in foo
#assert "TT_INTEGER" == type say integer foo;
#my bar = [1 2 3];
+# Prints num of elements in bar
#assert "TT_DOUBLE" == type say double bar;
#my baz = [1 2 3];
+# Prints num of elements in baz
#assert "TT_STRING" == type say string baz;
+
+# Prints "1 3 5 6\n"
#say [1 3 5 6];
+my foo = 2 * 3 + 1.2;
diff --git a/tmp/test.out b/tmp/test.out
index fd06f6e..4b4fdc1 100644
--- a/tmp/test.out
+++ b/tmp/test.out
@@ -1,29 +1,39 @@
-#*
-my foo = [1 2 3];
-assert "TT_INTEGER" == type say integer foo;
-my bar = [1 2 3];
-assert "TT_DOUBLE" == type say double bar;
-my baz = [1 2 3];
-assert "TT_STRING" == type say string baz;
-*#
-say [1 3 5 6];
+#my foo = [1 2 3];
+# Prints num of elements in foo
+#assert "TT_INTEGER" == type say integer foo;
-Token (id=00000, line=00011, pos=0004, type=TT_IDENT, val=say, ival=0, dval=0.000000, refs=1)
-Token (id=00001, line=00011, pos=0006, type=TT_PARANT_AL, val=[, ival=0, dval=0.000000, refs=1)
-Token (id=00002, line=00011, pos=0007, type=TT_INTEGER, val=1, ival=1, dval=0.000000, refs=1)
-Token (id=00003, line=00011, pos=0009, type=TT_INTEGER, val=3, ival=3, dval=0.000000, refs=1)
-Token (id=00004, line=00011, pos=0011, type=TT_INTEGER, val=5, ival=5, dval=0.000000, refs=1)
-Token (id=00005, line=00011, pos=0013, type=TT_INTEGER, val=6, ival=6, dval=0.000000, refs=1)
-Token (id=00006, line=00011, pos=0013, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
-Token (id=00007, line=00011, pos=0014, type=TT_PARANT_AR, val=], ival=0, dval=0.000000, refs=1)
-Token (id=00008, line=00011, pos=0015, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
-1 3 5 6
-The garbage collector still has 5 registered items which don't have a zero ref count!
-(id=00002, line=00011, pos=0007, type=TT_INTEGER, val=1, ival=1, dval=0.000000, refs=1)
-(id=00003, line=00011, pos=0009, type=TT_INTEGER, val=3, ival=3, dval=0.000000, refs=1)
-(id=00004, line=00011, pos=0011, type=TT_INTEGER, val=5, ival=5, dval=0.000000, refs=1)
-(id=00005, line=00011, pos=0013, type=TT_INTEGER, val=6, ival=6, dval=0.000000, refs=1)
-(id=00006, line=00011, pos=0013, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
-Garbage left: Garbage error (Fype @ ./src/core/garbage.c line 82)
+#my bar = [1 2 3];
+# Prints num of elements in bar
+#assert "TT_DOUBLE" == type say double bar;
+
+#my baz = [1 2 3];
+# Prints num of elements in baz
+#assert "TT_STRING" == type say string baz;
+
+# Prints "1 3 5 6\n"
+#say [1 3 5 6];
+
+my foo = 2 * 3 + 1.2;
+Token (org=1, id=00000, line=00018, pos=0003, type=TT_MY, val=my, ival=0, dval=0.000000, refs=1)
+Token (org=1, id=00001, line=00018, pos=0007, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1)
+Token (org=1, id=00002, line=00018, pos=0009, type=TT_ASSIGN, val==, ival=0, dval=0.000000, refs=1)
+Token (org=1, id=00003, line=00018, pos=0011, type=TT_INTEGER, val=2, ival=2, dval=0.000000, refs=1)
+Token (org=1, id=00004, line=00018, pos=0013, type=TT_MULT, val=*, ival=0, dval=0.000000, refs=1)
+Token (org=1, id=00005, line=00018, pos=0015, type=TT_INTEGER, val=3, ival=3, dval=0.000000, refs=1)
+Token (org=1, id=00006, line=00018, pos=0017, type=TT_ADD, val=+, ival=0, dval=0.000000, refs=1)
+Token (org=1, id=00009, line=00018, pos=0021, type=TT_DOUBLE, val=1.2, ival=2, dval=1.200000, refs=1)
+Token (org=1, id=00010, line=00018, pos=0022, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
+(org=0, id=00011, line=00018, pos=0015, type=TT_INTEGER, val=3, ival=6, dval=0.000000, refs=-1)
+Token ref count is 0 > -1
+(org=0, id=00012, line=00018, pos=0011, type=TT_INTEGER, val=2, ival=2, dval=0.000000, refs=-1)
+Token ref count is 0 > -1
+(org=0, id=00013, line=00018, pos=0021, type=TT_INTEGER, val=1.2, ival=4, dval=7.200000, refs=-1)
+Token ref count is 0 > -1
+(org=0, id=00014, line=00018, pos=0015, type=TT_DOUBLE, val=3, ival=6, dval=6.000000, refs=-1)
+Token ref count is 0 > -1
+The garbage collector still has 2 registered items which don't have a zero ref count!
+(org=1, id=00007, line=00018, pos=0019, type=TT_INTEGER, val=1, ival=1, dval=0.000000, refs=1)
+(org=1, id=00008, line=00018, pos=0020, type=TT_DOT, val=., ival=0, dval=0.000000, refs=1)
+Garbage left: Garbage error (Fype @ ./src/core/garbage.c line 88)