Open
Description
🤔 What's the problem you're trying to solve?
I want to provide syntax highlighting (LSP semantic tokens) for the parts of a Gherkin step that is optional in the corresponding Cucumber Expression.
✨ What's your proposed solution?
Use named capture groups for optionals, as explained in cucumber/language-service#57
The return type of match
would change from Argument[] | null
to Match | null
:
export type Match = {
arguments: readonly Argument[]
optionals: readonly Optional[]
}
export type Optional = {
group: Group
}
⛏ Have you considered any alternatives or workarounds?
If we want to support this, I can't think of any other option.
Metadata
Metadata
Assignees
Labels
No labels