diff --git a/basis/locals/parser/parser-tests.factor b/basis/locals/parser/parser-tests.factor index 003db59135..50ba01c4a3 100644 --- a/basis/locals/parser/parser-tests.factor +++ b/basis/locals/parser/parser-tests.factor @@ -59,17 +59,6 @@ IN: locals.parser.tests ] unit-test << -! with-lambda-scope -{ t } [ - [ - qualified-vocabs length - H{ } clone [ - "hey there!" qualified-vocabs push [ ] - ] with-lambda-scope drop - qualified-vocabs length = - ] with-compilation-unit -] unit-test - { "V{ 99 :> kkk kkk }" } [ diff --git a/basis/locals/parser/parser.factor b/basis/locals/parser/parser.factor index fdc588ca7c..3036bcb7cb 100644 --- a/basis/locals/parser/parser.factor +++ b/basis/locals/parser/parser.factor @@ -1,10 +1,9 @@ ! Copyright (C) 2007, 2009 Slava Pestov, Eduardo Cavazos. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays assocs assocs.private combinators +USING: accessors arrays assocs combinators continuations effects.parser fry generic.parser kernel lexer locals.errors -locals.rewrite.closures locals.types make math namespaces -namespaces.private parser quotations sequences splitting -vocabs.parser words ; +locals.rewrite.closures locals.types make namespaces parser +quotations sequences splitting vocabs.parser words ; IN: locals.parser SYMBOL: in-lambda? @@ -32,24 +31,13 @@ ERROR: invalid-local-name name ; SINGLETON: lambda-parser -: prev-manifest ( -- manifest ) - manifest namestack* [ length 2 - ] keep (assoc-stack) ; - -: update-manifest ( manifest -- ) - [ prev-manifest ] dip { - [ search-vocab-names>> >>search-vocab-names ] - [ search-vocabs>> >>search-vocabs ] - [ auto-used>> >>auto-used ] - } cleave drop ; - : with-lambda-scope ( assoc reader-quot: ( -- quot ) -- quot ) '[ in-lambda? on lambda-parser quotation-parser set - manifest [ clone ] change use-words @ - manifest get - ] with-scope update-manifest ; inline + qualified-vocabs pop* ! can't use unuse-words here + ] with-scope ; inline : (parse-lambda) ( assoc -- quot ) [ \ ] parse-until >quotation ] with-lambda-scope ;