From d7fa8b9133aacdc8505e8cecc94e189525c8699c Mon Sep 17 00:00:00 2001 From: Jack Firth Date: Thu, 13 Nov 2025 22:41:40 -0800 Subject: [PATCH] Fix a comment reader bug Some languages have lexers that only work if the input port has line counting enabled. Found via running Resyntax on [this file](https://github.com/racket/typed-racket/blob/master/typed-racket-test/succeed/2d-typed.rkt) which uses `#lang 2d typed/racket/base`. --- private/source.rkt | 1 + 1 file changed, 1 insertion(+) diff --git a/private/source.rkt b/private/source.rkt index b68c490..a16631e 100644 --- a/private/source.rkt +++ b/private/source.rkt @@ -201,6 +201,7 @@ (define (source-tokens src) (with-input-from-source src (λ () + (port-count-lines! (current-input-port)) (define tokens (make-vector-builder)) (let loop ([offset 0] [mode #false]) (define-values (text raw-attributes delimiter-kind start end _ new-mode)