]> gitweb.factorcode.org Git - factor.git/commitdiff
Removing "to:" syntax from values.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 26 Sep 2011 18:08:26 +0000 (11:08 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 26 Sep 2011 18:08:26 +0000 (11:08 -0700)
Squashed commit of the following:

commit 18fef6bfa59f71dcb63b439f631c735848a9bbbb
Author: John Benediktsson <mrjbq7@gmail.com>
Date:   Mon Sep 26 11:02:26 2011 -0700

    vocabs.metadata: revert mistaken change.

commit 496b103b54034ea953882a039c08847d0eda0bb4
Author: John Benediktsson <mrjbq7@gmail.com>
Date:   Sun Sep 25 19:03:54 2011 -0700

    values: Removing "to:" syntax.

14 files changed:
basis/io/encodings/gb18030/gb18030.factor
basis/io/encodings/iso2022/iso2022.factor
basis/io/encodings/shift-jis/shift-jis.factor
basis/tools/deploy/test/6/6.factor
basis/unicode/breaks/breaks.factor
basis/unicode/collation/collation.factor
basis/unicode/data/data.factor
basis/unicode/script/script.factor
basis/values/values-docs.factor
basis/values/values-tests.factor
basis/values/values.factor
basis/xml/entities/html/html.factor
unmaintained/4DNav/4DNav.factor
unmaintained/adsoda/adsoda.factor

index 512b52ef19e85f165c0022e73139f4a982095c12..32b3e1787c2a0fe8295117ad222dc175d482ae10 100644 (file)
@@ -84,8 +84,8 @@ VALUE: mapping
 
 "vocab:io/encodings/gb18030/gb-18030-2000.xml"
 ascii <file-reader> xml>gb-data
-[ ranges-u>gb to: u>gb ] [ ranges-gb>u to: gb>u ] bi
->biassoc to: mapping
+[ ranges-u>gb \ u>gb set-value ] [ ranges-gb>u \ gb>u set-value ] bi
+>biassoc \ mapping set-value
 
 : lookup-range ( char -- byte-array )
     dup u>gb interval-at [
index 4f092d628246fbb13aeb39fb98682140d77180ab..874ee2378fe6dbaa940b8a93fd55d72b1321b334 100644 (file)
@@ -13,12 +13,12 @@ VALUE: jis201
 VALUE: jis208
 VALUE: jis212
 
-"vocab:io/encodings/iso2022/201.txt" flat-file>biassoc to: jis201
-"vocab:io/encodings/iso2022/208.txt" flat-file>biassoc to: jis208
-"vocab:io/encodings/iso2022/212.txt" flat-file>biassoc to: jis212
+"vocab:io/encodings/iso2022/201.txt" flat-file>biassoc \ jis201 set-value
+"vocab:io/encodings/iso2022/208.txt" flat-file>biassoc \ jis208 set-value
+"vocab:io/encodings/iso2022/212.txt" flat-file>biassoc \ jis212 set-value
 
 VALUE: ascii
-128 iota unique >biassoc to: ascii
+128 iota unique >biassoc \ ascii set-value
 
 TUPLE: iso2022-state type ;
 
index 99cfa26d126c42e01204ad307aa4ab2995c30c43..efb57d828694516e2e9f53b628eed39f36106eb8 100644 (file)
@@ -36,10 +36,10 @@ TUPLE: jis assoc ;
     flat-file>biassoc [ nip ] assoc-filter jis boa ;
 
 "vocab:io/encodings/shift-jis/CP932.txt"
-make-jis to: windows-31j-table
+make-jis \ windows-31j-table set-value
 
 "vocab:io/encodings/shift-jis/sjis-0208-1997-std.txt"
-make-jis to: shift-jis-table
+make-jis \ shift-jis-table set-value
 
 : small? ( char -- ? )
     ! ASCII range or single-byte halfwidth katakana
index da64bb646c20003624e37d0773b90d78f51de8ad..7d5b4f4fba736f5847e246e250215d6d3a3eda6c 100644 (file)
@@ -6,8 +6,8 @@ VALUE: x
 VALUE: y
 
 : deploy-test-6 ( -- )
-    1 to: x
-    2 to: y
+    1 \ x set-value
+    2 \ y set-value
     x y + 3 assert= ;
 
 MAIN: deploy-test-6
index b0943a7f984e0f901c1772ac71fddf8c71a364b5..5f31ca81fded75f6c756ee849c0765ea1bc92133 100644 (file)
@@ -134,14 +134,14 @@ PRIVATE>
 
 graphemes init-table table
 [ make-grapheme-table finish-table ] with-variable
-to: grapheme-table
+\ grapheme-table set-value
 
 ! Word breaks
 
 VALUE: word-break-table
 
 "vocab:unicode/data/WordBreakProperty.txt" load-interval-file
-to: word-break-table
+\ word-break-table set-value
 
 CONSTANT: wOther 0
 CONSTANT: wCR 1
@@ -198,7 +198,7 @@ VALUE: word-table
 
 words init-table table
 [ make-word-table finish-word-table ] with-variable
-to: word-table
+\ word-table set-value
 
 : word-table-nth ( class1 class2 -- ? )
     word-table nth nth ;
index 2c29de3f28ac54985e76669c50141adcf27bed08..05338c8ea410a5f855c5714c90908fa77f94d60d 100644 (file)
@@ -25,7 +25,7 @@ TUPLE: weight primary secondary tertiary ignorable? ;
 : parse-ducet ( file -- ducet )\r
     data [ [ parse-keys ] [ parse-weight ] bi* ] H{ } assoc-map-as ;\r
 \r
-"vocab:unicode/collation/allkeys.txt" parse-ducet to: ducet\r
+"vocab:unicode/collation/allkeys.txt" parse-ducet \ ducet set-value\r
 \r
 ! Fix up table for long contractions\r
 : help-one ( assoc key -- )\r
index dc6c4bfd991cc5b92dc48c50a4361409942ee9fa..70250d99138cf60118ce5c93296a0e3844e36335 100644 (file)
@@ -198,14 +198,14 @@ C: <code-point> code-point
     [ [ set-code-point ] each ] H{ } make-assoc ;
 
 load-data {
-    [ process-names to: name-map ]
-    [ 13 swap process-data to: simple-lower ]
-    [ 12 swap process-data to: simple-upper ]
-    [ 14 swap process-data simple-upper assoc-union to: simple-title ]
-    [ process-combining to: class-map ]
-    [ process-canonical to: canonical-map to: combine-map ]
-    [ process-compatibility to: compatibility-map ]
-    [ process-category to: category-map ]
+    [ process-names \ name-map set-value ]
+    [ 13 swap process-data \ simple-lower set-value ]
+    [ 12 swap process-data \ simple-upper set-value ]
+    [ 14 swap process-data simple-upper assoc-union \ simple-title set-value ]
+    [ process-combining \ class-map set-value ]
+    [ process-canonical \ canonical-map set-value \ combine-map set-value ]
+    [ process-compatibility \ compatibility-map set-value ]
+    [ process-category \ category-map set-value ]
 } cleave
 
 : postprocess-class ( -- )
@@ -215,9 +215,9 @@ load-data {
 
 postprocess-class
 
-load-special-casing to: special-casing
+load-special-casing \ special-casing set-value
 
-load-properties to: properties
+load-properties \ properties set-value
 
 [ name>char [ "Invalid character" throw ] unless* ]
 name>char-hook set-global
index 4243c816234ffb5de1eb0c5d642b243ff426c380..2cd3eade17f544caf1c96a006c546744564a76e3 100644 (file)
@@ -8,7 +8,7 @@ IN: unicode.script
 VALUE: script-table
 
 "vocab:unicode/script/Scripts.txt" load-interval-file
-to: script-table
+\ script-table set-value
 
 PRIVATE>
 
index 880dcf3d8a24f15a46dfebb37fff5a0b9cf4d4d1..d3491af0d27d9746bc4b28989d3f583ee094ffe7 100644 (file)
@@ -8,7 +8,6 @@ ARTICLE: "values" "Global values"
 { $subsections\r
     get-value\r
     set-value\r
-    POSTPONE: to:\r
     change-value\r
 } ;\r
 \r
@@ -17,13 +16,13 @@ ABOUT: "values"
 HELP: VALUE:\r
 { $syntax "VALUE: word" }\r
 { $values { "word" "a word to be created" } }\r
-{ $description "Creates a value on the given word, initializing it to hold " { $snippet "f" } ". To get the value, just run the word. To set it, use " { $link POSTPONE: to: } "." }\r
+{ $description "Creates a value on the given word, initializing it to hold " { $snippet "f" } ". To get the value, just run the word. To set it, use " { $link set-value } "." }\r
 { $examples\r
   { $example\r
     "USING: values math prettyprint ;"\r
     "IN: scratchpad"\r
     "VALUE: x"\r
-    "2 2 + to: x"\r
+    "2 2 + \ x set-value"\r
     "x ."\r
     "4"\r
   }\r
@@ -37,17 +36,6 @@ HELP: set-value
 { $values { "value" "a new value" } { "word" "a value word" } }\r
 { $description "Sets a value word." } ;\r
 \r
-HELP: to:\r
-{ $syntax "... to: value" }\r
-{ $values { "word" "a value word" } }\r
-{ $description "Sets a value word." }\r
-{ $notes\r
-    "Note that"\r
-    { $code "foo to: value" }\r
-    "is just sugar for"\r
-    { $code "foo \\ value set-value" }\r
-} ;\r
-\r
 HELP: change-value\r
 { $values { "word" "a value word" } { "quot" { $quotation "( oldvalue -- newvalue )" } } }\r
 { $description "Changes the value using the given quotation." } ;\r
index 74c63e3d8f23558608ca8386a1c1b3753d5fd486..943b5f009853666511fafb46af9a295b1d84e6e7 100644 (file)
@@ -3,7 +3,7 @@ IN: values.tests
 \r
 VALUE: foo\r
 [ f ] [ foo ] unit-test\r
-[ ] [ 3 to: foo ] unit-test\r
+[ ] [ 3 \ foo set-value ] unit-test\r
 [ 3 ] [ foo ] unit-test\r
 [ ] [ \ foo [ 1 + ] change-value ] unit-test\r
 [ 4 ] [ foo ] unit-test\r
index 61217b10379f90544b675f919576c491bdd7aea0..8154c7db59d1e1ca214b04496103bc726c3265b7 100644 (file)
@@ -43,10 +43,6 @@ M: value-word definition drop f ;
 : set-value ( value word -- )
     def>> first obj<< ;
 
-SYNTAX: to:
-    scan-word literalize suffix!
-    \ set-value suffix! ;
-
 : get-value ( word -- value )
     def>> first obj>> ;
 
index fd8480307a6626d6610a9e1045d8eb21a9047ffe..7b14daa7afb401a344ab43498c8ecee34401bfe8 100644 (file)
@@ -15,7 +15,7 @@ VALUE: html-entities
         read-entities-file
     ] map first3 assoc-union assoc-union ;
 
-get-html to: html-entities
+get-html \ html-entities set-value
 
 : with-html-entities ( quot -- )
     html-entities swap with-entities ; inline
index b9679ec26beddbd600ad4b86b9e35f8538bd4235..d0901c8d5737c6c8a725803f4c53aba77793e192 100644 (file)
@@ -61,8 +61,8 @@ VALUE: selected-file
 VALUE: translation-step\r
 VALUE: rotation-step\r
 \r
-3 to: translation-step \r
-5 to: rotation-step\r
+3 \ translation-step set-value\r
+5 \ rotation-step set-value\r
 \r
 VAR: selected-file-model\r
 VAR: observer3d \r
index cc09ad52813e4df2fbabc61f431e77f168549c54..a89c4880e1309d38375a391d3e5c1a7a3ed11b24 100644 (file)
@@ -48,10 +48,10 @@ VALUE: VERY-SMALL-NUM
 VALUE: ZERO-VALUE\r
 VALUE: MAX-FACE-PER-CORNER\r
 \r
-t to: remove-hidden-solids?\r
-0.0000001 to: VERY-SMALL-NUM\r
-0.0000001 to: ZERO-VALUE\r
-4 to: MAX-FACE-PER-CORNER\r
+t \ remove-hidden-solids? set-value\r
+0.0000001 \ VERY-SMALL-NUM set-value\r
+0.0000001 \ ZERO-VALUE set-value\r
+4 \ MAX-FACE-PER-CORNER set-value\r
 ! -------------------------------------------------------------\r
 ! sequence complement\r
 \r