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 number for some tokens. I propose > adding an additional TOKEN_EXTENDED_LOCATION flag, that would include: > > - starting line and character number within that line > - ending line and character number within that line
That'd be nice to have... but I don't think the parser keeps that information currently. > T_ENCAPSED_AND_WHITESPACE and T_INLINE_HTML seem to be the most common > cases of start line !== end line. I would probably only include the ending line number if it is different? Saves on a whole lot of memory allocations and usage... and it's trivial to detect in consuming code. cheers, Derick
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php