summaryrefslogtreecommitdiff
path: root/tmp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-09-16 17:05:51 +0000
committerPaul Buetow <paul@buetow.org>2008-09-16 17:05:51 +0000
commit71185ab0ab0b08b4d5bb2e750ff85e11f105a453 (patch)
treea6ad933176f92b60d2f1560d2f1bac46ec6b9566 /tmp
parent8b31b18a43dea55489e70d5b2ea6fc183cc67533 (diff)
array progress
Diffstat (limited to 'tmp')
-rw-r--r--tmp/test.fy11
-rw-r--r--tmp/test.out28
2 files changed, 37 insertions, 2 deletions
diff --git a/tmp/test.fy b/tmp/test.fy
index afe2cec..7e030a5 100644
--- a/tmp/test.fy
+++ b/tmp/test.fy
@@ -1,3 +1,12 @@
-my foo = [1, 2.2, "3"];
+#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];
+
diff --git a/tmp/test.out b/tmp/test.out
index afe2cec..fd06f6e 100644
--- a/tmp/test.out
+++ b/tmp/test.out
@@ -1,3 +1,29 @@
+#*
+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 foo = [1, 2.2, "3"];
+my baz = [1 2 3];
+assert "TT_STRING" == type say string baz;
+*#
+say [1 3 5 6];
+
+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)