kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
805 stars 95 forks source link

offset now works correct, by replacing #pos to #charpos in source.rb:41 #106

Closed LeFnord closed 10 years ago

LeFnord commented 10 years ago

thats all ;)

charpos counts multibyte (nonASCII) chars as one,

whereas #pos counts as two offset works now fine

kschiess commented 10 years ago

Is there a test case?

kschiess commented 10 years ago

Dupe of #104

LeFnord commented 10 years ago

i will write a test case …

Am 21.05.2014 um 14:49 schrieb Kaspar Schiess notifications@github.com:

Is there a test case?

— Reply to this email directly or view it on GitHub.


Remember, a great way to avoid broken code is to have less of it. The code that you never write will work forever.

Russ Olsen, “Eloquent Ruby”