Skip to content
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 constraints to EnumValue #55

Merged
merged 1 commit into from
Jul 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions Section 8 -- Grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@ Example_param :
- C_param
- D

A grammar production may specify that certain expansions are not permitted by
using the phrase "but not" and then indicating the expansions to be excluded.

For example, the production:

SafeName : Name but not SevenCarlinWords

means that the nonterminal {SafeName} may be replaced by any sequence of
characters that could replace {Name} provided that the same sequence of
characters could not replace {SevenCarlinWords}.

A grammar may also list a number of restrictions after "but not" seperated
by "or".

For example:

NonBooleanName : Name but not `true` or `false`


## Ignored Source

Expand Down Expand Up @@ -247,7 +265,7 @@ InlineFragment : ... on TypeCondition Directives? SelectionSet

FragmentDefinition : fragment FragmentName on TypeCondition Directives? SelectionSet

FragmentName : [ lookahead ! on ] Name
FragmentName : Name but not `on`

TypeCondition : TypeName

Expand All @@ -271,7 +289,7 @@ BooleanValue :
- true
- false

EnumValue : Name
EnumValue : Name but not `true`, `false` or `null`


#### Array Value
Expand Down