From 411c2376c78c83dd13724a5dc9c6600771ee05fe Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 3 Dec 2017 17:09:31 -0600 Subject: [PATCH] modern: Don't keep around duplicate closing delimiters like { ")" ")" } for stack effects. --- extra/modern/modern.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/modern/modern.factor b/extra/modern/modern.factor index b7dbcd1bd2..c4e21b636d 100644 --- a/extra/modern/modern.factor +++ b/extra/modern/modern.factor @@ -3,7 +3,7 @@ USING: accessors arrays assocs combinators combinators.short-circuit continuations fry io.encodings.utf8 io.files kernel locals make math math.order modern.paths -modern.slices namespaces sequences sequences.deep +modern.slices namespaces sequences sequences.deep sets sequences.extras shuffle splitting splitting.monotonic strings unicode ; IN: modern @@ -96,7 +96,7 @@ MACRO:: read-matched ( ch -- quot: ( n string tag -- n' string slice' ) ) 2over nth-check-eof { { [ dup openstreq member? ] [ ch read-double-matched ] } ! (=( or (( { [ dup blank? ] [ - drop dup '[ _ matching-delimiter-string closestr1 2array lex-until ] dip + drop dup '[ _ matching-delimiter-string closestr1 2array members lex-until ] dip swap unclip-last 3array ] } ! ( foo ) [ drop [ slice-til-whitespace drop ] dip span-slices ] ! (foo) } cond