Paste: Patch for lighter weight syntax in let
Author: | dharmatech |
Mode: | factor |
Date: | Sat, 22 Nov 2008 13:51:12 |
Plain Text |
: parse-binding ( -- pair/f )
scan
{
{ [ dup "|" = ] [ drop f ] }
{ [ dup "!" = ] [ drop lexer get next-line parse-binding ] }
{
[ t ]
[
scan
{
{ [ dup "[" = ] [ drop \ ] parse-until >quotation ] }
{ [ dup "{" = ] [ drop \ } parse-until >array 1quotation ] }
{ [ dup "[|" = ] [ drop parse-lambda ] }
{ [ dup string>number ] [ string>number 1quotation ] }
}
cond
2array
]
}
}
cond ;
New Annotation