3 Racket Lexer
(require syntax-color/racket-lexer) | |
package: syntax-color-lib |
procedure
(racket-lexer in) →
(or/c string? eof-object?) symbol? (or/c symbol? #f) (or/c number? #f) (or/c number? #f) in : input-port?
The racket-lexer function returns 5 values:
Either a string containing the matching text or the eof object. Block comments and specials currently return an empty string. This may change in the future to other string or non-string data.
A symbol in '(error comment sexp-comment white-space constant string no-color parenthesis hash-colon-keyword symbol eof other).
A symbol in '(|(| |)| |[| |]| |{| |}|) or #f.
A number representing the starting position of the match (or #f if eof).
A number representing the ending position of the match (or #f if eof).
procedure
(racket-lexer* in offset mode)
→
(or/c string? eof-object?)
(or/c symbol? (and/c (hash/c symbol? any/c) immutable?)) (or/c symbol? #f) (or/c number? #f) (or/c number? #f) exact-nonnegative-integer? any/c in : input-port? offset : exact-nonnegative-integer? mode : any/c
Added in version 1.2 of package syntax-color-lib.
procedure
(racket-lexer/status in) →
(or/c string? eof-object?) symbol? (or/c symbol? #f) (or/c number? #f) (or/c number? #f) (or/c 'datum 'open 'close 'continue) in : input-port?
procedure
(racket-lexer*/status in offset mode)
→
(or/c string? eof-object?)
(or/c symbol? (and/c (hash/c symbol? any/c) immutable?)) (or/c symbol? #f) (or/c number? #f) (or/c number? #f) exact-nonnegative-integer? any/c (or/c 'datum 'open 'close 'continue) in : input-port? offset : exact-nonnegative-integer? mode : any/c
Added in version 1.2 of package syntax-color-lib.
procedure
→
(or/c string? eof-object?) symbol? (or/c symbol? #f) (or/c number? #f) (or/c number? #f) (or/c 'datum 'open 'close 'continue) in : input-port?
procedure
(racket-nobar-lexer*/status in offset mode)
→
(or/c string? eof-object?)
(or/c symbol? (and/c (hash/c symbol? any/c) immutable?)) (or/c symbol? #f) (or/c number? #f) (or/c number? #f) exact-nonnegative-integer? any/c (or/c 'datum 'open 'close 'continue) in : input-port? offset : exact-nonnegative-integer? mode : any/c
Added in version 1.2 of package syntax-color-lib.