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