Pro Tips

This function reads a file into lines of text:

(define (get-code-01 fname)
  (file->lines fname))

This function does the same thing from the “standard input port”.

(define (get-code-02)
  (port->lines))

The good news is that both a string and a file can become a port.

(define (get-code-file fname)
  (with-input-from-file fname
    get-code-02))
(define (get-code-string str)
  (with-input-from-string str
    get-code-02))

Future work: you could modify your get-code-02 so that it does all of your compilation work instead of just reading in the lines.