hoaproject / Compiler

The Hoa\Compiler library.
https://hoa-project.net/
453 stars 48 forks source link

Bug when saving parser class #90

Open flip111 opened 6 years ago

flip111 commented 6 years ago

I have the token \ i need to escape it once because pp uses regex so it becomes:

%token token62 \\

when this is written as php class the backslash is only escaped once, like so:

'token62' => '\\\',

it doesn't matter if there are more surrounding characters (i have a few other rules which suffer from the same bug)