line counting bug
authoradam <adam@megacz.com>
Sun, 12 Feb 2006 01:18:33 +0000 (20:18 -0500)
committeradam <adam@megacz.com>
Sun, 12 Feb 2006 01:18:33 +0000 (20:18 -0500)
darcs-hash:20060212011833-5007d-4a4bc29f9531b3d984e2550139b3a2ff7b84a54c.gz

src/edu/berkeley/sbp/tib/Tib.java

index 0cf3aab..0ce53b0 100644 (file)
@@ -83,9 +83,9 @@ public class Tib implements Input<Character> {
                 return null;
             }
             c = (char)i;
+            if (c=='\n') { _row++; _col=0; }
+            else         _col++;
         }
-        if (c=='\n') { _row++; _col=0; }
-        else         _col++;
         if (indenting) {
             if (c==' ') { indentation++; return done(c); }
             if (c=='\n') { indentation = 0; if (blank) return nextc(numstates, resets); blank = true; waiting = true; waitingChar='\n'; return '\n'; }