factor: Fix some syntax errors.

modern-harvey3-triple
Doug Coleman 2018-08-03 22:36:21 -04:00
parent 1f2d755c0f
commit 3944515af3
5 changed files with 13 additions and 13 deletions

View File

@ -16,10 +16,10 @@ HELP: /*
}
} ;
HELP: HEREDOC:
HELP: \HEREDOC:
{ $syntax "HEREDOC: marker\n...text...\nmarker" }
{ $values { "marker" "a word (token)" } { "text" "arbitrary text" } { "value" string } }
{ $description "Returns a string delimited by an arbitrary user-defined token. This delimiter must be exactly the text beginning at the first non-blank character after " { $link POSTPONE: HEREDOC: } " until the end of the line containing " { $link POSTPONE: HEREDOC: } ". Text is captured until a line is found containing exactly this delimiter string." }
{ $description "Returns a string delimited by an arbitrary user-defined token. This delimiter must be exactly the text beginning at the first non-blank character after " { $link postpone: \HEREDOC: } " until the end of the line containing " { $link postpone: \HEREDOC: } ". Text is captured until a line is found containing exactly this delimiter string." }
{ $warning "Whitespace is significant." }
{ $examples
{ $example "USING: multiline prettyprint ;"
@ -35,16 +35,16 @@ HELP: HEREDOC:
HELP: parse-multiline-string
{ $values { "end-text" "a string delineating the end" } { "str" "the parsed string" } }
{ $description "Parses the input stream until the " { $snippet "end-text" } " is reached and returns the parsed text as a string." }
{ $notes "Used to implement " { $link POSTPONE: /* } "." } ;
{ $notes "Used to implement " { $link postpone: /* } "." } ;
ARTICLE: "multiline" "Multiline"
"Multiline strings:"
{ $subsections
POSTPONE: STRING:
POSTPONE: HEREDOC:
postpone: \STRING:
postpone: \HEREDOC:
}
"Multiline comments:"
{ $subsections POSTPONE: /* }
{ $subsections postpone: /* }
"Writing new multiline parsing words:"
{ $subsections parse-multiline-string } ;

View File

@ -189,7 +189,7 @@ $nl
"URLs can be converted back to strings using the " { $link present } " word."
$nl
"URL literal syntax:"
{ $subsections postpone: \url"}
{ $subsections postpone: \url" }
"Manipulating URLs:"
{ $subsections
derive-url

View File

@ -19,18 +19,18 @@ IN: vocabs.platforms
curry
] dip with-vocabulary drop ; inline
SYNTAX: <UNIX
SYNTAX: \<UNIX
"UNIX>" parse-multiline-string
os unix? [ ".unix" parse-platform-section ] [ drop ] if ;
SYNTAX: <MACOSX
SYNTAX: \<MACOSX
"MACOSX>" parse-multiline-string
os macosx? [ ".macosx" parse-platform-section ] [ drop ] if ;
SYNTAX: <LINUX
SYNTAX: \<LINUX
"LINUX>" parse-multiline-string
os linux? [ ".linux" parse-platform-section ] [ drop ] if ;
SYNTAX: <WINDOWS
SYNTAX: \<WINDOWS
"WINDOWS>" parse-multiline-string
os windows? [ ".windows" parse-platform-section ] [ drop ] if ;

View File

@ -180,7 +180,7 @@ ARTICLE: "syntax-strings" "Character and string syntax"
"Strings are documented in " { $link "strings" } "." ;
ARTICLE: "syntax-sbufs" "String buffer syntax"
{ $subsections postpone: \sbuf"}
{ $subsections postpone: \sbuf" }
"String buffers are documented in " { $link "sbufs" } "." ;
ARTICLE: "syntax-arrays" "Array syntax"

View File

@ -296,7 +296,7 @@ CONSTANT: google-slides
"Libraries can define new parsing words"
}
{ $slide "The parser"
{ "Example: URLs define a " { $link postpone: \url"} " word" }
{ "Example: URLs define a " { $link postpone: \url" } " word" }
{ $code "url\"http://paste.factorcode.org/paste?id=81\"" }
}
{ $slide "Example: memoization"