From 7c6bc937427107e7c0b3618c77f3f765bffa3d6f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 23 Feb 2013 14:33:08 -0600 Subject: [PATCH] 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 --- collects/framework/private/color.rkt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/collects/framework/private/color.rkt b/collects/framework/private/color.rkt index b6ff4a2c..39e57b1c 100644 --- a/collects/framework/private/color.rkt +++ b/collects/framework/private/color.rkt @@ -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))