Modifies the lexer to parse UTF-16 surrogate pairs in string literals#556
Modifies the lexer to parse UTF-16 surrogate pairs in string literals#556vladar merged 4 commits intowebonyx:masterfrom jakevoytko:jakevoytko-utf16-surrogate-lexing-fix
Conversation
|
Cool, thanks! But the build is broken due to code style checks. Can you take a look (quick hint: run |
|
I pushed the lint update. I additionally rebased against the CHANGELOG.md conflict this PR had against my other change. |
src/Language/Lexer.php
Outdated
| $code = hexdec($hex); | ||
|
|
||
| // UTF-16 surrogate pair detection and handling. | ||
| $high_order_byte = $code >> 8; |
There was a problem hiding this comment.
Hm, we are supposed to have camelCase for variable names via phpcs. @simPod any ideas why it would miss this snake case?
There was a problem hiding this comment.
@vladar Yea, sorry... Will be in v7, introduced here doctrine/coding-standard#128 (by me what an accident! 😂 )
V7 of Doctrine CS is going to be cool, many new things to check for. I'll send PR here when it's released.
There was a problem hiding this comment.
I manually updated the variables to lowerCamelCase in the meantime
|
Good job! Thanks |
Here's the companion change to #554. Happy to make any changes in the lexer to make it fit in better with the surrounding code