From c08913902e0e02aac4ea1e1377fa40d0d43ddf63 Mon Sep 17 00:00:00 2001 From: griffin Date: Sat, 25 Feb 2017 16:22:18 +0000 Subject: Some cleanup --- generic/tclCompExpr.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 7074253..9c42ee9 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -743,17 +743,19 @@ ParseExpr( */ Tcl_Parse vparse; - const char *varend, *varstart = &start[TclParseAllWhiteSpace(start, numBytes)]; + const char *varend; + const char *varstart = &start[TclParseAllWhiteSpace(start, numBytes)]; int code, len; - TclParseInit(interp, varstart, numBytes, &vparse); code = Tcl_ParseVarName(NULL, varstart, numBytes, &vparse, 0); - if (code != TCL_OK) { - //fprintf(stderr, "Replace me with proper error!\n"); - } len = vparse.tokenPtr[0].size; varend = varstart+len; Tcl_FreeParse(&vparse); + /* + * An error here just means it's not a valid variable name, + * so continue on to treat as a function + */ + /* Look ahead for Assignment operator ':=' */ if (code == TCL_OK && varend[TclParseAllWhiteSpace(varend,numBytes-len)] == ':' && -- cgit v0.12