mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
ignore control-l in whitespace
This commit is contained in:
parent
a996b910f2
commit
94d32b18e0
1 changed files with 3 additions and 1 deletions
|
|
@ -424,6 +424,8 @@ tok_get(tok, p_start, p_end)
|
||||||
col++;
|
col++;
|
||||||
else if (c == '\t')
|
else if (c == '\t')
|
||||||
col = (col/tok->tabsize + 1) * tok->tabsize;
|
col = (col/tok->tabsize + 1) * tok->tabsize;
|
||||||
|
else if (c == '\014') /* Control-L (formfeed) */
|
||||||
|
col = 0; /* For Emacs users */
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -492,7 +494,7 @@ tok_get(tok, p_start, p_end)
|
||||||
/* Skip spaces */
|
/* Skip spaces */
|
||||||
do {
|
do {
|
||||||
c = tok_nextc(tok);
|
c = tok_nextc(tok);
|
||||||
} while (c == ' ' || c == '\t');
|
} while (c == ' ' || c == '\t' || c == '\014');
|
||||||
|
|
||||||
/* Set start of current token */
|
/* Set start of current token */
|
||||||
tok->start = tok->cur - 1;
|
tok->start = tok->cur - 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue