cppfront
cppfront copied to clipboard
Feat: Add ability to compile from stdin
trafficstars
This PR adds the ability to compile from stdin.
This is useful so that cppfront can compile source code that's been piped in from another program.
For my use-case specifically: when working on the LSP server, we already have access to source code within a TextDocument variable.
Prior to this PR, we have to either save the edited content to a temporary file, or save the source file itself prior to invoking cppfront, otherwise we end up with stale diagnostics data.
Happy to fix any issues anyone finds!
Thanks!