| ▲ | estebank 20 hours ago | |
>> Built-in line and column tracking. Any movement across a newline updates the line number, including a backwards seek. getLine and getColumn are always available and both are one-based, which makes decent error messages nearly free. > That doesn't sound like much, but having hand-written plenty of recursive descent parsers, it's most of what you need for good error messages. In my experience having access to the appropriate place where the parser failed is necessary but wholly insufficient for good diagnostics. | ||