adobe / adobe/htl-spec

Allow trailing commas in optionaValues literal

Open
#91 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
288
Forks
142
PR merge metrics
No merged PRs in 30d

Description

It would be nice to be able to leave trailing commas in a `optionaValues` literal format. I'm not sure the best way to change the grammar, but a possible idea could be:

```
optionValues = exprNode
| '[' , valueList [, ','] , ']' ;
```

This may have a conflict with `valueList` since it also contains commas, but I think it will work fine, since when in `valueList` all infix commas will be consumed, leaving just the trailing comma to be optionally consumed by `optionValues`

Contributor guide

Open the contributing guide

Research direction

Start by locating the grammar productions for optionValues and valueList, then check how commas are currently parsed in optionValues literals. Confirm that a trailing comma is accepted without changing infix comma handling, and add or update grammar tests if the project provides them.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.