Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 22, 2025

This commit introduces four new public methods and an internal helper class.

  • Constants::getAttributeOpeners() - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for a T_CONST token.
  • FunctionDeclarations::getAttributeOpeners() - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for a T_FUNCTION, T_CLOSUREorT_FN` token.
  • ObjectDeclarations::getAttributeOpeners() - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for an OO token.
  • Variables::getAttributeOpeners() - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for a T_VARIABLE token, providing the variable token is either an OO property or a parameter in a function declaration.

Includes ample tests.

Related to #616

This commit introduces four new public methods and an internal helper class.
* `Constants::getAttributeOpeners()` - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for a `T_CONST` token.
* `FunctionDeclarations::getAttributeOpeners()` - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for a `T_FUNCTION`, T_CLOSURE` or `T_FN` token.
* `ObjectDeclarations::getAttributeOpeners()` - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for an OO token.
* `Variables::getAttributeOpeners()` - to retrieve the stack pointers to the attribute openers for the applicable attribute blocks for a `T_VARIABLE` token, providing the variable token is either an OO property or a parameter in a function declaration.

Includes ample tests.

Related to #616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant