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