Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions drracket-tool-text-lib/drracket/private/syncheck/annotate.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
;; color : syntax[original] str -> void
;; colors the syntax with style-name's style
(define (color stx style-name)
(let ([source (find-source-editor stx)])
(when (and (syntax-position stx)
(syntax-span stx))
(let ([pos (- (syntax-position stx) 1)]
[span (syntax-span stx)])
(color-range source pos (+ pos span) style-name)))))
(define source (find-source-editor stx))
(when (and (syntax-position stx) (syntax-span stx))
(let ([pos (- (syntax-position stx) 1)]
[span (syntax-span stx)])
(color-range source pos (+ pos span) style-name))))

;; color-range : text start finish style-name
;; colors a range in the text based on `style-name'
Expand Down Expand Up @@ -55,9 +54,8 @@

;; find-source-editor : stx -> editor or false
(define (find-source-editor stx)
(let ([defs-text (current-annotations)])
(and defs-text
(find-source-editor/defs stx defs-text))))
(define defs-text (current-annotations))
(and defs-text (find-source-editor/defs stx defs-text)))

;; find-source-editor : stx text -> editor or false
(define (find-source-editor/defs stx defs-text)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@
[_ (void)]))

;; fill in the coloring-plans table for boundary contracts
(for ([(start-k start-val) (in-hash boundary-start-map)])
(for ([start-stx (in-list start-val)])
(do-contract-traversal start-stx #t
coloring-plans already-jumped-ids
low-binders binding-inits
domain-map range-map
#t
binder+mods-binder)))
(for* ([(start-k start-val) (in-hash boundary-start-map)]
[start-stx (in-list start-val)])
(do-contract-traversal start-stx
#t
coloring-plans
already-jumped-ids
low-binders
binding-inits
domain-map
range-map
#t
binder+mods-binder))

;; fill in the coloring-plans table for internal contracts
(for ([(start-k start-val) (in-hash internal-start-map)])
Expand Down
Loading
Loading