diff options
| author | Omar Rizwan <omar@omar.website> | 2023-01-29 22:33:39 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2023-01-29 22:33:39 +0000 |
| commit | d67fd2ea413770aa3f97da0604a9b0189b6b8b2f (patch) | |
| tree | f8e1763d37847a95b817f121d8d29c49e801bedc /virtual-programs | |
| parent | Use `When when` to collect matches (diff) | |
| download | folk-d67fd2ea413770aa3f97da0604a9b0189b6b8b2f.tar.gz folk-d67fd2ea413770aa3f97da0604a9b0189b6b8b2f.zip | |
Clean up Do matchId handling (does this fix a bug?)
Diffstat (limited to 'virtual-programs')
| -rw-r--r-- | virtual-programs/with-all.folk | 7 |
1 files changed, 2 insertions, 5 deletions
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 } } } |
