On Tue, 22 Mar 2016 14:01:09 +0100, Craig Duncan <p...@duncanc.co.uk> wrote:
Why do you assume that Latte parser is limited by regexp ability to
parse
HTML?
Because it is:
https://github.com/nette/latte/blob/19b759b550caaad75ca0dee5f0d85f9ffb59c845/src/Latte/Parser.php#L124
No. That argument would only be valid, if the parser consisted only of a
single regexp. When you combine PHP code with PCRE you loose nothing from
PHP's turing completeness and it's ability to parse HTML.
That being said I'm not claiming that Latte parser is 100 % correct HTML
parser (neither is most existing HTML parsers in the world). I'm saying
that it could be (to the extend of what's possible to statically analyze,
i.e. if editor could highlight the code properly).
Regards,
Jan Tvrdik
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php