summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index e09ea1e..5878d5a 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -5149,9 +5149,21 @@ TclEvalEx(
if (code != TCL_OK) {
break;
}
+
+ if (tokenPtr->type == TCL_TOKEN_COMMENT_WORD) {
+ /*
+ * TIP #???. Word comments are handled by pretending
+ * that they are expansions of the empty list.
+ * There is probably a less roundabout way to achieve
+ * the same end, though.
+ */
+
+ Tcl_ResetResult(interp);
+ }
+
objv[objectsUsed] = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objv[objectsUsed]);
- if (tokenPtr->type == TCL_TOKEN_EXPAND_WORD) {
+ if (tokenPtr->type & (TCL_TOKEN_EXPAND_WORD | TCL_TOKEN_COMMENT_WORD)) {
int numElements;
code = TclListObjLength(interp, objv[objectsUsed],