summaryrefslogtreecommitdiff
path: root/test/binary1.lm
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-01-10 14:30:40 -0500
committerAdrian Thurston <thurston@complang.org>2015-01-10 14:30:52 -0500
commitb45f08baf7ac6a1846b7bc80c0fc01d278f2a41b (patch)
tree98be31b601df7076807966fa0ce2374aa432fca1 /test/binary1.lm
parentbdb1fcfc742eb6ccb8e991ee792077ae6504a2de (diff)
downloadcolm-b45f08baf7ac6a1846b7bc80c0fc01d278f2a41b.tar.gz
more object-semantics improvements
Diffstat (limited to 'test/binary1.lm')
-rw-r--r--test/binary1.lm16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/binary1.lm b/test/binary1.lm
index a38d930f..bdf9ac85 100644
--- a/test/binary1.lm
+++ b/test/binary1.lm
@@ -116,11 +116,19 @@ def count
# end
#
-CL: list<int>
+struct int_el
+ Int: int
+
+ list_el el
+end
+
+CL: list<int_el>
int start_list( count: int )
{
- CL->push( count )
+ IntEl: int_el = new int_el
+ IntEl->Int = count
+ CL->push( IntEl )
}
def count_inc
@@ -485,9 +493,9 @@ int print_all_names( s: start )
end # binary
Binary: binary = new binary
-Binary->CL = new list<int>
+Binary->CL = new list<int_el>
-parse S: binary::start(deref Binary) [ stdin ]
+parse S: binary::start(Binary) [ stdin ]
print_all_names( S )
print( '*** SUCCESS ***\n' )
##### EXP #####