a small cleanup in retro-describe

FossilOrigin-Name: 9db02bdfb9a4ba3a08bad22f3e5adb0eb33e95cb3926a631acf98006db7cabd7
This commit is contained in:
crc 2021-06-21 03:15:12 +00:00
parent 37c4486d4f
commit 5ec4cc202a

View file

@ -26,7 +26,7 @@ script:arguments n:zero? [ #0 unix:exit ] if
~~~ ~~~
~~~ ~~~
#167 'DATA-START const #166 'DATA-START const
~~~ ~~~
# Data File # Data File
@ -144,13 +144,12 @@ the description.
'Target var 'Target var
'LineNumber var 'LineNumber var
:matched? (-f) field:name @Target s:eq? ; :matched? (-f) field:name @Target s:eq? ;
:entry? (-f) :entry? (-f) @LineNumber DATA-START gteq? &LineNumber v:inc ;
@LineNumber DATA-START gteq? &LineNumber v:inc ; :process (-) &Heap [ s:keep !SourceLine matched? [ display-result ] if ] v:preserve ;
---reveal--- ---reveal---
:find-and-display-entry :find-and-display-entry
#0 !LineNumber #0 !LineNumber s:keep !Target
s:keep !Target script:name [ entry? [ process ] [ drop ] choose ] file:for-each-line nl ;
script:name [ &Heap [ s:keep !SourceLine entry? 0; drop matched? [ display-result ] if ] v:preserve ] file:for-each-line nl ;
}} }}
~~~ ~~~