From d4efd9eb1534eeead7f56c89d1b5e394d8633990 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 20 Sep 2010 23:02:10 +0000 Subject: add column offset to all syntax errors --- Python/future.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Python/future.c') diff --git a/Python/future.c b/Python/future.c index 515dcd9dc6..551edc6085 100644 --- a/Python/future.c +++ b/Python/future.c @@ -44,12 +44,12 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename) } else if (strcmp(feature, "braces") == 0) { PyErr_SetString(PyExc_SyntaxError, "not a chance"); - PyErr_SyntaxLocation(filename, s->lineno); + PyErr_SyntaxLocationEx(filename, s->lineno, s->col_offset); return 0; } else { PyErr_Format(PyExc_SyntaxError, UNDEFINED_FUTURE_FEATURE, feature); - PyErr_SyntaxLocation(filename, s->lineno); + PyErr_SyntaxLocationEx(filename, s->lineno, s->col_offset); return 0; } } @@ -98,8 +98,7 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename) if (done) { PyErr_SetString(PyExc_SyntaxError, ERR_LATE_FUTURE); - PyErr_SyntaxLocation(filename, - s->lineno); + PyErr_SyntaxLocationEx(filename, s->lineno, s->col_offset); return 0; } if (!future_check_features(ff, s, filename)) -- cgit v1.2.1