cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

Feat: Add ability to compile from stdin

Open vanceism7 opened this issue 4 months ago • 2 comments

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!

vanceism7 avatar Oct 22 '24 20:10 vanceism7