Re: [PHP-DEV] token_get_all(): additional location information, and raw tokens

2016-01-06 Thread Derick Rethans
On Tue, 5 Jan 2016, Fred Emmott wrote: > I’m planning on adding this functionality in some form to HHVM, > however if it’s also wanted in PHP, I’d rather not add something > HHVM-specific and will be happy to put up RFCs :) > > Location Information > > > token_get_all() returns a line num

Re: [PHP-DEV] token_get_all(): additional location information, and raw tokens

2016-01-05 Thread Sara Golemon
On Tue, Jan 5, 2016 at 3:57 PM, Fred Emmott wrote: > - T_ELSEIF to T_ELSE T_WHITESPACE T_IF > HHVM only does that when the text of T_ELSEIF is "else\w+if" which happens because of a fugly lexer hack which yeah... let's not talk about that. -Sara -- PHP Internals - PHP Runtime Development M

[PHP-DEV] token_get_all(): additional location information, and raw tokens

2016-01-05 Thread Fred Emmott
I’m planning on adding this functionality in some form to HHVM, however if it’s also wanted in PHP, I’d rather not add something HHVM-specific and will be happy to put up RFCs :) Location Information token_get_all() returns a line number for some tokens. I propose adding an additional TOK