fmease / lushui

The reference compiler of the Lushui programming language
Apache License 2.0
7 stars 0 forks source link

Support compilation of single source files from stdin #150

Open fmease opened 2 years ago

fmease commented 2 years ago

The command lushui file <build|check|document|run> - (where PATH is a dash) should make the driver read the source code from stdin. The SourceFile type/path should be set to Stdin (to be created). In diagnostics, that file type should be displayed as <stdin>, ⟨stdin⟩ or something similar (ideally sth. that wouldn't be a valid file path).

fmease commented 2 years ago

Fyi, rustc does support this calling the file <anon> and the crate rust_out (in turn calling the output file rust_out, librust_out.rlib, etc.)