mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-104169: Refactor tokenizer into lexer and wrappers (#110684)
* The lexer, which include the actual lexeme producing logic, goes into the `lexer` directory. * The wrappers, one wrapper per input mode (file, string, utf-8, and readline), go into the `tokenizer` directory and include logic for creating a lexer instance and managing the buffer for different modes. --------- Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
eb50cd37ea
commit
01481f2dc1
29 changed files with 3185 additions and 2988 deletions
10
Parser/lexer/buffer.h
Normal file
10
Parser/lexer/buffer.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef _LEXER_BUFFER_H_
|
||||
#define _LEXER_BUFFER_H_
|
||||
|
||||
#include "pyport.h"
|
||||
|
||||
void _PyLexer_remember_fstring_buffers(struct tok_state *tok);
|
||||
void _PyLexer_restore_fstring_buffers(struct tok_state *tok);
|
||||
int _PyLexer_tok_reserve_buf(struct tok_state *tok, Py_ssize_t size);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue