Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
pycore_parser.h79 linesDownload Raw Back to internal
1#ifndef Py_INTERNAL_PARSER_H2#define Py_INTERNAL_PARSER_H3#ifdef __cplusplus4extern "C" {5#endif6 7#ifndef Py_BUILD_CORE8#  error "this header requires Py_BUILD_CORE define"9#endif10 11 12#include "pycore_ast.h"             // struct _expr13#include "pycore_global_strings.h"  // _Py_DECLARE_STR()14#include "pycore_pyarena.h"         // PyArena15 16_Py_DECLARE_STR(empty, "")17#if defined(Py_DEBUG) && defined(Py_GIL_DISABLED)18#define _parser_runtime_state_INIT \19    { \20        .mutex = {0}, \21        .dummy_name = { \22            .kind = Name_kind, \23            .v.Name.id = &_Py_STR(empty), \24            .v.Name.ctx = Load, \25            .lineno = 1, \26            .col_offset = 0, \27            .end_lineno = 1, \28            .end_col_offset = 0, \29        }, \30    }31#else32#define _parser_runtime_state_INIT \33    { \34        .dummy_name = { \35            .kind = Name_kind, \36            .v.Name.id = &_Py_STR(empty), \37            .v.Name.ctx = Load, \38            .lineno = 1, \39            .col_offset = 0, \40            .end_lineno = 1, \41            .end_col_offset = 0, \42        }, \43    }44#endif45 46extern struct _mod* _PyParser_ASTFromString(47    const char *str,48    PyObject* filename,49    int mode,50    PyCompilerFlags *flags,51    PyArena *arena);52 53extern struct _mod* _PyParser_ASTFromFile(54    FILE *fp,55    PyObject *filename_ob,56    const char *enc,57    int mode,58    const char *ps1,59    const char *ps2,60    PyCompilerFlags *flags,61    int *errcode,62    PyArena *arena);63extern struct _mod* _PyParser_InteractiveASTFromFile(64    FILE *fp,65    PyObject *filename_ob,66    const char *enc,67    int mode,68    const char *ps1,69    const char *ps2,70    PyCompilerFlags *flags,71    int *errcode,72    PyObject **interactive_src,73    PyArena *arena);74 75#ifdef __cplusplus76}77#endif78#endif /* !Py_INTERNAL_PARSER_H */79 
codekingpro/portable-devtools · Team Ai