Don't print the line number for syntax errors in string parsing.

This commit is contained in:
Guido van Rossum 1991-06-03 11:02:09 +00:00
parent 301f1a6f79
commit 326f582763
1 changed files with 3 additions and 0 deletions

View File

@ -54,10 +54,13 @@ parsestring(s, g, start, n_ret)
return E_NOMEM; return E_NOMEM;
} }
ret = parsetok(tok, g, start, n_ret); ret = parsetok(tok, g, start, n_ret);
/*
XXX Need a more sophisticated way to report the line number.
if (ret == E_TOKEN || ret == E_SYNTAX) { if (ret == E_TOKEN || ret == E_SYNTAX) {
fprintf(stderr, "String parsing error at line %d\n", fprintf(stderr, "String parsing error at line %d\n",
tok->lineno); tok->lineno);
} }
*/
tok_free(tok); tok_free(tok);
return ret; return ret;
} }