From e53d02bc5e65e64c8442e8657929114309baf12e Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Sat, 22 Nov 2008 06:45:12 -0600 Subject: [PATCH] locals: Allow comments in binding forms --- basis/locals/locals.factor | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/basis/locals/locals.factor b/basis/locals/locals.factor index 1e205e10b0..6e7f660a66 100644 --- a/basis/locals/locals.factor +++ b/basis/locals/locals.factor @@ -289,14 +289,18 @@ SYMBOL: in-lambda? \ ] (parse-lambda) ; : parse-binding ( -- pair/f ) - scan dup "|" = [ - drop f - ] [ - scan { - { "[" [ \ ] parse-until >quotation ] } - { "[|" [ parse-lambda ] } - } case 2array - ] if ; + scan { + { [ dup "|" = ] [ drop f ] } + { [ dup "!" = ] [ drop lexer get next-line parse-binding ] } + { [ t ] + [ + scan { + { "[" [ \ ] parse-until >quotation ] } + { "[|" [ parse-lambda ] } + } case 2array + ] + } + } cond ; : (parse-bindings) ( -- ) parse-binding [