Commit 446d0a9
committed
Tokenizer/PHP: bug fix - parent/static keywords in class instantiations
Follow up on 3484
Just like `new class`, `new parent`, `new self` and `new static` should also be preserved and with the `parent`, `self` and `static` keywords remaining as their dedicated token.
* For `new static`, the tokenization changed due to the context sensitive keywords change. This has now been fixed.
* `new self` was fine before and is still fine.
* `new parent` apparently wasn't handled correctly, even before the change. The condition which was in place for handling the same situation for `self` has now been updated to also handle `parent`.
Includes unit tests.1 parent 3e6ce10 commit 446d0a9
File tree
3 files changed
+244
-217
lines changed- src/Tokenizers
- tests/Core/Tokenizer
3 files changed
+244
-217
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
613 | 616 | | |
614 | 617 | | |
615 | 618 | | |
| |||
1968 | 1971 | | |
1969 | 1972 | | |
1970 | 1973 | | |
1971 | | - | |
1972 | | - | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
1973 | 1977 | | |
1974 | | - | |
| 1978 | + | |
1975 | 1979 | | |
1976 | 1980 | | |
1977 | 1981 | | |
1978 | | - | |
1979 | | - | |
1980 | 1982 | | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1981 | 1992 | | |
1982 | 1993 | | |
1983 | 1994 | | |
| |||
0 commit comments