On 29/06/2020 10:42, Claude Pache wrote:
Another way to give the programmer the appropriate information, is replacing “quoted string” with “single-quoted string” and “double-quoted string”.

And while I am thinking about it: a case that tends to cause divergent squint is: unexpected '"', which you changed into: unexpected token """


I've pushed up a new version of the patch with three new special cases:

* unexpected token """ -> unexpected double-quote mark
* unexpected quoted string "foo" -> unexpected single-quoted string  "foo" / unexpected double-quoted string "foo" * unexpected illegal character "_" -> unexpected character 0xNN (where _ is almost certainly a control character, and NN is instead the hexadecimal value of the byte)

I've updated the example table with a new column showing those additions: https://rwec.co.uk/x/php-parse-errors/comparison.html


If there's no other comments or objections, I would appreciate if someone could merge this in so it can be tested in the next alpha :)


Regards,

--
Rowan Tommins (né Collins)
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to