2005-10-20 21:59:25 +02:00
|
|
|
#ifndef Py_CODE_H
|
|
|
|
#include "code.h"
|
|
|
|
#endif
|
1990-12-20 16:06:42 +01:00
|
|
|
|
2000-07-09 02:20:36 +02:00
|
|
|
#ifndef Py_COMPILE_H
|
|
|
|
#define Py_COMPILE_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
1990-12-20 16:06:42 +01:00
|
|
|
/* Public interface */
|
1991-04-03 21:00:55 +02:00
|
|
|
struct _node; /* Declare the existence of this type */
|
2002-12-11 15:04:59 +01:00
|
|
|
PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
|
1993-07-28 11:05:47 +02:00
|
|
|
|
2001-02-27 20:07:02 +01:00
|
|
|
/* Future feature support */
|
|
|
|
|
|
|
|
typedef struct {
|
2005-10-20 21:59:25 +02:00
|
|
|
int ff_features; /* flags set by future statements */
|
|
|
|
int ff_lineno; /* line number of last future statement */
|
2001-02-27 20:07:02 +01:00
|
|
|
} PyFutureFeatures;
|
|
|
|
|
|
|
|
#define FUTURE_NESTED_SCOPES "nested_scopes"
|
2001-07-15 23:08:29 +02:00
|
|
|
#define FUTURE_GENERATORS "generators"
|
2001-08-08 07:00:18 +02:00
|
|
|
#define FUTURE_DIVISION "division"
|
2006-02-28 17:09:29 +01:00
|
|
|
#define FUTURE_ABSIMPORT "absolute_import"
|
2001-08-08 07:00:18 +02:00
|
|
|
|
2005-10-20 21:59:25 +02:00
|
|
|
struct _mod; /* Declare the existence of this type */
|
2005-10-23 21:06:02 +02:00
|
|
|
PyAPI_FUNC(PyCodeObject *) PyAST_Compile(struct _mod *, const char *,
|
2005-12-17 21:54:49 +01:00
|
|
|
PyCompilerFlags *, PyArena *);
|
2005-10-23 21:06:02 +02:00
|
|
|
PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
|
2005-10-20 21:59:25 +02:00
|
|
|
|
|
|
|
#define ERR_LATE_FUTURE \
|
|
|
|
"from __future__ imports must occur at the beginning of the file"
|
|
|
|
|
1993-07-28 11:05:47 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_COMPILE_H */
|