From 128715def49e37eb73ab8abecba929109599a944 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 14 Apr 2009 17:55:58 -0500 Subject: [PATCH] Documentation updates --- basis/help/handbook/handbook.factor | 4 ++-- core/quotations/quotations-docs.factor | 1 + core/words/constant/constant-docs.factor | 12 ++++++++++++ core/words/words-docs.factor | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 core/words/constant/constant-docs.factor diff --git a/basis/help/handbook/handbook.factor b/basis/help/handbook/handbook.factor index 0845264d61..228fca4e5d 100644 --- a/basis/help/handbook/handbook.factor +++ b/basis/help/handbook/handbook.factor @@ -253,12 +253,12 @@ ARTICLE: "handbook-language-reference" "Language reference" { $subsection "conventions" } { $subsection "syntax" } { $subsection "effects" } +{ $subsection "evaluator" } "Data types:" { $subsection "booleans" } { $subsection "numbers" } { $subsection "collections" } -"Evaluation semantics:" -{ $subsection "evaluator" } +"Evaluation:" { $subsection "words" } { $subsection "shuffle-words" } { $subsection "combinators" } diff --git a/core/quotations/quotations-docs.factor b/core/quotations/quotations-docs.factor index a72f4adf88..603d6f2847 100644 --- a/core/quotations/quotations-docs.factor +++ b/core/quotations/quotations-docs.factor @@ -24,6 +24,7 @@ ARTICLE: "wrappers" "Wrappers" "Wrappers are used to push words on the data stack; they evaluate to the object being wrapped:" { $subsection wrapper } { $subsection literalize } +"Wrapper literal syntax is documented in " { $link "syntax-words" } "." { $see-also "combinators" } ; ABOUT: "quotations" diff --git a/core/words/constant/constant-docs.factor b/core/words/constant/constant-docs.factor new file mode 100644 index 0000000000..3175b5d4ff --- /dev/null +++ b/core/words/constant/constant-docs.factor @@ -0,0 +1,12 @@ +USING: help.markup help.syntax words.constant ; +IN: words.constant + +ARTICLE: "words.constant" "Constants" +"There is a syntax for defining words which push literals on the stack." +$nl +"Define a new word that pushes a literal on the stack:" +{ $subsection POSTPONE: CONSTANT: } +"Define an constant at run-time:" +{ $subsection define-constant } ; + +ABOUT: "words.constant" diff --git a/core/words/words-docs.factor b/core/words/words-docs.factor index 1ad6928acb..c20ee66de8 100644 --- a/core/words/words-docs.factor +++ b/core/words/words-docs.factor @@ -31,7 +31,7 @@ $nl { $subsection define } { $subsection define-declared } { $subsection define-inline } -"Word definitions should declare their stack effect, unless the definition is completely trivial. See " { $link "effect-declaration" } "." +"Word definitions must declare their stack effect. See " { $link "effect-declaration" } "." $nl "All other types of word definitions, such as " { $link "words.symbol" } " and " { $link "generic" } ", are just special cases of the above." ; @@ -75,6 +75,7 @@ ARTICLE: "word-definition" "Defining words" { $subsection "colon-definition" } { $subsection "words.symbol" } { $subsection "words.alias" } +{ $subsection "words.constant" } { $subsection "primitives" } { $subsection "deferred" } { $subsection "declarations" }