From: John Benediktsson Date: Mon, 22 Jun 2015 23:32:22 +0000 (-0700) Subject: vocabs.parser: adding back unuse-words. X-Git-Tag: unmaintained~2549 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=7ffd9db9c9b6450d7d31257945b110912f9aa098 vocabs.parser: adding back unuse-words. --- diff --git a/core/vocabs/parser/parser-docs.factor b/core/vocabs/parser/parser-docs.factor index 9e58c0f89d..3a59a59e52 100644 --- a/core/vocabs/parser/parser-docs.factor +++ b/core/vocabs/parser/parser-docs.factor @@ -163,8 +163,11 @@ HELP: add-renamed-word HELP: use-words { $values { "assoc" assoc } } -{ $description "Adds an assoc mapping word names to words to the current manifest." } -{ $notes "This word is used by " { $link "locals" } " to implement lexically-scoped names." } ; +{ $description "Adds an assoc mapping word names to words to the current manifest." } ; + +HELP: unuse-words +{ $values { "assoc" assoc } } +{ $description "Removes an assoc mapping word names to words from the current manifest." } ; HELP: ambiguous-use-error { $error-description "Thrown when a word name referenced in source file is available in more than one vocabulary in the manifest. Such cases must be explicitly disambiguated using " { $link POSTPONE: FROM: } ", " { $link POSTPONE: EXCLUDE: } ", " { $link POSTPONE: QUALIFIED: } ", or " { $link POSTPONE: QUALIFIED-WITH: } "." } ; diff --git a/core/vocabs/parser/parser.factor b/core/vocabs/parser/parser.factor index a4f59bdc61..3751db3fba 100644 --- a/core/vocabs/parser/parser.factor +++ b/core/vocabs/parser/parser.factor @@ -170,6 +170,9 @@ TUPLE: rename word vocab words ; : use-words ( assoc -- ) qualified-vocabs push ; +: unuse-words ( assoc -- ) + qualified-vocabs remove! drop ; + TUPLE: ambiguous-use-error words ; : ( words -- error restarts )