Mercurial Hosting > luan
comparison src/luan/modules/parsers/LuanToString.java @ 1485:6a24c8b33d6b
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 01 May 2020 11:23:29 -0600 |
parents | 59fd2e8b1b9d |
children | f989778ca9e1 |
comparison
equal
deleted
inserted
replaced
1484:1fa6e8ec2d53 | 1485:6a24c8b33d6b |
---|---|
59 Map map = tbl.rawMap(); | 59 Map map = tbl.rawMap(); |
60 sb.append( '{' ); | 60 sb.append( '{' ); |
61 if( !list.isEmpty() ) { | 61 if( !list.isEmpty() ) { |
62 if( !compressed ) | 62 if( !compressed ) |
63 indent(sb,indented+1); | 63 indent(sb,indented+1); |
64 for( Object obj : list ) { | 64 toString(list.get(0),sb,indented+1); |
65 toString(obj,sb,indented+1); | 65 final int n = list.size(); |
66 sb.append( comma ); | 66 for( int i=1; i<n; i++ ) { |
67 sb.append(comma); | |
68 toString(list.get(i),sb,indented+1); | |
67 } | 69 } |
68 if( compressed ) | |
69 sb.setLength(sb.length()-1); | |
70 } | 70 } |
71 boolean first = true; | 71 boolean first = true; |
72 for( Object obj : map.entrySet() ) { | 72 for( Object obj : map.entrySet() ) { |
73 Map.Entry entry = (Map.Entry)obj; | 73 Map.Entry entry = (Map.Entry)obj; |
74 if( compressed && first ) | 74 if( compressed && first ) |