On Mon, 20 Jun 2011, Felipe Pena wrote:
> 2011/6/20 Etienne Kneuss <[email protected]>
> >
> > I'd love to see the proposal from Felipe about the improved parse
> > errors in that list. I believe that the patch was ready or almost
> > ready? I can't find the RFC though, but maybe the RFC never existed...
> >
>
> https://wiki.php.net/rfc/improved-parser-error-message
I think this is good and helpful.
I've two suggestions though:
- Add the token name in parenthesis at the end of the string
- Add '' around the token strings
Examples:
Parse error: syntax error, unexpected '<<=' (T_SL_EQUAL) in Command line code
on line 1
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) in
Command line code on line 1
Parse error: syntax error, unexpected 'quoted-string'
(T_CONSTANT_ENCAPSED_STRING), expecting identifier or '(' in Command line code
on line 1
And we need to make sure to check for escaped < and > in HTML error
messages :)
cheers,
Derick
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php