Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfirth committed Aug 9, 2024
1 parent 495d4da commit 423fc64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion private/refactoring-result.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@
;; This function is the sole integration point between Resyntax and fmt. It is used by Resyntax to
;; format any refactored code initially generated by Resyntax.
(define (format-refactored-code refactored-source-code #:start start #:end end)
;; TODO: actually use start and end to format only that range once fmt supports it.
(define formatted-source-code
;; Appending a newline is needed because fmt strips the trailing newline from files for some
;; reason.
(string-append (program-format refactored-source-code #:start start #:end end) "\n"))
(string-append (program-format refactored-source-code) "\n"))

;; Formatting can change the total length of the program source code, and we want to tell the
;; caller where the new endpoint of the formatted source range is.
Expand Down

0 comments on commit 423fc64

Please sign in to comment.