/Include/compile.h

http://unladen-swallow.googlecode.com/ · C Header · 44 lines · 30 code · 12 blank · 2 comment · 0 complexity · f1a4c796c1de42c45c353d0be7983d0b MD5 · raw file

  1. #ifndef Py_COMPILE_H
  2. #define Py_COMPILE_H
  3. #include "code.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* Public interface */
  8. struct _node; /* Declare the existence of this type */
  9. PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
  10. /* Future feature support */
  11. typedef struct {
  12. int ff_features; /* flags set by future statements */
  13. int ff_lineno; /* line number of last future statement */
  14. } PyFutureFeatures;
  15. #define FUTURE_NESTED_SCOPES "nested_scopes"
  16. #define FUTURE_GENERATORS "generators"
  17. #define FUTURE_DIVISION "division"
  18. #define FUTURE_ABSOLUTE_IMPORT "absolute_import"
  19. #define FUTURE_WITH_STATEMENT "with_statement"
  20. #define FUTURE_PRINT_FUNCTION "print_function"
  21. #define FUTURE_UNICODE_LITERALS "unicode_literals"
  22. struct _mod; /* Declare the existence of this type */
  23. PyAPI_FUNC(PyCodeObject *) PyAST_Compile(struct _mod *, const char *,
  24. PyCompilerFlags *, PyArena *);
  25. PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
  26. #define ERR_LATE_FUTURE \
  27. "from __future__ imports must occur at the beginning of the file"
  28. PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif /* !Py_COMPILE_H */