+++ /dev/null
-\r
-/* Parse tree node interface */\r
-\r
-#ifndef Py_NODE_H\r
-#define Py_NODE_H\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-typedef struct _node {\r
- short n_type;\r
- char *n_str;\r
- int n_lineno;\r
- int n_col_offset;\r
- int n_nchildren;\r
- struct _node *n_child;\r
-} node;\r
-\r
-PyAPI_FUNC(node *) PyNode_New(int type);\r
-PyAPI_FUNC(int) PyNode_AddChild(node *n, int type,\r
- char *str, int lineno, int col_offset);\r
-PyAPI_FUNC(void) PyNode_Free(node *n);\r
-PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n);\r
-\r
-/* Node access functions */\r
-#define NCH(n) ((n)->n_nchildren)\r
- \r
-#define CHILD(n, i) (&(n)->n_child[i])\r
-#define RCHILD(n, i) (CHILD(n, NCH(n) + i))\r
-#define TYPE(n) ((n)->n_type)\r
-#define STR(n) ((n)->n_str)\r
-\r
-/* Assert that the type of a node is what we expect */\r
-#define REQ(n, type) assert(TYPE(n) == (type))\r
-\r
-PyAPI_FUNC(void) PyNode_ListTree(node *);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-#endif /* !Py_NODE_H */\r