mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 13:45:05 +00:00
Massive automated renaming of all Py_/PyObject/etc. prefixes to Ty_/TyObject/etc. This includes: - All public API types (TyObject, TyTypeObject, etc.) - All public API functions (Ty_Initialize, Ty_BuildValue, etc.) - All internal API (_Ty_ prefixes) - Reference counting macros (Ty_INCREF, Ty_DECREF, etc.) - Type flags (Ty_TPFLAGS_*) - Debug flags (Ty_DEBUG, Ty_TRACE_REFS, etc.) - All object type APIs (TyList_, TyDict_, TyUnicode_, etc.) This changes over 60,000 occurrences across 1000+ files. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
38 lines
1.6 KiB
C
38 lines
1.6 KiB
C
#ifndef _PY_TOKENIZER_HELPERS_H_
|
|
#define _PY_TOKENIZER_HELPERS_H_
|
|
|
|
#include "Python.h"
|
|
|
|
#include "../lexer/state.h"
|
|
|
|
#define ADVANCE_LINENO() \
|
|
tok->lineno++; \
|
|
tok->col_offset = 0;
|
|
|
|
int _PyTokenizer_syntaxerror(struct tok_state *tok, const char *format, ...);
|
|
int _PyTokenizer_syntaxerror_known_range(struct tok_state *tok, int col_offset, int end_col_offset, const char *format, ...);
|
|
int _PyTokenizer_indenterror(struct tok_state *tok);
|
|
int _PyTokenizer_warn_invalid_escape_sequence(struct tok_state *tok, int first_invalid_escape_char);
|
|
int _PyTokenizer_parser_warn(struct tok_state *tok, TyObject *category, const char *format, ...);
|
|
char *_PyTokenizer_error_ret(struct tok_state *tok);
|
|
|
|
char *_PyTokenizer_new_string(const char *s, Ty_ssize_t len, struct tok_state *tok);
|
|
char *_PyTokenizer_translate_newlines(const char *s, int exec_input, int preserve_crlf, struct tok_state *tok);
|
|
TyObject *_PyTokenizer_translate_into_utf8(const char* str, const char* enc);
|
|
|
|
int _PyTokenizer_check_bom(int get_char(struct tok_state *),
|
|
void unget_char(int, struct tok_state *),
|
|
int set_readline(struct tok_state *, const char *),
|
|
struct tok_state *tok);
|
|
int _PyTokenizer_check_coding_spec(const char* line, Ty_ssize_t size, struct tok_state *tok,
|
|
int set_readline(struct tok_state *, const char *));
|
|
int _PyTokenizer_ensure_utf8(char *line, struct tok_state *tok);
|
|
|
|
#ifdef Ty_DEBUG
|
|
void _PyTokenizer_print_escape(FILE *f, const char *s, Ty_ssize_t size);
|
|
void _PyTokenizer_tok_dump(int type, char *start, char *end);
|
|
#endif
|
|
|
|
|
|
#endif
|