summaryrefslogtreecommitdiffstats
path: root/Parser/node.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-03-01 22:49:05 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-03-01 22:49:05 (GMT)
commit49c5da1d88f605248167f4d95b1dfe08c1f703c7 (patch)
tree7c7c6ee02daee4f5a2dd3a3fb7b22a5910ec15d2 /Parser/node.c
parent3ffa59b137a0c1f80b5fd495cc3d25d4ef21e0c0 (diff)
downloadcpython-49c5da1d88f605248167f4d95b1dfe08c1f703c7.zip
cpython-49c5da1d88f605248167f4d95b1dfe08c1f703c7.tar.gz
cpython-49c5da1d88f605248167f4d95b1dfe08c1f703c7.tar.bz2
Patch #1440601: Add col_offset attribute to AST nodes.
Diffstat (limited to 'Parser/node.c')
-rw-r--r--Parser/node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Parser/node.c b/Parser/node.c
index 75900ce..7ed6c0e 100644
--- a/Parser/node.c
+++ b/Parser/node.c
@@ -76,7 +76,7 @@ fancy_roundup(int n)
int
-PyNode_AddChild(register node *n1, int type, char *str, int lineno)
+PyNode_AddChild(register node *n1, int type, char *str, int lineno, int col_offset)
{
const int nch = n1->n_nchildren;
int current_capacity;
@@ -103,6 +103,7 @@ PyNode_AddChild(register node *n1, int type, char *str, int lineno)
n->n_type = type;
n->n_str = str;
n->n_lineno = lineno;
+ n->n_col_offset = col_offset;
n->n_nchildren = 0;
n->n_child = NULL;
return 0;