gh-153569: centralize formatted-string transitions · python/cpython@c0ee295 · GitHub
Skip to content

Commit c0ee295

Browse files
committed
gh-153569: centralize formatted-string transitions
1 parent 9e645ae commit c0ee295

3 files changed

Lines changed: 112 additions & 51 deletions

File tree

Parser/lexer/lexer.c

Lines changed: 26 additions & 34 deletions

Parser/lexer/lexer_internal.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ int _PyLexer_nextc(struct tok_state *);
3535
void _PyLexer_backup(struct tok_state *, int);
3636
int _PyLexer_record_ftstring_comment(
3737
struct tok_state *, ftstring_state *, const char *, const char *);
38-
int _PyLexer_finish_ftstring_expr(
39-
struct tok_state *, ftstring_state *, struct token *);
38+
int _PyLexer_ftstring_punctuation(
39+
struct tok_state *, ftstring_state *, struct token *, int);
40+
int _PyLexer_close_ftstring_expr(
41+
struct tok_state *, ftstring_state *, int);
42+
void _PyLexer_mark_ftstring_debug(struct tok_state *, ftstring_state *);
4043
int _PyLexer_check_string_prefixes(struct tok_state *, int, int, int, int, int);
4144
int _PyLexer_scan_number(struct tok_state *, struct token *, int, int);
4245
int _PyLexer_scan_fstring_start(struct tok_state *, struct token *, int);

Parser/lexer/string.c

Lines changed: 81 additions & 15 deletions

0 commit comments

Comments
 (0)