]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
ignore control-l in whitespace
authorGuido van Rossum <guido@python.org>
Fri, 7 Jul 1995 22:27:27 +0000 (22:27 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 7 Jul 1995 22:27:27 +0000 (22:27 +0000)
Parser/tokenizer.c

index 4d759d1cd97805eac4765dc88f3c70f91752b55b..896b0ce5362e65c04d8f8a46adb059db1bf0da2d 100644 (file)
@@ -424,6 +424,8 @@ tok_get(tok, p_start, p_end)
                                col++;
                        else if (c == '\t')
                                col = (col/tok->tabsize + 1) * tok->tabsize;
+                       else if (c == '\014') /* Control-L (formfeed) */
+                               col = 0; /* For Emacs users */
                        else
                                break;
                }
@@ -492,7 +494,7 @@ tok_get(tok, p_start, p_end)
        /* Skip spaces */
        do {
                c = tok_nextc(tok);
-       } while (c == ' ' || c == '\t');
+       } while (c == ' ' || c == '\t' || c == '\014');
        
        /* Set start of current token */
        tok->start = tok->cur - 1;