Skip to content

Commit bf518d2

Browse files
committed
doc,framework: add note about 'semantic-type-guess
1 parent 363ccec commit bf518d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gui-doc/scribblings/framework/color.scrbl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@
9595
@racket['no-color] can be used to indicate that although
9696
the token is not whitespace, it should not be colored.
9797

98+
In addition to @racket['type], a @racket[get-token] function
99+
may provide an optional @racket['semantic-type-guess] key
100+
for tokens that look like they might fit into more specific
101+
categories (for example, symbols in a language that look
102+
like keywords), but that it can't prove belong to those
103+
categories (for example, because it can't tell if the symbol
104+
shadows a keyword). Tools may allow users to opt into
105+
preferring the @racket['semantic-type-guess], if present,
106+
over the @racket['type] when coloring a token.
107+
98108
These and other keys in @racket[_attribs] can be used by
99109
tools that call @method[color:text<%>
100110
classify-position*].}

0 commit comments

Comments
 (0)