From 71185ab0ab0b08b4d5bb2e750ff85e11f105a453 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 16 Sep 2008 17:05:51 +0000 Subject: array progress --- tmp/test.fy | 11 ++++++++++- tmp/test.out | 28 +++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) (limited to 'tmp') 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) -- cgit v1.2.3