microsoft / microsoft/tolerant-php-parser

Enable more concrete rulesets on DelimitedList

Open
#5 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

error-handling
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.