Commit Graph

8 Commits

Author SHA1 Message Date
Richard van Velzen
5f13698464 Allow unparenthesized conditional type in conditional else branch 2022-10-20 09:49:58 +02:00
Richard van Velzen
5eaedcd827 Improve abnf readability 2022-09-06 13:56:39 +02:00
Richard van Velzen
1e355a35e2
Support all atomic types as nullable types 2022-06-08 21:40:28 +02:00
Richard van Velzen
445ccb723c
Support conditional types
* Support conditional types

Part of implementation for phpstan/phpstan#3853

* Add fuzzy tests

* Only support "is" / "is not"

* Rename trueType/falseType to if/else

* Add tests to TypeParserTest

* cs

* Only allow parenthesized conditional types

* Remove multiline support

It'll be easier to implement this for more types properly separately

* Support conditional for parameters
2022-03-28 12:50:35 +02:00
Arnaud Le Blanc
c6ffc4b4f1 Array shapes support 2019-06-07 21:13:52 +02:00
Jan Tvrdik
5251b5b4d4 TypeParser: add support for callable types 2018-04-25 10:39:46 +02:00
Jan Tvrdik
7ab7c78f55 add ConstantExpr grammar 2018-03-20 14:09:22 +01:00
Jan Tvrdik
aaa6ac83d1 finalize TypeParser grammar 2018-03-20 14:09:22 +01:00