1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
|
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
|
-
-
+
-
+
-
|
} /* lexeme handler */
/* Advance past the just-parsed lexeme */
start += scanned;
numBytes -= scanned;
} /* main parsing loop */
error:
/*
* We only get here if there's been an error. Any errors that didn't get a
* suitable parsePtr->errorType, get recorded as syntax errors.
*/
error:
if (parsePtr->errorType == TCL_PARSE_SUCCESS) {
parsePtr->errorType = TCL_PARSE_SYNTAX;
}
/*
* Free any partial parse tree we've built.
*/
if (nodes != NULL) {
ckfree((char*) nodes);
ckfree((char *) nodes);
}
if (interp == NULL) {
/*
* Nowhere to report an error message, so just free it.
*/
if (msg) {
Tcl_DecrRefCount(msg);
}
} else {
/*
* Construct the complete error message. Start with the simple error
* message, pulled from the interp result if necessary...
*/
if (msg == NULL) {
msg = Tcl_GetObjResult(interp);
|