feature: support for PHP 7.4 (typehint, return types)#2566
feature: support for PHP 7.4 (typehint, return types)#2566RunDevelopment merged 11 commits intoPrismJS:masterfrom
Conversation
RunDevelopment
left a comment
There was a problem hiding this comment.
Thank you for improving the PHP language definition @TomPavelec!
There are a few things that have to be improved but it looks ok overall.
RunDevelopment
left a comment
There was a problem hiding this comment.
Wow. Better number, operator, and punctuation patterns and even more PHP features (execution operators). I really want to get this merged now but before that, we still have fix some issues.
f375187 to
a7f885c
Compare
RunDevelopment
left a comment
There was a problem hiding this comment.
@TomPavelec Again, sorry for the delay.
I reviewed it again and I think that it's almost ready to merge. We still have to decide what to do with your alias test implementation and I also left you some comments.
The conflicts resulting from #2574 also have to be resolved.
If you want to, then I'll make you a PR resolving some of my comments.
a7f885c to
69840ee
Compare
fix: `Foo::bar` Foo matched as class name fix: `new self` self matched as keyword instead of class name fix: `use function` is matched as package
feature: class name / namespace (package) can not begin with number feature: added binary and underscore number format feature: added operators `::`, `->`, `=>`, `<=>`, `...`, and some assignment operators fix: moved `.` from punctuation to operators (concatenation operator) feature: for `type` added subtypes `type-casting`, `type-hint`, `return-type` feature: added backtick string quoted string (shell exec) feature: for keywords `parent`, `self` and `static` added subtype `static-context` when a static prop/const/method accessed on them feature: for class name added subtype `class-name-fully-qualified` when class name is fully qualified feature: for class name added subtype `static-context` when a static prop/const/method accessed on it
fix: use single quotes for token names
fix: removed A-Z in case insensitive patterns removed: alias shell-comment fix: types handled as keywords
3993ee1 to
39bbd69
Compare
fix:
Foo::barFoo matched as class namefix:
new selfself matched as keyword instead of class namefix:
use functionis matched as package