1 USING: help.markup help.syntax ;
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." } ;
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\"." } ;
13 { $syntax "/* comment */" }
14 { $description "Provides C-like comments that can span multiple lines. One caveat is that " { $snippet "/*" } " and " { $snippet "*/" } " are still tokens and must not abut the comment text itself." }
15 { $example "USING: multiline ;"
16 "/* I think that I shall never see"
17 " A poem lovely as a tree. */"
21 { POSTPONE: <" POSTPONE: STRING: } related-words
23 HELP: parse-multiline-string
24 { $values { "end-text" "a string delineating the end" } { "str" "the parsed string" } }
25 { $description "Parses the input stream until the " { $snippet "end-text" } " is reached and returns the parsed text as a string." }
26 { $notes "Used to implement " { $link POSTPONE: /* } " and " { $link POSTPONE: <" } "." } ;
28 ARTICLE: "multiline" "Multiline"
30 { $subsection POSTPONE: STRING: }
31 { $subsection POSTPONE: <" }
33 { $subsection POSTPONE: /* }
34 "Writing new multiline parsing words:"
35 { $subsection parse-multiline-string }