]> gitweb.factorcode.org Git - factor.git/blob - extra/multiline/multiline-docs.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / multiline / multiline-docs.factor
1 USING: help.markup help.syntax ;
2 IN: multiline
3
4 HELP: STRING:
5 { $syntax "STRING: name\nfoo\n;" }
6 { $description "Forms a multiline string literal, or 'here document' stored in the word called name. A semicolon is used to signify the end, and that semicolon must be on a line by itself, not preceeded or followed by any whitespace. The string will have newlines in between lines but not at the end, unless there is a blank line before the semicolon." } ;
7
8 HELP: <"
9 { $syntax "<\" text \">" }
10 { $description "This forms a multiline string literal ending in \">. Unlike the " { $link POSTPONE: STRING: } " form, you can end it in the middle of a line. This construct is non-nesting. In the example above, the string would be parsed as \"text\"." } ;
11
12 { POSTPONE: <" POSTPONE: STRING: } related-words
13
14 HELP: parse-here
15 { $values { "str" "a string" } }
16 { $description "Parses a multiline string literal, as used by " { $link POSTPONE: STRING: } "." } ;
17
18 HELP: parse-multiline-string
19 { $values { "end-text" "a string delineating the end" } { "str" "the parsed string" } }
20 { $description "Parses a multiline string literal, as used by " { $link POSTPONE: <" } ". The end-text is the delimiter for the end." } ;
21
22 { parse-here parse-multiline-string } related-words