From 5986f9cbe369dded309815ca56fcd8223b0cc972 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 8 Jun 2014 18:12:26 -0700 Subject: [PATCH] help.lint.checks: allow $slot to be used with struct-class. --- basis/help/lint/checks/checks.factor | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/basis/help/lint/checks/checks.factor b/basis/help/lint/checks/checks.factor index 288e46cda7..a916a1bdcb 100644 --- a/basis/help/lint/checks/checks.factor +++ b/basis/help/lint/checks/checks.factor @@ -1,11 +1,12 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays assocs classes classes.tuple combinators -combinators.short-circuit debugger definitions effects eval -formatting fry grouping help help.markup help.topics io -io.streams.string kernel macros namespaces sequences -sequences.deep sets splitting strings summary unicode.categories -vocabs vocabs.loader words words.constant words.symbol ; +USING: accessors arrays assocs classes classes.struct +classes.tuple combinators combinators.short-circuit debugger +definitions effects eval formatting fry grouping help +help.markup help.topics io io.streams.string kernel macros +namespaces sequences sequences.deep sets splitting strings +summary unicode.categories vocabs vocabs.loader words +words.constant words.symbol ; FROM: sets => members ; IN: help.lint.checks @@ -152,7 +153,10 @@ SYMBOL: vocab-articles : check-class-description ( word element -- ) \ $class-description swap elements over class? [ - [ all-slots [ name>> ] map ] [ extract-slots ] bi* + [ + dup struct-class? [ struct-slots ] [ all-slots ] if + [ name>> ] map + ] [ extract-slots ] bi* [ swap member? not ] with filter [ ", " join "Described $slot does not exist: " prepend simple-lint-error