Enable REPL for a Generic interpreter #304
-
I add something like interpreter_options = {
Generic = {
Swift_original = {
supported_filetypes = { "swift" },
extension = ".swift",
interpreter = "swift",
boilerplate_pre = "import Foundation",
},
},
} how to enable REPL support for it? |
Beta Was this translation helpful? Give feedback.
Answered by
michaelb
Feb 13, 2025
Replies: 1 comment
-
Unfortunately it's not really possible. While the (non-REPL) "file -> compiler -> binary -> output" workflow is relatively standard over number of languages, it's not as easy to generalize a "file | interpreter | output": many intepreters have quirks and there is some language-specific code too. A purpose-built interpreter is better suited to REPL functionality |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mathjiajia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately it's not really possible. While the (non-REPL) "file -> compiler -> binary -> output" workflow is relatively standard over number of languages, it's not as easy to generalize a "file | interpreter | output": many intepreters have quirks and there is some language-specific code too.
A purpose-built interpreter is better suited to REPL functionality