diff --git a/extra/central/authors.txt b/extra/central/authors.txt deleted file mode 100644 index 5645cd91bd..0000000000 --- a/extra/central/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Matthew Willis diff --git a/extra/central/central-docs.factor b/extra/central/central-docs.factor deleted file mode 100644 index 458f528c53..0000000000 --- a/extra/central/central-docs.factor +++ /dev/null @@ -1,16 +0,0 @@ -USING: central destructors help.markup help.syntax ; - -HELP: CENTRAL: -{ $description - "This parsing word defines a pair of words useful for " - "implementing the \"central\" pattern: " { $snippet "symbol" } " and " - { $snippet "with-symbol" } ". This is a middle ground between excessive " - "stack manipulation and full-out locals, meant to solve the case where " - "one object is operated on by several related words." -} ; - -HELP: DISPOSABLE-CENTRAL: -{ $description - "Like " { $link POSTPONE: CENTRAL: } ", but generates " { $snippet "with-" } - " words that are wrapped in a " { $link with-disposal } "." -} ; \ No newline at end of file diff --git a/extra/central/central-tests.factor b/extra/central/central-tests.factor deleted file mode 100644 index 17c5ee901f..0000000000 --- a/extra/central/central-tests.factor +++ /dev/null @@ -1,19 +0,0 @@ -USING: accessors central destructors kernel math tools.test ; - -IN: scratchpad - -CENTRAL: test-central - -[ 3 ] [ 3 [ test-central ] with-test-central ] unit-test - -TUPLE: test-disp-cent value disposed ; - -! A phony destructor that adds 1 to the value so we can make sure it got called. -M: test-disp-cent dispose* dup value>> 1 + >>value drop ; - -DISPOSABLE-CENTRAL: t-d-c - -: test-t-d-c ( -- n ) - test-disp-cent new 3 >>value [ t-d-c ] with-t-d-c value>> ; - -[ 4 ] [ test-t-d-c ] unit-test diff --git a/extra/central/central.factor b/extra/central/central.factor deleted file mode 100644 index f7175141dd..0000000000 --- a/extra/central/central.factor +++ /dev/null @@ -1,28 +0,0 @@ -USING: destructors kernel lexer namespaces parser sequences words ; - -IN: central - -: define-central-getter ( word -- ) - dup [ get ] curry (( -- obj )) define-declared ; - -: define-centrals ( str -- getter setter ) - [ create-in dup define-central-getter ] - [ "with-" prepend create-in dup make-inline ] bi ; - -: central-setter-def ( word with-word -- with-word quot ) - [ with-variable ] with ; - -: disposable-setter-def ( word with-word -- with-word quot ) - [ pick [ drop with-variable ] with-disposal ] with ; - -: declare-central ( with-word quot -- ) (( object quot -- )) define-declared ; - -: define-central ( word-name -- ) - define-centrals central-setter-def declare-central ; - -: define-disposable-central ( word-name -- ) - define-centrals disposable-setter-def declare-central ; - -SYNTAX: CENTRAL: ( -- ) scan define-central ; - -SYNTAX: DISPOSABLE-CENTRAL: ( -- ) scan define-disposable-central ; \ No newline at end of file diff --git a/extra/central/tags.txt b/extra/central/tags.txt deleted file mode 100644 index f4274299b1..0000000000 --- a/extra/central/tags.txt +++ /dev/null @@ -1 +0,0 @@ -extensions