 
 <PRIVATE
 
-: parse-values ( -- seq )
-    [ scan-token dup "}" = not ]
-    [ ":" ?tail drop scan-object 2array ] produce nip ;
+: parse-help-values ( -- seq )
+    [ scan-token dup "}" = not ] [
+        dup "{" = [
+            parse-datum dup parsing-word?
+            [ V{ } clone swap execute-parsing first ] when
+        ] [
+            ":" ?tail drop scan-object 2array
+        ] if
+    ] produce nip ;
 
 PRIVATE>
 
-SYNTAX: $values{ parse-values \ $values prefix suffix! ;
-SYNTAX: $inputs{ parse-values \ $inputs prefix suffix! ;
-SYNTAX: $outputs{ parse-values \ $outputs prefix suffix! ;
+SYNTAX: $values{ parse-help-values \ $values prefix suffix! ;
+SYNTAX: $inputs{ parse-help-values \ $inputs prefix suffix! ;
+SYNTAX: $outputs{ parse-help-values \ $outputs prefix suffix! ;
 
 ! XXX: more syntax to consider
 

<<
SYNTAX: HELP-TEXT:
    scan-new dup name>> but-last parse-word
    '[ \ } parse-help-text _ prefix suffix! ] define-syntax ;
>>

HELP-TEXT: $description{

! Copyright (C) 2020 John Benediktsson
! See http://factorcode.org/license.txt for BSD license

USING: accessors arrays ascii combinators
combinators.short-circuit help help.markup help.topics kernel
lexer math namespaces parser sequences splitting strings vectors
vocabs.parser words ;

IN: easy-help

:: parse-help-token ( -- str/obj/f )
    ?scan-token dup search {
        { [ dup \ } eq? ] [ 2drop f ] }
        { [ dup parsing-word? ] [
            nip V{ } clone swap execute-parsing first
            dup wrapper? [ wrapped>> \ $link swap 2array ] when ] }
        [ drop ]
    } cond ;

