Slight change to how drracket handles lexer/colorers, and doc changes to color:text<%>
original commit: dc4398235a4cdef97a14dce9f2342721486e3bbc
This commit is contained in:
parent
d2ff4f11c4
commit
43d84704c6
|
@ -37,8 +37,11 @@
|
||||||
@racket[get-token] returns the next token as 5 values:
|
@racket[get-token] returns the next token as 5 values:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
@item{An unused value. This value is intended to represent the textual
|
@item{This value is intended to represent the textual
|
||||||
component of the token and may be used as such in the future.}
|
component of the token. If the second value returned by
|
||||||
|
@racket[get-token] is @racket['symbol] and this value is a string
|
||||||
|
then the value is used to differentiate between symbols and keywords
|
||||||
|
for the purpose of coloring and formatting, configurable from DrRacket's preference's editing menu.}
|
||||||
@item{A symbol describing the type of the token. This symbol is
|
@item{A symbol describing the type of the token. This symbol is
|
||||||
transformed into a style-name via the @racket[token-sym->style] argument.
|
transformed into a style-name via the @racket[token-sym->style] argument.
|
||||||
The symbols @racket['white-space] and @racket['comment] have special
|
The symbols @racket['white-space] and @racket['comment] have special
|
||||||
|
|
|
@ -1320,6 +1320,7 @@
|
||||||
(module-lexer/waived in offset mode))
|
(module-lexer/waived in offset mode))
|
||||||
(cond
|
(cond
|
||||||
[(and (eq? type 'symbol)
|
[(and (eq? type 'symbol)
|
||||||
|
(string? lexeme)
|
||||||
(get-keyword-type lexeme tabify-pref))
|
(get-keyword-type lexeme tabify-pref))
|
||||||
(values lexeme 'keyword paren start end backup-delta new-mode)]
|
(values lexeme 'keyword paren start end backup-delta new-mode)]
|
||||||
[else
|
[else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user