add polymorphic effects for lexer:each-token, map-tokens
parent
cb656c6e6b
commit
10ca2ba695
|
@ -100,10 +100,10 @@ PREDICATE: unexpected-eof < unexpected
|
|||
: (each-token) ( end quot -- pred quot )
|
||||
[ [ [ scan dup ] ] dip [ = not ] curry [ [ f ] if* ] curry compose ] dip ; inline
|
||||
|
||||
: each-token ( end quot -- )
|
||||
: each-token ( ... end quot: ( ... token -- ... ) -- ... )
|
||||
(each-token) while drop ; inline
|
||||
|
||||
: map-tokens ( end quot -- seq )
|
||||
: map-tokens ( ... end quot: ( ... token -- ... elt ) -- ... seq )
|
||||
(each-token) produce nip ; inline
|
||||
|
||||
: parse-tokens ( end -- seq )
|
||||
|
|
Loading…
Reference in New Issue