Skip to content

Tokenizer: isset/unset/empty/eval/exit/die now contain parenthesis information #1014

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

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 15, 2025

Description

⚠️ This PR depends on PR #1010 + #1012, which need to be merged first. ⚠️


Suggested changelog entry

  • T_ISSET, T_UNSET, T_EMPTY, T_EVAL and T_EXIT tokens now contain parenthesis information.
    • Previously, you had to find the opening and closing parenthesis by looking forward through the token stack.
    • Now, you can use the parenthesis_owner, parenthesis_opener and parenthesis_closer array indexes.

Related issues/external references

Fixes #23

@jrfnl jrfnl added this to the 4.0.0 milestone Apr 15, 2025
@jrfnl jrfnl force-pushed the phpcs-4.0/feature/tokenizer-createtokenmap-stabilize-parenthesis-keys branch from 72df320 to da0d224 Compare April 17, 2025 13:26
Base automatically changed from phpcs-4.0/feature/tokenizer-createtokenmap-stabilize-parenthesis-keys to 4.x April 17, 2025 13:57
@jrfnl jrfnl force-pushed the phpcs-4.0/feature/23-tokenizer-isset-unset-empty-eval-exit-parentheses-owner branch from dbaae13 to 95f8443 Compare April 17, 2025 14:01
@jrfnl
Copy link
Member Author

jrfnl commented Apr 17, 2025

Rebased without changes after the merge of #1010 and #1012, which also gets rid of the merge conflict.

@jrfnl jrfnl marked this pull request as ready for review April 17, 2025 14:01
@jrfnl jrfnl merged commit 268d6ad into 4.x Apr 17, 2025
62 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/23-tokenizer-isset-unset-empty-eval-exit-parentheses-owner branch April 17, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants