-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: support for PHP 7.4 (typehint, return types) #2566
feature: support for PHP 7.4 (typehint, return types) #2566
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for improving the PHP language definition @TomPavelec!
There are a few things that have to be improved but it looks ok overall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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::bar
Foo matched as class namefix:
new self
self matched as keyword instead of class namefix:
use function
is matched as package