whitequark / parser

A Ruby parser.
Other
1.59k stars 199 forks source link

Regular expression escaping #1026

Open kddnewton opened 5 months ago

kddnewton commented 5 months ago

With this regexp:

/\ca/

the escape sequence results in a regular expression with source:

/\x01/

but parser gives: /\u0001/. I don't know if this is actually a bug or not, but it's surprising.