diff options
| author | dgp@users.sourceforge.net <dgp> | 2013-07-18 18:25:24 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2013-07-18 18:25:24 (GMT) |
| commit | 2c2428e0a1687b7704448aef4de32b55ab088aef (patch) | |
| tree | 054d9ea09ad9e162f640d47306181917d0f14df2 | |
| parent | c1231598266ea0b2f4849f4c24ad8ee532f44099 (diff) | |
| download | tcl-2c2428e0a1687b7704448aef4de32b55ab088aef.zip tcl-2c2428e0a1687b7704448aef4de32b55ab088aef.tar.gz tcl-2c2428e0a1687b7704448aef4de32b55ab088aef.tar.bz2 | |
[assemble] compile syntax error into bytecode reporting syntax error message.
| -rw-r--r-- | generic/tclAssembly.c | 10 |
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; /* |
