summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-18 18:25:24 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-18 18:25:24 (GMT)
commitf06af4fe86a953a20b9ef90f5605331707370765 (patch)
tree054d9ea09ad9e162f640d47306181917d0f14df2 /generic
parent64759df0b78b38806d06382708eaebe16ce7c07e (diff)
downloadtcl-f06af4fe86a953a20b9ef90f5605331707370765.zip
tcl-f06af4fe86a953a20b9ef90f5605331707370765.tar.gz
tcl-f06af4fe86a953a20b9ef90f5605331707370765.tar.bz2
[assemble] compile syntax error into bytecode reporting syntax error message.dgp_tcs_rewrite
Diffstat (limited to 'generic')
-rw-r--r--generic/tclAssembly.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index 0722eb9..9b9b6f8 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -930,7 +930,7 @@ TclCompileAssembleCmd(
{
Tcl_Token *tokenPtr; /* Token in the input script */
-#if 0
+#if 1
int numCommands = envPtr->numCommands;
int offset = envPtr->codeNext - envPtr->codeStart;
int depth = envPtr->currStackDepth;
@@ -956,11 +956,7 @@ TclCompileAssembleCmd(
if (TCL_ERROR == TclAssembleCode(envPtr, tokenPtr[1].start,
tokenPtr[1].size, TCL_EVAL_DIRECT)) {
- /*
- * TODO: Finish working out how to capture syntax errors captured
- * during compile and make them bytecode reporting the error.
- */
-#if 0
+#if 1
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (\"%.*s\" body, line %d)",
parsePtr->tokenPtr->size, parsePtr->tokenPtr->start,
@@ -1136,7 +1132,7 @@ NewAssemblyEnv(
assemEnvPtr->envPtr = envPtr;
assemEnvPtr->parsePtr = parsePtr;
- assemEnvPtr->cmdLine = envPtr->line;
+ assemEnvPtr->cmdLine = 1;
assemEnvPtr->clNext = envPtr->clNext;
/*