This diff adds support for php return typehints (e.g. function foo(): string) to the parser. Nothing is done yet to use this in the TypeBuilder, that will come later.
Details
Details
- Reviewers
pprkut zhigalin - Group Reviewers
KDevelop - Commits
- R52:68f07d3a0098: Add return typehint support for PHP language
The newly added test checks if the return typehint is correctly tokenized. Parsing itself is not tested, but the old tests work (so no regressions) and opening files with return typehints now works without parse errors. Tests will be added after using the return typehints in the TypeBuilder.
Diff Detail
Diff Detail
- Repository
- R52 KDevelop: PHP Support
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
Done, I put the new test next to the existing testTypeHintsOnFunction. Now it shouldn't conflict with D6645.