|
183 | 183 | (")" #hash((comment? . #t) (type . parenthesis)) 17 18 no-lang-line)
|
184 | 184 | (,eof eof #f #f no-lang-line)))
|
185 | 185 |
|
| 186 | +;; it is possible that the first #; comment should actually be match the results |
| 187 | +;; from the first (or maybe the other way around, possibly) but since the code |
| 188 | +;; was already working like that and we're not using this lexer much let's just |
| 189 | +;; leave a note here giving someone permission to change this test case.... |
| 190 | +(check-equal? (lex "#;(a b)\n1\n#;(a b)" #t #:modes (list module-lexer)) |
| 191 | + `(("#;" sexp-comment 1 3 #f) |
| 192 | + ("(" comment 3 4 before-lang-line) |
| 193 | + ("a" comment 4 5 before-lang-line) |
| 194 | + (" " white-space 5 6 before-lang-line) |
| 195 | + ("b" comment 6 7 before-lang-line) |
| 196 | + (")" comment 7 8 before-lang-line) |
| 197 | + ("\n" white-space 8 9 before-lang-line) |
| 198 | + ("1" constant 9 10 before-lang-line) |
| 199 | + ("\n" white-space 10 11 no-lang-line) |
| 200 | + ("#;" sexp-comment 11 13 no-lang-line) |
| 201 | + ("(" parenthesis 13 14 no-lang-line) |
| 202 | + ("a" symbol 14 15 no-lang-line) |
| 203 | + (" " white-space 15 16 no-lang-line) |
| 204 | + ("b" symbol 16 17 no-lang-line) |
| 205 | + (")" parenthesis 17 18 no-lang-line) |
| 206 | + (,eof eof #f #f no-lang-line))) |
| 207 | + |
186 | 208 | (check same?
|
187 | 209 | (lex "#lang at-exp racket/base\n1\n" #t)
|
188 | 210 | `(("#lang at-exp racket/base" other 1 25 #f)
|
|
0 commit comments