fix commit c818eb3ca3325fb7eac7f2a8105ea0121013214c
related to PR 13394 original commit: a948f1b40dacd3f583a6034a58b12962f6941983
This commit is contained in:
parent
79f015eb70
commit
c344fd47cd
|
@ -328,6 +328,7 @@ added get-regions
|
||||||
;(define-values (_line2 _col2 pos-after) (port-next-location in))
|
;(define-values (_line2 _col2 pos-after) (port-next-location in))
|
||||||
(cond
|
(cond
|
||||||
[(eq? 'eof type)
|
[(eq? 'eof type)
|
||||||
|
(set-lexer-state-up-to-date?! ls #t)
|
||||||
(re-tokenize-move-to-next-ls start-time #t)]
|
(re-tokenize-move-to-next-ls start-time #t)]
|
||||||
[else
|
[else
|
||||||
(unless (exact-nonnegative-integer? new-token-start)
|
(unless (exact-nonnegative-integer? new-token-start)
|
||||||
|
@ -371,6 +372,7 @@ added get-regions
|
||||||
(insert-last! (lexer-state-tokens ls)
|
(insert-last! (lexer-state-tokens ls)
|
||||||
(lexer-state-invalid-tokens ls))
|
(lexer-state-invalid-tokens ls))
|
||||||
(set-lexer-state-invalid-tokens-start! ls +inf.0)
|
(set-lexer-state-invalid-tokens-start! ls +inf.0)
|
||||||
|
(set-lexer-state-up-to-date?! ls #t)
|
||||||
(re-tokenize-move-to-next-ls start-time #t)]
|
(re-tokenize-move-to-next-ls start-time #t)]
|
||||||
[else
|
[else
|
||||||
(continue-re-tokenize start-time #t ls in in-start-pos new-lexer-mode)]))])]))
|
(continue-re-tokenize start-time #t ls in in-start-pos new-lexer-mode)]))])]))
|
||||||
|
@ -515,13 +517,6 @@ added get-regions
|
||||||
lexer-states)])))
|
lexer-states)])))
|
||||||
(define finished? (re-tokenize-move-to-next-ls (current-inexact-milliseconds) #f))
|
(define finished? (re-tokenize-move-to-next-ls (current-inexact-milliseconds) #f))
|
||||||
(c-log (format "coloring stopped ~a" (if finished? "because it finished" "with more to do")))
|
(c-log (format "coloring stopped ~a" (if finished? "because it finished" "with more to do")))
|
||||||
(let loop ([states lexer-states])
|
|
||||||
(unless (eq? re-tokenize-lses states)
|
|
||||||
(cond
|
|
||||||
[(null? states) (void)]
|
|
||||||
[else
|
|
||||||
(set-lexer-state-up-to-date?! (car states) #t)
|
|
||||||
(loop (cdr states))])))
|
|
||||||
(when finished?
|
(when finished?
|
||||||
(update-lexer-state-observers)
|
(update-lexer-state-observers)
|
||||||
(c-log "updated observers"))
|
(c-log "updated observers"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user