-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cover grammar application should be more discoverable #3225
Comments
The production could even say what the refinement is. E.g.:
which would give you the supplementary nonterminal to click on. For the LeftHandSideExpression cases, the must-covers are conditional, so you could say something like:
(or briefer words/symbols to that effect), with the understanding that the condition under which it must cover is spelled out in prose nearby. Conceivably, we could devise meta-syntax to express the condition in the annotation, but it's probably not worth the bother. |
Yes, that's the sort of thing I had in mind and that specific approach is already possible with prose assertions:
CallExpression[Yield, Await] : |
There are several parts of the specification that make use of cover grammars, but the details can be buried. The most obvious example is at Left-Hand-Side Expressions, where there is a CallExpression[Yield, Await] : CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await] production but no indication of the supplemental CallMemberExpression[Yield, Await] : MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await] refining its CoverCallExpressionAndAsyncArrowHead that appears after a lot of intervening productions.
I can think of a few ways to address this, and they're non-exclusive:
The text was updated successfully, but these errors were encountered: