mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-25643: Refactor the C tokenizer into smaller, logical units (GH-25050)
This commit is contained in:
parent
fb1d01b963
commit
261a452a13
4 changed files with 354 additions and 360 deletions
|
|
@ -15,8 +15,8 @@ extern "C" {
|
|||
|
||||
enum decoding_state {
|
||||
STATE_INIT,
|
||||
STATE_RAW,
|
||||
STATE_NORMAL /* have a codec associated with input */
|
||||
STATE_SEEK_CODING,
|
||||
STATE_NORMAL
|
||||
};
|
||||
|
||||
/* Tokenizer state */
|
||||
|
|
@ -54,7 +54,6 @@ struct tok_state {
|
|||
/* Stuff for PEP 0263 */
|
||||
enum decoding_state decoding_state;
|
||||
int decoding_erred; /* whether erred in decoding */
|
||||
int read_coding_spec; /* whether 'coding:...' has been read */
|
||||
char *encoding; /* Source encoding. */
|
||||
int cont_line; /* whether we are in a continuation line. */
|
||||
const char* line_start; /* pointer to start of current line */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue