From 8904b85df16494679b4735a42bd3dde9e8bf6fb0 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 6 Jun 2016 11:39:42 -0700 Subject: [PATCH] core: allow \ word in word definition names. --- core/byte-vectors/byte-vectors-docs.factor | 2 +- core/parser/parser.factor | 3 +++ tools/help/syntax/syntax.factor | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/byte-vectors/byte-vectors-docs.factor b/core/byte-vectors/byte-vectors-docs.factor index dad6357b11..95d68a5002 100644 --- a/core/byte-vectors/byte-vectors-docs.factor +++ b/core/byte-vectors/byte-vectors-docs.factor @@ -33,7 +33,7 @@ HELP: >byte-vector { $description "Outputs a freshly-allocated byte vector with the same elements as a given sequence." } { $errors "Throws an error if the sequence contains elements other than integers." } ; -HELP: BV{ +HELP: \ BV{ { $syntax "BV{ elements... }" } { $values { "elements" "a list of bytes" } } { $description "Marks the beginning of a literal byte vector. Literal byte vectors are terminated by " { $link postpone\ } } "." } diff --git a/core/parser/parser.factor b/core/parser/parser.factor index acf04b6fcf..56424c9d15 100644 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -108,6 +108,9 @@ ERROR: staging-violation word ; V{ } clone swap execute-parsing first ] when ; +: scan-parsing-word ( -- word ) + scan-object dup wrapper? [ wrapped>> ] when ; + ERROR: classoid-expected object ; : scan-class ( -- class ) diff --git a/tools/help/syntax/syntax.factor b/tools/help/syntax/syntax.factor index a6e351e3bd..9db2960edc 100644 --- a/tools/help/syntax/syntax.factor +++ b/tools/help/syntax/syntax.factor @@ -5,7 +5,7 @@ help.topics kernel math parser sequences vocabs.parser words ; in: help.syntax SYNTAX: HELP: - scan-word bootstrap-word + scan-parsing-word bootstrap-word [ >link save-location ] [ [ \ ; parse-until >array ] dip set-word-help ] bi ;