Code cleanup
parent
726bcb6a0b
commit
b26e6b90f5
|
@ -1,16 +1,11 @@
|
|||
|
||||
USING: kernel combinators quotations arrays sequences assocs
|
||||
locals shuffle macros fry newfx ;
|
||||
locals shuffle macros fry ;
|
||||
|
||||
IN: combinators.short-circuit
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
: short-circuit ( quots quot default -- quot )
|
||||
1quotation -rot { } map>assoc <reversed> alist>quot ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
:: n&&-rewrite ( quots N -- quot )
|
||||
quots
|
||||
[ '[ drop N ndup @ dup not ] [ drop N ndrop f ] 2array ]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: continuations destructors kernel math math.parser
|
||||
namespaces parser sequences strings prettyprint debugger
|
||||
quotations combinators combinators.lib logging calendar assocs
|
||||
quotations combinators logging calendar assocs
|
||||
fry accessors arrays io io.sockets io.encodings.ascii
|
||||
io.sockets.secure io.files io.streams.duplex io.timeouts
|
||||
io.encodings threads concurrency.combinators
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
USING: arrays combinators.lib kernel math math.functions
|
||||
USING: arrays kernel math math.functions
|
||||
math.order math.vectors namespaces opengl opengl.gl sequences ui
|
||||
ui.gadgets ui.gestures ui.render accessors ;
|
||||
IN: opengl.demo-support
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: kernel opengl.gl alien.c-types continuations namespaces
|
||||
assocs alien alien.strings libc opengl math sequences combinators
|
||||
combinators.lib macros arrays io.encodings.ascii ;
|
||||
macros arrays io.encodings.ascii ;
|
||||
IN: opengl.shaders
|
||||
|
||||
: with-gl-shader-source-ptr ( string quot -- )
|
||||
|
|
|
@ -21,9 +21,6 @@ SYMBOL: ignore-case?
|
|||
[ [ between? ] ]
|
||||
if 2curry ;
|
||||
|
||||
: or-predicates ( quots -- quot )
|
||||
[ \ dup prefix ] map [ [ t ] ] f short-circuit \ nip suffix ;
|
||||
|
||||
: <@literal ( parser obj -- action ) [ nip ] curry <@ ;
|
||||
|
||||
: <@delay ( parser quot -- action ) [ curry ] curry <@ ;
|
||||
|
@ -180,7 +177,7 @@ C: <group-result> group-result
|
|||
: 'positive-character-class' ( -- parser )
|
||||
"]" token [ CHAR: ] = ] <@literal 'character-class-term' <*> <&:>
|
||||
'character-class-term' <+> <|>
|
||||
[ or-predicates ] <@ ;
|
||||
[ [ 1|| ] curry ] <@ ;
|
||||
|
||||
: 'negative-character-class' ( -- parser )
|
||||
"^" token 'positive-character-class' &>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
USING: combinators.short-circuit unicode.categories kernel math combinators splitting
|
||||
sequences math.parser io.files io assocs arrays namespaces
|
||||
math.ranges unicode.normalize values io.encodings.ascii
|
||||
unicode.syntax unicode.data compiler.units alien.syntax sets
|
||||
combinators.lib ;
|
||||
unicode.syntax unicode.data compiler.units alien.syntax sets ;
|
||||
IN: unicode.breaks
|
||||
|
||||
C-ENUM: Any L V T Extend Control CR LF graphemes ;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
USING: io io.files splitting grouping unicode.collation
|
||||
sequences kernel io.encodings.utf8 math.parser math.order
|
||||
tools.test assocs io.streams.null words combinators.lib ;
|
||||
tools.test assocs io.streams.null words ;
|
||||
IN: unicode.collation.tests
|
||||
|
||||
: parse-test ( -- strings )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
USING: combinators.short-circuit sequences io.files io.encodings.ascii kernel values
|
||||
splitting accessors math.parser ascii io assocs strings math
|
||||
namespaces sorting combinators math.order arrays
|
||||
unicode.normalize unicode.data combinators.lib locals
|
||||
USING: combinators.short-circuit sequences io.files
|
||||
io.encodings.ascii kernel values splitting accessors math.parser
|
||||
ascii io assocs strings math namespaces sorting combinators
|
||||
math.order arrays unicode.normalize unicode.data locals
|
||||
unicode.syntax macros sequences.deep words unicode.breaks
|
||||
quotations ;
|
||||
IN: unicode.collation
|
||||
|
@ -86,7 +86,7 @@ ducet insert-helpers
|
|||
: add ( char -- )
|
||||
dup blocked? [ 1string , ] [
|
||||
dup possible-bases dup length
|
||||
[ ?combine ] 2with contains?
|
||||
[ ?combine ] with with contains?
|
||||
[ drop ] [ 1string , ] if
|
||||
] if ;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
USING: combinators.short-circuit assocs math kernel sequences io.files hashtables
|
||||
quotations splitting grouping arrays math.parser hash2 math.order
|
||||
byte-arrays words namespaces words compiler.units parser
|
||||
io.encodings.ascii values interval-maps ascii sets
|
||||
combinators.lib combinators locals math.ranges sorting ;
|
||||
USING: combinators.short-circuit assocs math kernel sequences
|
||||
io.files hashtables quotations splitting grouping arrays
|
||||
math.parser hash2 math.order byte-arrays words namespaces words
|
||||
compiler.units parser io.encodings.ascii values interval-maps
|
||||
ascii sets combinators locals math.ranges sorting ;
|
||||
IN: unicode.data
|
||||
|
||||
VALUE: simple-lower
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
USING: sequences namespaces unicode.data kernel math arrays
|
||||
locals combinators.lib sorting.insertion combinators.lib ;
|
||||
locals sorting.insertion ;
|
||||
IN: unicode.normalize
|
||||
|
||||
! Conjoining Jamo behavior
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: kernel unicode.categories combinators combinators.lib
|
||||
sequences splitting
|
||||
fry namespaces assocs arrays strings io.sockets
|
||||
io.sockets.secure io.encodings.string io.encodings.utf8
|
||||
math math.parser accessors mirrors parser strings.parser lexer
|
||||
prettyprint.backend hashtables present ;
|
||||
USING: kernel unicode.categories combinators
|
||||
combinators.short-circuit sequences splitting fry namespaces
|
||||
assocs arrays strings io.sockets io.sockets.secure
|
||||
io.encodings.string io.encodings.utf8 math math.parser accessors
|
||||
mirrors parser strings.parser lexer prettyprint.backend
|
||||
hashtables present ;
|
||||
IN: urls
|
||||
|
||||
: url-quotable? ( ch -- ? )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2007 Doug Coleman.
|
||||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: math.ranges sequences random accessors combinators.lib
|
||||
USING: math.ranges sequences random accessors
|
||||
kernel namespaces fry db.types db.tuples urls validators
|
||||
html.components html.forms http http.server.dispatchers furnace
|
||||
furnace.actions furnace.boilerplate furnace.redirection ;
|
||||
|
|
Loading…
Reference in New Issue