]> gitweb.factorcode.org Git - factor.git/commitdiff
english: removing or-markup-example.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Dec 2022 23:39:36 +0000 (15:39 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Dec 2022 23:39:36 +0000 (15:39 -0800)
basis/english/english-docs.factor
basis/english/english-tests.factor
basis/english/english.factor
extra/help/lint/coverage/coverage-docs.factor

index 9c3501df5190b8b3fb956f09ed8d1091a7ef87cb..af563758edc355e5d3a885c932bbfaf91da65601 100644 (file)
@@ -29,12 +29,10 @@ $nl
 
 "Toy grammatical words:"
 { $subsections a/an ?plural-article a10n comma-list }
-
-"An example application:"
-{ $subsections or-markup-example $or-markup-example } ;
+;
 
 { pluralize ?pluralize plural? count-of-things singularize singular? } related-words
-{ a/an ?plural-article a10n comma-list $or-markup-example or-markup-example } related-words
+{ a/an ?plural-article a10n comma-list } related-words
 
 HELP: singularize
 { $values { "word" string } { "singular" string } }
@@ -144,7 +142,7 @@ HELP: a10n
 } ;
 
 HELP: a/an
-{ $values { "word" string } { "article" { $or-markup-example "\"a\"" "\"an\"" } } }
+{ $values { "word" string } { "article" { $or "\"a\"" "\"an\"" } } }
 { $description "Gives the proper indefinite singular article (" { $emphasis "a" } " or " { $emphasis "an" } ") for the word. For words which begin with a vowel sound, " { $emphasis "an" } " is used, whereas " { $emphasis "a" } " is used for words which begin with a consonant sound." }
 { $notes "The output does not contain the input. The output of this word is always a singular article, regardless of the plurality of the input." }
 { $examples
@@ -156,7 +154,7 @@ HELP: a/an
 } ;
 
 HELP: ?plural-article
-{ $values { "word" string } { "article" { $or-markup-example "\"a\"" "\"an\"" "\"the\"" } } }
+{ $values { "word" string } { "article" { $or "\"a\"" "\"an\"" "\"the\"" } } }
 { $description "Output the proper article given the plurality and first letter of the input. Unlike " { $link a/an } " this word handles plural inputs by outputting the definite " { $emphasis "\"the\"" } ". If the input is singular as determined by " { $link singular? } " this word operates like " { $link a/an } "." }
 { $notes { $list "English lacks a plural indefinite article, so the plural definite is used here instead." $keep-case $0-plurality } }
 { $examples
@@ -187,17 +185,3 @@ HELP: comma-list
         "a cat, a peach, or an object"
     }
 } ;
-
-HELP: or-markup-example
-{ $values { "classes" "a sequence of words" } { "markup" "a sequence of markup elements" } }
-{ $description "Used to implement " { $link $or-markup-example } " and demonstrate " { $link comma-list } "." }
-{ $examples { "See the examples in " { $link $or-markup-example } "." } } ;
-
-HELP: $or-markup-example
-{ $values { "classes" "a sequence of words" } }
-{ $description "An example to demonstrate a use-case for " { $link comma-list } ". Works like the " { $link $or } " and " { $link ($instance) } " words from " { $vocab-link "help.markup" } "." }
-{ $examples
-    { $markup-example
-        { $or-markup-example "cat" "octopus" "animal" object pair number array string sequence assoc "bird" } print-element
-    }
-} ;
index ce64d889d4cf0999200b0b9621c1755063b75b93..ef533d13b4a4a21cddb1f40e598b37fdc4dd8dd8 100644 (file)
@@ -99,32 +99,3 @@ FROM: english => a/an ;
 
 { { "a" ", " "b" ", " "x" ", and " "c" } }
 [ { "a" "b" "x" "c" } "and" comma-list ] unit-test
-
-{ {
-    { "an " { $link object } } ", "
-    { "a " { $link pair } } ", "
-    { "a " { $link number } } ", "
-    { "an " { $link array } } ", "
-    { "a " { $link string } } ", "
-    { "a " { $link sequence } } ", or "
-    { "an " { $link assoc } }
-} } [
-    { object pair number array string sequence assoc }
-    or-markup-example
-    ! an object, a pair, a number, an array, a string, a sequence, or an assoc
-] unit-test
-
-{ {
-    { "an " { $link object } }
-} } [ { object } or-markup-example ] unit-test
-
-{ {
-    { "an " { $link object } } " or "
-    { "a " { $link pair } }
-} } [ { object pair } or-markup-example ] unit-test
-
-{ {
-    { "an " { $link object } } ", "
-    { "a " { $link pair } } ", or "
-    { "a " { $snippet "thing" } }
-} } [ { object pair "thing" } or-markup-example ] unit-test
index 13fd1d6ecece6ed99f76ec4d118332f32bcecd90..865a9bcae1b3bedb58e7bd0cc4368a1af90a42ec 100644 (file)
@@ -1,8 +1,7 @@
 ! Copyright (C) 2015, 2018 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
-USING: accessors arrays assocs combinators help.markup kernel
-literals math math.order math.parser sequences splitting unicode
-words ;
+USING: arrays assocs combinators kernel literals math math.order
+math.parser sequences splitting unicode ;
 IN: english
 
 <PRIVATE
@@ -175,15 +174,3 @@ CONSTANT: vowels "aeiou"
     ] dip over length dup 3 >= [
         [ 3 > ", " " " ? " " surround ] [ 2 - pick set-nth ] bi
     ] [ 2drop ] if ;
-
-: or-markup-example ( classes -- markup )
-    [
-        dup word? [
-            [ name>> ] keep \ $link
-        ] [
-            dup \ $snippet
-        ] if swap 2array [ a/an " " append ] dip 2array
-    ] map "or" comma-list ;
-
-: $or-markup-example ( classes -- )
-    or-markup-example print-element ;
index a3460a77ded6a7c6d5c092c56806e492f0a1e5d1..f51422f7f9ed61416727b8882748ce7e046e8e6b 100644 (file)
@@ -72,14 +72,12 @@ HELP: vocab-help-coverage.
     { $example
         "USING: help.lint.coverage ;"
         "\"english\" vocab-help-coverage."
-"[english] $or-markup-example: full help coverage
-[english] ?plural-article: full help coverage
+"[english] ?plural-article: full help coverage
 [english] ?pluralize: full help coverage
 [english] a/an: full help coverage
 [english] a10n: full help coverage
 [english] comma-list: full help coverage
 [english] count-of-things: full help coverage
-[english] or-markup-example: full help coverage
 [english] plural?: full help coverage
 [english] pluralize: full help coverage
 [english] singular?: full help coverage
@@ -96,14 +94,12 @@ HELP: prefix-help-coverage.
     { $example
         "USING: help.lint.coverage ;"
         "\"english\" t prefix-help-coverage."
-"[english] $or-markup-example: full help coverage
-[english] ?plural-article: full help coverage
+"[english] ?plural-article: full help coverage
 [english] ?pluralize: full help coverage
 [english] a/an: full help coverage
 [english] a10n: full help coverage
 [english] comma-list: full help coverage
 [english] count-of-things: full help coverage
-[english] or-markup-example: full help coverage
 [english] plural?: full help coverage
 [english] pluralize: full help coverage
 [english] singular?: full help coverage
@@ -126,10 +122,6 @@ HELP: <prefix-help-coverage>
         "USING: help.lint.coverage prettyprint ;"
         "\"english\" t <prefix-help-coverage> ..."
 "{
-    T{ word-help-coverage
-        { word-name $or-markup-example }
-        { 100%-coverage? t }
-    }
     T{ word-help-coverage
         { word-name ?plural-article }
         { 100%-coverage? t }
@@ -154,10 +146,6 @@ HELP: <prefix-help-coverage>
         { word-name count-of-things }
         { 100%-coverage? t }
     }
-    T{ word-help-coverage
-        { word-name or-markup-example }
-        { 100%-coverage? t }
-    }
     T{ word-help-coverage
         { word-name plural? }
         { 100%-coverage? t }
@@ -220,10 +208,6 @@ HELP: <vocab-help-coverage>
         "USING: help.lint.coverage prettyprint ;"
         "\"english\" <vocab-help-coverage> ..."
 "{
-    T{ word-help-coverage
-        { word-name $or-markup-example }
-        { 100%-coverage? t }
-    }
     T{ word-help-coverage
         { word-name ?plural-article }
         { 100%-coverage? t }
@@ -248,10 +232,6 @@ HELP: <vocab-help-coverage>
         { word-name count-of-things }
         { 100%-coverage? t }
     }
-    T{ word-help-coverage
-        { word-name or-markup-example }
-        { 100%-coverage? t }
-    }
     T{ word-help-coverage
         { word-name plural? }
         { 100%-coverage? t }