microsoft / microsoft/tolerant-php-parser
Enable more concrete rulesets on DelimitedList
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 894
- Forks
- 85
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
Some delimited lists can have empty elements, and some delimited lists cannot. However, we don't specify concrete rulesets for each of these list types, and everything gets parsed in the most lenient way possible. This produces a valid tree, but also means that we're not providing errors where we should. We should revisit all of the classes that extend DelimitedList and define concrete rulesets for each.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating DelimitedList and every class that extends it, then inspect how their current rulesets handle empty elements. Define concrete rulesets for each list type and verify that invalid empty elements produce errors while valid lists still parse; the payload does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100