From 2773cbf889be52c4ba2051f31546314dce6b03e2 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 3 Sep 2017 13:28:39 -0500 Subject: [PATCH] modern.out: Add a word to keep spacing correct when refactoring. "math" [ dup { [ slice? ] [ seq>> string? ] } 1&& [ dup >upper ] when ] rewrite-vocab --- extra/modern/out/out.factor | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/extra/modern/out/out.factor b/extra/modern/out/out.factor index 91ed64b73e..64d9f129d6 100644 --- a/extra/modern/out/out.factor +++ b/extra/modern/out/out.factor @@ -1,11 +1,14 @@ ! Copyright (C) 2017 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays assocs io io.encodings.utf8 io.files -io.streams.string kernel modern modern.paths modern.slices -multiline namespaces prettyprint sequences sequences.extras -splitting strings continuations fry ; +USING: accessors arrays assocs constructors continuations fry io +io.encodings.utf8 io.files io.streams.string kernel modern +modern.paths modern.slices multiline namespaces prettyprint +sequences sequences.extras splitting strings ; IN: modern.out +TUPLE: renamed slice string ; +CONSTRUCTOR: renamed ( slice string -- obj ) ; + : trim-before-newline ( seq -- seq' ) dup [ char: \s = not ] find { char: \r char: \n } member? @@ -19,7 +22,7 @@ IN: modern.out GENERIC: write-literal* ( last obj -- last' ) M: slice write-literal* [ write-whitespace ] [ write ] [ ] tri ; M: array write-literal* [ write-literal* ] each ; -M: string write-literal* [ write-whitespace ] [ write ] [ ] tri ; ! for refactoring +M: renamed write-literal* [ slice>> write-whitespace ] [ string>> write ] [ slice>> ] tri ; ! for refactoring