From 664e9b75defd2aea68f01589237aaa3f0a2900a5 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 17 Feb 2009 14:26:25 -0600 Subject: [PATCH] Improve " docs --- core/syntax/syntax-docs.factor | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index 035622454f..31b8516675 100644 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -485,8 +485,13 @@ HELP: CHAR: HELP: " { $syntax "\"string...\"" } { $values { "string" "literal and escaped characters" } } -{ $description "Reads from the input string until the next occurrence of " { $link POSTPONE: " } ", and appends the resulting string to the parse tree. String literals cannot span multiple lines. Strings containing the " { $link POSTPONE: " } " character and various other special characters can be read by inserting escape sequences." } -{ $examples { $example "USE: io" "\"Hello\\nworld\" print" "Hello\nworld" } } ; +{ $description "Reads from the input string until the next occurrence of " { $link POSTPONE: " } ", and appends the resulting string to the parse tree. String literals cannot span multiple lines. Strings containing the " { $link POSTPONE: " } " character and various other special characters can be read by inserting " { $link "escape" } "." } +{ $examples + "A string with a newline in it:" + { $example "USE: io" "\"Hello\\nworld\" print" "Hello\nworld" } + "A string with a named Unicode code point:" + { $example "USE: io" "\"\\u{greek-capital-letter-sigma}\" print" "\u{greek-capital-letter-sigma}" } +} ; HELP: SBUF" { $syntax "SBUF\" string... \"" }