diff options
author | dgp <dgp@users.sourceforge.net> | 2006-07-05 20:42:15 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-07-05 20:42:15 (GMT) |
commit | cdc9efa44a519044e0c555101bd6630f96af2eaf (patch) | |
tree | 76eed21de9dc75f335989c5163678b834bc0134a /generic/tclParseExpr.c | |
parent | f8202fbf0e8d9c875afd03460d20b5b83c0aa10c (diff) | |
download | tcl-cdc9efa44a519044e0c555101bd6630f96af2eaf.zip tcl-cdc9efa44a519044e0c555101bd6630f96af2eaf.tar.gz tcl-cdc9efa44a519044e0c555101bd6630f96af2eaf.tar.bz2 |
Improvements to error context messages
Diffstat (limited to 'generic/tclParseExpr.c')
-rw-r--r-- | generic/tclParseExpr.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclParseExpr.c b/generic/tclParseExpr.c index 98683cc..9cbc34f 100644 --- a/generic/tclParseExpr.c +++ b/generic/tclParseExpr.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParseExpr.c,v 1.33 2006/07/05 05:34:45 dgp Exp $ + * RCS: @(#) $Id: tclParseExpr.c,v 1.34 2006/07/05 20:42:15 dgp Exp $ */ #define OLD_EXPR_PARSER 0 @@ -2293,6 +2293,8 @@ Tcl_ParseExpr( code = Tcl_ParseQuotedString(interp, start, numBytes, &scratch, 1, &end); if (code != TCL_OK) { + scanned = scratch.term - start; + scanned += (scanned < numBytes); continue; } scanned = end - start; @@ -2310,6 +2312,8 @@ Tcl_ParseExpr( case VARIABLE: code = Tcl_ParseVarName(interp, start, numBytes, &scratch, 1); if (code != TCL_OK) { + scanned = scratch.term - start; + scanned += (scanned < numBytes); continue; } tokenPtr = scratch.tokenPtr + nodePtr->token + 1; @@ -2356,11 +2360,13 @@ Tcl_ParseExpr( break; } } + end = start; + start = tokenPtr->start; if (code != TCL_OK) { + scanned = parsePtr->term - start; + scanned += (scanned < numBytes); continue; } - end = start; - start = tokenPtr->start; scanned = end - start; tokenPtr->size = scanned; scratch.numTokens++; |