-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add optional mod to terminals #14
Add optional mod to terminals #14
Conversation
d8d2db8
to
7b1a3d9
Compare
src/grammar.pegjs
Outdated
}; | ||
} | ||
|
||
terminal = value:$(([^ \n"/`] [^ \n"\`,\]\}]*)) { | ||
terminal = value:$(([^ ?\n"/`] [^ ?\n"\`,\]\}]*)) quantifier:('?')? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary to change here as well. ?
as part of a terminal should be allowed. I think it is okay to require quoting the terminal to apply a ?
to remove ambiguity.
src/grammar.pegjs
Outdated
@@ -633,20 +633,22 @@ regexp = '/' value:$(([^/\n] / '\\/')+)? closer:'/'? { | |||
}; | |||
} | |||
|
|||
quotedTerminal = '`' value:$(([^`\n] / ('\\`'))+)? closer:'`' { | |||
quotedTerminal = '`' value:$(([^`\n] / ('\\`'))+)? closer:'`' quantifier:('?')? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For completeness, this should include all of the possible quantifiers. See nonTerminal
for an example of that
Could you include a reference to this in the specmd documentation? That sort of serves as its own test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tossing this back into your review queue for the addition of docs
As we discussed on this PR graphql/graphql-spec#323 (comment)
This looks like this now