modern.out: Add a <renamed> word to keep spacing correct when
refactoring. "math" [ dup { [ slice? ] [ seq>> string? ] } 1&& [ dup >upper <renamed> ] when ] rewrite-vocabmodern-harvey2
parent
9a983d611f
commit
2773cbf889
|
@ -1,11 +1,14 @@
|
||||||
! Copyright (C) 2017 Doug Coleman.
|
! Copyright (C) 2017 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays assocs io io.encodings.utf8 io.files
|
USING: accessors arrays assocs constructors continuations fry io
|
||||||
io.streams.string kernel modern modern.paths modern.slices
|
io.encodings.utf8 io.files io.streams.string kernel modern
|
||||||
multiline namespaces prettyprint sequences sequences.extras
|
modern.paths modern.slices multiline namespaces prettyprint
|
||||||
splitting strings continuations fry ;
|
sequences sequences.extras splitting strings ;
|
||||||
IN: modern.out
|
IN: modern.out
|
||||||
|
|
||||||
|
TUPLE: renamed slice string ;
|
||||||
|
CONSTRUCTOR: <renamed> renamed ( slice string -- obj ) ;
|
||||||
|
|
||||||
: trim-before-newline ( seq -- seq' )
|
: trim-before-newline ( seq -- seq' )
|
||||||
dup [ char: \s = not ] find
|
dup [ char: \s = not ] find
|
||||||
{ char: \r char: \n } member?
|
{ char: \r char: \n } member?
|
||||||
|
@ -19,7 +22,7 @@ IN: modern.out
|
||||||
GENERIC: write-literal* ( last obj -- last' )
|
GENERIC: write-literal* ( last obj -- last' )
|
||||||
M: slice write-literal* [ write-whitespace ] [ write ] [ ] tri ;
|
M: slice write-literal* [ write-whitespace ] [ write ] [ ] tri ;
|
||||||
M: array write-literal* [ write-literal* ] each ;
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue