Dnia czwartek, 16 grudnia 2010 o 06:44:04 Timothy Boronczyk napisał(a):
There's been several problems and attempts to fix PHP syntax highlighting in Geany. Perhaps it would be beneficial to write a small parser instead of relying on regex pattern matching. I don't think such a parser would have to be 100% complete... just sufficient enough to *properly* identify keywords, function/class constructs, and maybe a few other tidbits like namespaces. I know the desire is to keep the core code small, but a hand-written parser should be fast and rather lightweight.
There is no need to write a PHP parser. Geany can use the tokeniser delivered with PHP. (However, it is worth remebering that PHP is not only PHP code. It is also phpdoc, and it is also the master (domain) language, mostly but not necessarily (X)HTML, and that it is possible to mix multiple domain languages in the same file, and that HTML may contain CSS and Javascript, and…)
HTH, Chris