summaryrefslogtreecommitdiff
path: root/tmp/test.out
blob: 4b4fdc184c58aa2706afd12cec0606228dea5827 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39


#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;
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)