udem-dlteam / pnut

🥜 A Self-Compiling C Transpiler Targeting Human-Readable POSIX Shell
https://pnut.sh
BSD 2-Clause "Simplified" License
425 stars 14 forks source link

Improve error messages and README #1

Closed laurenthuberdeau closed 10 months ago

laurenthuberdeau commented 12 months ago

Context

I like to use the following command with a file watcher as a way to get quick feedback on my changes: ./cc.sh test.c > test.sh && test.sh. Unfortunately, not all errors were thrown with status code 1, making this difficult to use.

This PR replaces the all calls to exit to missing_feature_error and redirects its error message (along with the error message of syntax_error) to stderr and adds some basic how-to-run instructions to the README.