From d67fd2ea413770aa3f97da0604a9b0189b6b8b2f Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Sun, 29 Jan 2023 17:33:39 -0500 Subject: Clean up Do matchId handling (does this fix a bug?) --- virtual-programs/with-all.folk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'virtual-programs') diff --git a/virtual-programs/with-all.folk b/virtual-programs/with-all.folk index 908d6c72..6c58311f 100644 --- a/virtual-programs/with-all.folk +++ b/virtual-programs/with-all.folk @@ -1,7 +1,7 @@ Wish $this has filename "with-all.folk" set ::collectedMatches [dict create] -When when the collected matches for /clause/ are /matches/ /body/ with environment /e/ { +When when the collected matches for /clause/ are /matchesVar/ /body/ with environment /e/ { set varNames [lmap word $clause {expr { [regexp {^/([^/ ]+)/$} $word -> varName] ? $varName : [continue] }}] @@ -15,12 +15,9 @@ When when the collected matches for /clause/ are /matches/ /body/ with environme When $::nodename has step count /c/ { set matchId $::matchId Before convergence { - if {[dict exists $Statements::matches $matchId] && - [dict exists $::collectedMatches $clause]} { - set oldMatchId $::matchId; set ::matchId $matchId + if {[dict exists $::collectedMatches $clause]} { set matches [dict get $::collectedMatches $clause] Say the collected matches for $clause are [dict keys $matches] - set ::matchId $oldMatchId } } } -- cgit v1.2.3