summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-08 14:31:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-08 14:31:14 (GMT)
commit4e5f3c749a2ed1b7c44cb7d1040ed19b03898b18 (patch)
tree3d753806c65489ef5ce0594ad8c65e43d478a8e9 /generic/tclCompile.c
parent8c921604d322085580d89c7d1d5e0b887cd10de5 (diff)
downloadtcl-4e5f3c749a2ed1b7c44cb7d1040ed19b03898b18.zip
tcl-4e5f3c749a2ed1b7c44cb7d1040ed19b03898b18.tar.gz
tcl-4e5f3c749a2ed1b7c44cb7d1040ed19b03898b18.tar.bz2
The routines StartExpanding() and EnterCmdWordData() are orthogonal, so it's
ok to reverse the order in which they are called.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 5aab69c..0dc30e2 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1802,10 +1802,6 @@ CompileCommandTokens(
EnterCmdStartData(envPtr, cmdIdx,
parsePtr->commandStart - envPtr->source, startCodeOffset);
- if (expand && !cmdPtr) {
- StartExpanding(envPtr);
- }
-
/*
* TIP #280. Scan the words and compute the extended location
* information. The map first contain full per-word line
@@ -1823,6 +1819,9 @@ CompileCommandTokens(
envPtr->line = eclPtr->loc[wlineat].line[0];
envPtr->clNext = eclPtr->loc[wlineat].next[0];
+ if (expand && !cmdPtr) {
+ StartExpanding(envPtr);
+ }
if (cmdPtr) {
int savedNumCmds = envPtr->numCommands;
int update = 0;