File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ Token ::
43
43
- FloatValue
44
44
- StringValue
45
45
46
- Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | } . [ lookahead != {` . ` , Digit}]
46
+ Punctuator ::
47
+ - DotPunctuator
48
+ - OtherPunctuator
49
+
50
+ DotPunctuator :: ` . ` [ lookahead != {` . ` , Digit}]
51
+
52
+ OtherPunctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
47
53
48
54
Name ::
49
55
Original file line number Diff line number Diff line change @@ -176,12 +176,25 @@ and is {Ignored}.
176
176
177
177
### Punctuators
178
178
179
- Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | } . [ lookahead != {` . ` , Digit}]
179
+ Punctuator ::
180
+
181
+ - DotPunctuator
182
+ - OtherPunctuator
183
+
184
+ DotPunctuator :: ` . ` [ lookahead != {` . ` , Digit}]
185
+
186
+ OtherPunctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
180
187
181
188
GraphQL documents include punctuation in order to describe structure. GraphQL is
182
189
a data description language and not a programming language, therefore GraphQL
183
190
lacks the punctuation often used to describe mathematical expressions.
184
191
192
+ The {` . ` } punctuator must not be followed by a {` . ` } or {Digit}. This
193
+ ensures that the source {"..."} can only be interpreted as a single {` ... ` } and
194
+ not three {` . ` }. It also avoids any potential ambiguity with {FloatValue}. As
195
+ an example the source {".123"} has no valid lexical representation (without this
196
+ restriction it would have been interpreted as {` . ` } followed by {IntValue}).
197
+
185
198
### Names
186
199
187
200
Name ::
You can’t perform that action at this time.
0 commit comments