This is the optimal code for a self-contained formatter, although the original code is crafty in being smaller and simpler, and can be evaluated as using the original output as a scratch pad for state, making the final formatter more straightforward. While this code is longer, all code-paths are minimal.
|
|
||
1498 |
|
1498 |
|
1499 |
|
1499 |
|
1500 |
|
1500 |
|
1501 |
|
|
|
1502 |
|
1501 |
|
1503 |
|
1502 |
|
1504 |
|
1503 |
|
|
|
||
1525 |
|
1524 |
|
1526 |
|
1525 |
|
1527 |
|
1526 |
|
1528 |
|
|
|
1529 |
|
|
|
|
1527 |
|
|
1530 |
|
1528 |
|
1531 |
|
1529 |
|
1532 |
|
1530 |
|
|
|
||
1542 |
|
1540 |
|
1543 |
|
1541 |
|
1544 |
|
1542 |
|
1545 |
|
|
|
1546 |
|
|
|
1547 |
|
|
|
1548 |
|
|
|
1549 |
|
|
|
1550 |
|
|
|
1551 |
|
|
|
1552 |
|
|
|
1553 |
|
|
|
1554 |
|
|
|
1555 |
|
|
|
1556 |
|
|
|
1557 |
|
1543 |
|
1558 |
|
1544 |
|
1559 |
|
1545 |
|