Mercurial Hosting > luan
comparison core/src/luan/modules/PickleCon.java @ 432:d9df6d6cb927
finish fixing LuanTable to use metatables
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 02 May 2015 23:41:59 -0600 |
parents | f28320fd671d |
children | f1601a4ce1aa |
comparison
equal
deleted
inserted
replaced
431:3ffe8ba5b297 | 432:d9df6d6cb927 |
---|---|
94 if( !set.add(tbl) ) { | 94 if( !set.add(tbl) ) { |
95 throw luan.exception( "circular reference in table" ); | 95 throw luan.exception( "circular reference in table" ); |
96 } | 96 } |
97 StringBuilder sb = new StringBuilder(); | 97 StringBuilder sb = new StringBuilder(); |
98 sb.append( "{" ); | 98 sb.append( "{" ); |
99 for( Map.Entry<Object,Object> entry : tbl ) { | 99 for( Map.Entry<Object,Object> entry : tbl.iterable(luan) ) { |
100 sb.append( "[" ); | 100 sb.append( "[" ); |
101 sb.append( pickle(entry.getKey(),set) ); | 101 sb.append( pickle(entry.getKey(),set) ); |
102 sb.append( "]=" ); | 102 sb.append( "]=" ); |
103 sb.append( pickle(entry.getValue(),set) ); | 103 sb.append( pickle(entry.getValue(),set) ); |
104 sb.append( ", " ); | 104 sb.append( ", " ); |