Skip to content

feat!: reserved rules api, enum consts, const attributes, 0.24.0 #275

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

calebdw
Copy link
Collaborator

@calebdw calebdw commented Jun 2, 2025

This supersedes @amaanq's work in #263

  • use new reserved rules api
  • feat: add support for attributes on global constants PHP 8.5
  • feat: add php_end_tag to grammar and queries
  • fix: enums can have class constants
  • test: add test for async visibility on static properties
  • bumps version to 0.24.0

Closes #272, closes #273, closes #279

Base automatically changed from calebdw/push-wqttnrqlwoql to master June 2, 2025 12:50
@calebdw calebdw force-pushed the calebdw/push-ytvkkqkkxrww branch from 67dd943 to 794d67e Compare June 2, 2025 13:12
@calebdw calebdw force-pushed the calebdw/push-ytvkkqkkxrww branch from 794d67e to 9166e6b Compare June 14, 2025 22:29
@calebdw calebdw requested a review from amaanq June 14, 2025 22:31
@calebdw
Copy link
Collaborator Author

calebdw commented Jun 14, 2025

@amaanq, can you please look at this when you get the chance? I'm not sure if I'm doing something wrong (most likely) or if there's a bug in the reserved functionality...

This test should produce an ERROR:

=========================================
Global constants can't use reserved keywords
=========================================

<?php

const CLASS = 1; // should be an error

---

(program
  (php_tag)
  (const_declaration
    (ERROR
      (integer)))
  (comment))

because class is in the global reserved keyword list, but it's correctly parsing it

@calebdw calebdw force-pushed the calebdw/push-ytvkkqkkxrww branch from 9166e6b to 2206b02 Compare June 14, 2025 23:01
@calebdw calebdw force-pushed the calebdw/push-ytvkkqkkxrww branch from 2206b02 to 5f4ad08 Compare June 17, 2025 03:11
@calebdw calebdw changed the title feat!: use the new reserved rules api feat!: reserved rules api, enum consts, const attributes, 0.24.0 Jun 17, 2025
@calebdw calebdw requested a review from cfroystad June 17, 2025 03:21
@calebdw
Copy link
Collaborator Author

calebdw commented Jun 17, 2025

@cfroystad, can you please review? I just forewent the failing test

@calebdw calebdw force-pushed the calebdw/push-ytvkkqkkxrww branch from 76cc103 to 0a3bdcc Compare July 2, 2025 12:46
@calebdw calebdw force-pushed the calebdw/push-ytvkkqkkxrww branch from 0a3bdcc to a54c9f2 Compare July 2, 2025 12:47
@calebdw
Copy link
Collaborator Author

calebdw commented Jul 2, 2025

@cfroystad, just wanted to ping you for review, I hope everything is going good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: add new node for ?> feature: Enumeration constants issue: tree-sitter-php python package updates
1 participant