add a contract on the interaction between the module-lexer and the
lexers it defers to also, remove the checks in color.rkt in the framework (they are not all covered by the added contract, but they mostly are and when they aren't, most of those times are using the heavily tested racket-lexer) original commit: b0343aa9f02f0024cba7a61db3bcf4165696dd85
This commit is contained in:
parent
ac33354f66
commit
7c6bc93742
|
@ -337,16 +337,6 @@ added get-regions
|
|||
(set-lexer-state-up-to-date?! ls #t)
|
||||
(re-tokenize-move-to-next-ls start-time #t)]
|
||||
[else
|
||||
(unless (exact-positive-integer? new-token-start)
|
||||
(error 'color:text<%> "expected an exact nonnegative integer for the token start, got ~e" new-token-start))
|
||||
(unless (exact-positive-integer? new-token-end)
|
||||
(error 'color:text<%> "expected an exact nonnegative integer for the token end, got ~e" new-token-end))
|
||||
(unless (exact-nonnegative-integer? backup-delta)
|
||||
(error 'color:text<%> "expected an exact nonnegative integer for the backup delta, got ~e" backup-delta))
|
||||
(unless (new-token-start . < . new-token-end)
|
||||
(error 'color:text<%>
|
||||
"expected the distance between the start and end position for each token to be positive, but start was ~e and end was ~e"
|
||||
new-token-start new-token-end))
|
||||
(unless (<= pos-before new-token-start pos-after)
|
||||
(error 'color:text<%>
|
||||
"expected the token start to be between ~s and ~s, got ~s" pos-before pos-after new-token-start))
|
||||
|
|
Loading…
Reference in New Issue
Block a user