srecord noeq Tok_SimpleSizeAnalysis(LS tok) { new LS lines; S get() { scan(tok); ret lines(sorted(lines)); } void scan(LS tok) { for (IntRange r : tok_allCurlyBodies(tok)) { int iLineStart = tok_beginningOfLine(tok, r.start); int tokens = countTokens(r); lines.add(lpad(11, nTokens(tokens)) + ": " + shorten(trimJoinSubList(tok2, iLineStart, r.start-1))); scan(tokSubList(tok, r)); } } }