diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-08 20:49:47 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-08 20:49:47 (GMT) |
commit | 3df839da664ea2addc7ccc6d7868dc55b0ee279b (patch) | |
tree | 74ca46807bbf44eb0214c3c71c5f10d7e49e6666 /ds9/library/util.tcl | |
parent | 00025e4e4f0b0469fc6c3bd5ffb4ef3e457fd30f (diff) | |
download | blt-3df839da664ea2addc7ccc6d7868dc55b0ee279b.zip blt-3df839da664ea2addc7ccc6d7868dc55b0ee279b.tar.gz blt-3df839da664ea2addc7ccc6d7868dc55b0ee279b.tar.bz2 |
add ds9 source parser
Diffstat (limited to 'ds9/library/util.tcl')
-rw-r--r-- | ds9/library/util.tcl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl index dfb7991..5a67d90 100644 --- a/ds9/library/util.tcl +++ b/ds9/library/util.tcl @@ -1650,13 +1650,24 @@ proc ProcessSleepCmd {varname iname} { proc ProcessSourceCmd {varname iname} { upvar $varname var upvar $iname i - SourceCmd [lindex $var $i] -} -proc SourceCmd {fn} { # we need to be realized # you never know what someone will try to do ProcessRealizeDS9 + + global debug + if {$debug(tcl,parser)} { + source::YY_FLUSH_BUFFER + source::yy_scan_string [lrange $var $i end] + source::yyparse + incr i [expr $source::yycnt-1] + } else { + + uplevel #0 "source [lindex $var $i]" +} +} + +proc SourceCmd {fn} { uplevel #0 "source $fn" } |