tolerant-php-parser
tolerant-php-parser copied to clipboard
Enable more concrete rulesets on DelimitedList
trafficstars
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.
Note: in terms of parsing this is probably a good thing. A post-pass can check for lists that don't have the right number of elements and add errors for them.