rakarchive / mash

Terminal Shell and Scripting language
Apache License 2.0
4 stars 0 forks source link

`parser`: improve using panic mode #9

Closed raklaptudirm closed 2 years ago

raklaptudirm commented 2 years ago

Parse methods now return explicit errors. The errors are handled and the parser is synchronized by other methods. This reduces the number of cascaded errors reported by the parser.

raklaptudirm commented 2 years ago

This also reduces the number of cascaded errors, as previously even after an error the parser would keep trying to parse the wrong tokens, and would report a whole lot of errors that all stemmed from that single problem.

raklaptudirm commented 2 years ago

Still some work left on the parser but will open a separate pr for that.