We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6204634 commit 06f5504Copy full SHA for 06f5504
syntax-color-test/tests/syntax-color/scribble-lexer.rkt
@@ -13,6 +13,9 @@
13
(port-count-lines! in)
14
(let loop ([mode #f])
15
(let-values ([(lexeme type paren start end backup mode) (lexer in 0 mode)])
16
+ (when (and (= start end) (not (equal? type 'eof)))
17
+ (error 'color "lexer returned a token with zero width, start ~s end ~s"
18
+ start end))
19
(if (eq? type 'eof)
20
null
21
(cons (list start end type backup)
@@ -29,7 +32,7 @@
29
32
(caddar l)))
30
33
(loop (+ (+ pos (caar l))) (cdr l)))))])
31
34
(unless (equal? v val)
- (eprintf "FAILED, line ~s\n" line)
35
+ (eprintf "FAILED, line ~s, current-lexer-char ~s\n" line (current-lexer-char))
36
(cond [(string? v)
37
(eprintf "~a\nexpected\n" v)]
38
[else
0 commit comments