]> gitweb.factorcode.org Git - factor.git/commitdiff
use suffix! and append!.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 3 Dec 2014 19:37:34 +0000 (11:37 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 3 Dec 2014 19:37:34 +0000 (11:37 -0800)
core/io/streams/c/c.factor
core/strings/parser/parser.factor
extra/literate/literate.factor
extra/sequences/extras/extras.factor

index 464c9b83e39c6b8fbc8a69361816c74f2d7f0506..59f009194e8a8c28c97aeb4cc700e8523125738e 100644 (file)
@@ -43,7 +43,7 @@ M: c-reader stream-read1
 : read-until-loop ( handle seps accum -- accum ch )
     pick fgetc dup [
         pick dupd member-eq?
-        [ [ 2drop ] 2dip ] [ over push read-until-loop ] if
+        [ [ 2drop ] 2dip ] [ suffix! read-until-loop ] if
     ] [
         [ 2drop ] 2dip
     ] if ; inline recursive
index 3e045f629776545151f419f9bf0612212d881554..b4895c4f6835c3b1ccb5877ec824eef563a6c7aa 100644 (file)
@@ -54,11 +54,11 @@ name>char-hook [
 : (unescape-string) ( accum str i/f -- accum )
     { sbuf object object } declare
     [
-        cut-slice [ over push-all ] dip
-        rest-slice next-escape [ over push ] dip
+        cut-slice [ append! ] dip
+        rest-slice next-escape [ suffix! ] dip
         CHAR: \\ over index (unescape-string)
     ] [
-        over push-all
+        append!
     ] if* ;
 
 PRIVATE>
@@ -73,11 +73,11 @@ PRIVATE>
 : (parse-string) ( accum str -- accum m )
     { sbuf slice } declare
     dup [ "\"\\" member? ] find [
-        [ cut-slice [ over push-all ] dip rest-slice ] dip
+        [ cut-slice [ append! ] dip rest-slice ] dip
         CHAR: " = [
             from>>
         ] [
-            next-escape [ over push ] dip (parse-string)
+            next-escape [ suffix! ] dip (parse-string)
         ] if
     ] [
         "Unterminated string" throw
index 054cb1699cdf4335a4613ef48a18a412579d0828..e3ad04fadcd9b9c58578a44113b1de6c1c6f5097 100644 (file)
@@ -21,5 +21,5 @@ M: literate-lexer skip-blank
 
 SYNTAX: <LITERATE
     "LITERATE>" parse-multiline-string string-lines [
-        <literate-lexer> (parse-lines) over push-all
+        <literate-lexer> (parse-lines) append!
     ] with-nested-compilation-unit ;
index 9c7d7a557abfe01073abf0a0d5f568bf37bb4d31..992deb521bf1db2297144fae9fa7594e22bf5d77 100644 (file)
@@ -173,7 +173,7 @@ PRIVATE>
     [ appender-for [ each ] dip ] keep like ; inline
 
 : >resizable ( seq -- accum ) ! fixes map-concat "cannot apply call to run-time..."
-    [ length ] keep [ new-resizable ] [ over push-all ] bi ;
+    [ length ] keep [ new-resizable ] [ append! ] bi ;
 
 : map-concat ( ... seq quot: ( ... elt -- ... newelt ) -- ... newseq )
     over empty? [ 2drop { } ] [