whitequark / parser

A Ruby parser.
Other
1.57k stars 197 forks source link

Regular expression escaping #1026

Open kddnewton opened 1 month ago

kddnewton commented 1 month 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.