summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-07-07 22:27:27 (GMT)
committerGuido van Rossum <guido@python.org>1995-07-07 22:27:27 (GMT)
commit94d32b18e0ef1d7bfa8b7bef084f4cc2cecc5d44 (patch)
tree1064a66a1b658bf77ab3972e90dd00fc54030a1f /Parser
parenta996b910f22c9a249653f6eff72868d37e95f5be (diff)
downloadcpython-94d32b18e0ef1d7bfa8b7bef084f4cc2cecc5d44.zip
cpython-94d32b18e0ef1d7bfa8b7bef084f4cc2cecc5d44.tar.gz
cpython-94d32b18e0ef1d7bfa8b7bef084f4cc2cecc5d44.tar.bz2
ignore control-l in whitespace
Diffstat (limited to 'Parser')
-rw-r--r--Parser/tokenizer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 4d759d1..896b0ce 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -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;