source: vendor/python/2.5/Include/compile.h

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 1.0 KB
Line 
1
2#ifndef Py_COMPILE_H
3#define Py_COMPILE_H
4
5#include "code.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11/* Public interface */
12struct _node; /* Declare the existence of this type */
13PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
14
15/* Future feature support */
16
17typedef struct {
18 int ff_features; /* flags set by future statements */
19 int ff_lineno; /* line number of last future statement */
20} PyFutureFeatures;
21
22#define FUTURE_NESTED_SCOPES "nested_scopes"
23#define FUTURE_GENERATORS "generators"
24#define FUTURE_DIVISION "division"
25#define FUTURE_ABSOLUTE_IMPORT "absolute_import"
26#define FUTURE_WITH_STATEMENT "with_statement"
27
28struct _mod; /* Declare the existence of this type */
29PyAPI_FUNC(PyCodeObject *) PyAST_Compile(struct _mod *, const char *,
30 PyCompilerFlags *, PyArena *);
31PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
32
33#define ERR_LATE_FUTURE \
34"from __future__ imports must occur at the beginning of the file"
35
36#ifdef __cplusplus
37}
38#endif
39#endif /* !Py_COMPILE_H */
Note: See TracBrowser for help on using the repository browser.