Skip to content

Commit 5d5594c

Browse files
committed
correct contract
related to #15
1 parent 779a649 commit 5d5594c

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

syntax-color-doc/syntax-color/syntax-color.scrbl

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,30 @@ A lexer that only identifies @litchar{(}, @litchar{)}, @litchar{[},
247247
@defproc[(module-lexer [in input-port?]
248248
[offset exact-nonnegative-integer?]
249249
[mode (or/c #f
250-
(-> input-port? any)
251-
(cons/c (-> input-port? any/c any) any/c))])
252-
(values (or/c string? eof-object?)
250+
(-> input-port? exact-nonnegative-integer?any)
251+
(cons/c (-> input-port?
252+
exact-nonnegative-integer?
253+
any/c
254+
any)
255+
any/c))])
256+
(values (or/c string? eof-object?)
253257
symbol?
254-
(or/c symbol? #f)
255-
(or/c number? #f)
258+
(or/c symbol? #f)
259+
(or/c number? #f)
256260
(or/c number? #f)
257261
exact-nonnegative-integer?
258-
(or/c #f
262+
(or/c #f
259263
(-> input-port? any)
260-
(cons/c (-> input-port? any/c any) any/c)))]{
264+
(cons/c (-> input-port? exact-nonnegative-integer?
265+
any/c
266+
any)
267+
any/c)
268+
(struct/c dont-stop
269+
((cons/c (-> input-port?
270+
exact-nonnegative-integer?
271+
any/c
272+
any)
273+
any/c)))))]{
261274

262275
Like @racket[racket-lexer], but with several differences:
263276

@@ -307,17 +320,31 @@ Like @racket[racket-lexer], but with several differences:
307320
[offset exact-nonnegative-integer?]
308321
[mode (or/c #f
309322
(-> input-port? any)
310-
(cons/c (-> input-port? any/c any) any/c))])
323+
(cons/c (-> input-port?
324+
exact-nonnegative-integer?
325+
any/c
326+
any)
327+
any/c))])
311328
(values (or/c string? eof-object?)
312329
(or/c symbol?
313330
(and/c (hash/c symbol? any/c) immutable?))
314331
(or/c symbol? #f)
315332
(or/c number? #f)
316333
(or/c number? #f)
317334
exact-nonnegative-integer?
318-
(or/c #f
335+
(or/c #f
319336
(-> input-port? any)
320-
(cons/c (-> input-port? any/c any) any/c)))]{
337+
(cons/c (-> input-port?
338+
exact-nonnegative-integer?
339+
any/c
340+
any)
341+
any/c)
342+
(struct/c dont-stop
343+
((cons/c (-> input-port?
344+
exact-nonnegative-integer?
345+
any/c
346+
any)
347+
any/c)))))]{
321348

322349
Like @racket[module-lexer], except that the attribute result
323350
propagated from a language-specific lexer can be a hash table.

0 commit comments

Comments
 (0)