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

Include line error information in pnut #55

Closed laurenthuberdeau closed 4 months ago

laurenthuberdeau commented 4 months ago

Context

The error messages are not very useful and understanding why pnut refuses to compile a program is very difficult since no location information is given. This PR tracks the position of the last token and include it on syntax errors.