locals.parser: use with-variables instead of with-scope.

char-rename
John Benediktsson 2016-12-05 16:00:37 -08:00
parent 21985232a2
commit dffdd36694
1 changed files with 5 additions and 4 deletions

View File

@ -32,11 +32,12 @@ ERROR: invalid-local-name name ;
SINGLETON: lambda-parser
: with-lambda-scope ( assoc reader-quot: ( -- quot ) -- quot )
'[
in-lambda? on
lambda-parser quotation-parser set
H{
{ in-lambda? t }
{ quotation-parser lambda-parser }
} swap '[
[ use-words @ ] [ unuse-words ] bi
] with-scope ; inline
] with-variables ; inline
: (parse-lambda) ( assoc -- quot )
[ \ ] parse-until >quotation ] with-lambda-scope ;