]> gitweb.factorcode.org Git - factor.git/commitdiff
core: slight revert.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 21 Nov 2020 05:15:58 +0000 (21:15 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 21 Nov 2020 05:15:58 +0000 (21:15 -0800)
core/fry/fry.factor
core/lexer/lexer.factor

index 8a06f6dd94b2c5142584afcac5da4ab23ff63f79..5c39197d5a22571a0f4fe508b4678c11401f52fe 100644 (file)
@@ -44,7 +44,7 @@ INSTANCE: fried-sequence fried
     dup callable? [ ] [ [ call ] curry ] if ; inline
 
 : [ncurry] ( n -- quot )
-    [ V{ dup callable? [ >quotation ] unless } clone ] dip (ncurry) >quotation ;
+    [ V{ } clone ] dip (ncurry) >quotation ;
 
 : [ndip] ( quot n -- quot' )
     {
index 796d1e22ecb723f17428b8bed0aa89853a945122..235a715e89b907337211f3f924085e99efffd790 100644 (file)
@@ -60,6 +60,11 @@ ERROR: unexpected want got ;
         ] [ f ] if
     ] [ f ] if ; inline
 
+: skip ( i seq ? -- n )
+    over length [
+        [ swap forbid-tab CHAR: \s eq? xor ] curry find-from drop
+    ] dip or ; inline
+
 PRIVATE>
 
 GENERIC: skip-blank ( lexer -- )
@@ -68,20 +73,14 @@ M: lexer skip-blank
     shebang? [
         [ nip length ] change-lexer-column
     ] [
-        [
-            [ [ forbid-tab CHAR: \s eq? not ] find-from drop ]
-            [ length or ] bi
-        ] change-lexer-column
+        [ t skip ] change-lexer-column
     ] if ;
 
 GENERIC: skip-word ( lexer -- )
 
 M: lexer skip-word
     [
-        2dup nth CHAR: \" eq? [ drop 1 + ] [
-            [ [ forbid-tab CHAR: \s eq? ] find-from drop ]
-            [ length or ] bi
-        ] if
+        2dup nth CHAR: \" eq? [ drop 1 + ] [ f skip ] if
     ] change-lexer-column ;
 
 : still-parsing? ( lexer -- ? )