Changeset 467
- Timestamp:
- 08/30/07 15:52:45 (1 year ago)
- Files:
-
- trunk/thune/print.c (modified) (5 diffs)
- trunk/thune/tests/working/print_recurse.good (added)
- trunk/thune/tests/working/print_recurse.t (added)
- trunk/thune/urlan.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/thune/print.c
r458 r467 850 850 } \ 851 851 mask <<= 1; 852 853 854 #define SET_RECURSE_FLAG(v) ((UCell*)v)->id.flags |= UR_FLAG_PRINT_RECURSION 855 #define CLR_RECURSE_FLAG(v) ((UCell*)v)->id.flags &= ~UR_FLAG_PRINT_RECURSION 852 856 853 857 … … 1182 1186 case UT_PAREN: 1183 1187 case UT_BLOCK: 1184 { 1185 UBlock* blk = ur_block( val ); 1186 UIndex n = ur_sliceEnd( val, blk ); 1187 1188 if( n < val->series.it ) 1189 n = val->series.it; 1190 1191 ur_blockToStr( ut, out, 1192 blk->ptr.cells + val->series.it, 1193 blk->ptr.cells + n, 1194 ur_type(val), depth ); 1195 } 1188 if( val->id.flags & UR_FLAG_PRINT_RECURSION ) 1189 { 1190 append( out, ur_is(val, UT_PAREN) ? "(...)" : "[...]", 5 ); 1191 } 1192 else 1193 { 1194 UBlock* blk = ur_block( val ); 1195 UIndex n = ur_sliceEnd( val, blk ); 1196 1197 SET_RECURSE_FLAG(val); 1198 1199 if( n < val->series.it ) 1200 n = val->series.it; 1201 1202 ur_blockToStr( ut, out, 1203 blk->ptr.cells + val->series.it, 1204 blk->ptr.cells + n, 1205 ur_type(val), depth ); 1206 1207 CLR_RECURSE_FLAG(val); 1208 } 1196 1209 break; 1197 1210 … … 1201 1214 case UT_COMPONENT: 1202 1215 #endif 1203 if( val->id.flags & UR_FLAG_ CTX_RECURSION )1216 if( val->id.flags & UR_FLAG_PRINT_RECURSION ) 1204 1217 { 1205 1218 append( out, "?context?", 9 ); … … 1213 1226 UCell* vit = vblk->ptr.cells; 1214 1227 1215 ((UCell*) val)->id.flags |= UR_FLAG_CTX_RECURSION;1228 SET_RECURSE_FLAG(val); 1216 1229 1217 1230 #ifdef LANG_THUNE … … 1254 1267 #endif 1255 1268 1256 ((UCell*) val)->id.flags &= ~UR_FLAG_CTX_RECURSION;1269 CLR_RECURSE_FLAG(val); 1257 1270 } 1258 1271 break; trunk/thune/urlan.h
r460 r467 94 94 #define UR_FLAG_BIND_MASK 0x07 95 95 #define UR_FLAG_SEL_ATOM 0x08 96 #define UR_FLAG_ CTX_RECURSION0x4096 #define UR_FLAG_PRINT_RECURSION 0x40 97 97 #define UR_FLAG_SOL 0x80 98 98
