Defining quoted enum values should be supported
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 806
- Forks
- 434
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 32
Description
Description of problem
Given an enum with, say, the enum-value of "standard", it would be nice to support:
<pre class="idl">
enum Foo {
"standard"
};
</pre>
<dfn>"standard"</dfn>
What happened (e.g., it crashed)?:
That's not supported (or doesn't work).
Expected behavior (e.g., it shouldn't crash):
It should be possible to support that, if the context is an enum.
Note that <dfn>""</dfn> is supported, so it follows that <dfn>"whatever"</dfn> should be supported too.
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
Locate the enum parsing and quoted-value handling in the JavaScript source, then inspect how the existing empty-string case is supported. Confirm the quoted enum example from the issue is accepted without affecting non-enum definitions, and add or update the relevant tests if the project has coverage for this parser behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100