alex / rply

An attempt to port David Beazley's PLY to RPython, and give it a cooler API.
BSD 3-Clause "New" or "Revised" License
381 stars 60 forks source link

Add __str__ methods for Error classes #50

Closed djc closed 6 years ago

djc commented 8 years ago

This helps diagnosing errors.

alex commented 8 years ago

Can we add a small test for these?

djc commented 8 years ago

Like that? (Rebased a bit to fix a bug in the initial commit.)

djc commented 6 years ago

@alex would you mind pronouncing on this? I've been doing work on one of my rply-based projects again and this PR still made it easier to pinpoint lexer errors in particular.

alex commented 6 years ago

These should probably be __repr__, instead of __str__. But otherwise LGTM.

djc commented 6 years ago

Should be all good now.