microsoft / microsoft/tolerant-php-parser

Reserved words seems outdated

Open
#413 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
894
Forks
85
Avg merge
2d 13h
Merged PRs (30d)
3

Description

I've seen errors like this https://github.com/zobo/php-language-server/issues/81 because namespace/classes used reserved words - that the list https://www.php.net/manual/en/reserved.other-reserved-words.php does not include anymore. https://github.com/microsoft/tolerant-php-parser/blob/main/src/TokenStringMaps.php#L103

Propose to clean up the list.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/TokenStringMaps.php around line 103 and compare its reserved-word entries with the current PHP documentation and the linked parser reference. Confirm which entries are obsolete, update the list, and verify parser behavior for namespaces or classes using the affected words.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.