pegen_interface.h 953 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef Py_PEGENINTERFACE
  2. #define Py_PEGENINTERFACE
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifndef Py_BUILD_CORE
  7. # error "this header requires Py_BUILD_CORE define"
  8. #endif
  9. #include "Python.h"
  10. #include "Python-ast.h"
  11. PyAPI_FUNC(mod_ty) PyPegen_ASTFromString(
  12. const char *str,
  13. const char *filename,
  14. int mode,
  15. PyCompilerFlags *flags,
  16. PyArena *arena);
  17. PyAPI_FUNC(mod_ty) PyPegen_ASTFromStringObject(
  18. const char *str,
  19. PyObject* filename,
  20. int mode,
  21. PyCompilerFlags *flags,
  22. PyArena *arena);
  23. PyAPI_FUNC(mod_ty) PyPegen_ASTFromFileObject(
  24. FILE *fp,
  25. PyObject *filename_ob,
  26. int mode,
  27. const char *enc,
  28. const char *ps1,
  29. const char *ps2,
  30. PyCompilerFlags *flags,
  31. int *errcode,
  32. PyArena *arena);
  33. PyAPI_FUNC(mod_ty) PyPegen_ASTFromFilename(
  34. const char *filename,
  35. int mode,
  36. PyCompilerFlags *flags,
  37. PyArena *arena);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* !Py_PEGENINTERFACE*/