fix a bug in the syntax colorer
This commit is contained in:
parent
016d6849fc
commit
119e7ac805
|
@ -94,7 +94,7 @@ to delegate to the scheme-lexer (in the 'no-lang-line mode).
|
|||
;; sync ports
|
||||
(for ([i (in-range (file-position in) (file-position p))])
|
||||
(read-byte-or-special in))
|
||||
(values lexeme 'error data 1 end-pos 0 'no-lang-line)]
|
||||
(values lexeme 'error data new-token-start end-pos 0 'no-lang-line)]
|
||||
[else
|
||||
(for ([i (in-range (file-position in) (file-position lexer-port))])
|
||||
(read-byte-or-special in))
|
||||
|
|
|
@ -64,6 +64,10 @@
|
|||
(check-equal? (lex "#lang at-exp racket/baseBOGUS" #t)
|
||||
`(("#lang at-exp" error 1 30 #f)
|
||||
(,eof eof #f #f no-lang-line)))
|
||||
(check-equal? (lex " #lang BOGUS" #t)
|
||||
`((" " white-space 1 2 #f)
|
||||
("#lang BOGUS" error 2 13 before-lang-line)
|
||||
(,eof eof #f #f no-lang-line)))
|
||||
(check same?
|
||||
(lex "#lang at-exp racket/base\n1\n" #t)
|
||||
`(("#lang at-exp racket/base" other 1 25 #f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user