@@ -203,7 +203,9 @@ export class Parser {
203
203
// Implements the parsing rules in the Document section.
204
204
205
205
/**
206
+ * ```
206
207
* Document : Definition+
208
+ * ```
207
209
*/
208
210
parseDocument ( ) : DocumentNode {
209
211
return this . node < DocumentNode > ( this . _lexer . token , {
@@ -217,6 +219,7 @@ export class Parser {
217
219
}
218
220
219
221
/**
222
+ * ```
220
223
* Definition :
221
224
* - ExecutableDefinition
222
225
* - TypeSystemDefinition
@@ -225,6 +228,7 @@ export class Parser {
225
228
* ExecutableDefinition :
226
229
* - OperationDefinition
227
230
* - FragmentDefinition
231
+ * ```
228
232
*/
229
233
parseDefinition ( ) : DefinitionNode {
230
234
if ( this . peek ( TokenKind . NAME ) ) {
@@ -259,9 +263,11 @@ export class Parser {
259
263
// Implements the parsing rules in the Operations section.
260
264
261
265
/**
266
+ * ```
262
267
* OperationDefinition :
263
268
* - SelectionSet
264
269
* - OperationType Name? VariableDefinitions? Directives? SelectionSet
270
+ * ```
265
271
*/
266
272
parseOperationDefinition ( ) : OperationDefinitionNode {
267
273
const start = this . _lexer . token ;
@@ -291,7 +297,9 @@ export class Parser {
291
297
}
292
298
293
299
/**
300
+ * ```
294
301
* OperationType : one of query mutation subscription
302
+ * ```
295
303
*/
296
304
parseOperationType ( ) : OperationTypeNode {
297
305
const operationToken = this . expectToken ( TokenKind . NAME ) ;
@@ -308,7 +316,9 @@ export class Parser {
308
316
}
309
317
310
318
/**
319
+ * ```
311
320
* VariableDefinitions : ( VariableDefinition+ )
321
+ * ```
312
322
*/
313
323
parseVariableDefinitions ( ) : Array < VariableDefinitionNode > {
314
324
return this . optionalMany (
@@ -319,7 +329,9 @@ export class Parser {
319
329
}
320
330
321
331
/**
332
+ * ```
322
333
* VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
334
+ * ```
323
335
*/
324
336
parseVariableDefinition ( ) : VariableDefinitionNode {
325
337
return this . node < VariableDefinitionNode > ( this . _lexer . token , {
@@ -346,7 +358,9 @@ export class Parser {
346
358
}
347
359
348
360
/**
349
- * SelectionSet : `{ Selection+ }`
361
+ * ```
362
+ * SelectionSet : { Selection+ }
363
+ * ```
350
364
*/
351
365
parseSelectionSet ( ) : SelectionSetNode {
352
366
return this . node < SelectionSetNode > ( this . _lexer . token , {
@@ -616,9 +630,11 @@ export class Parser {
616
630
}
617
631
618
632
/**
633
+ * ```
619
634
* ObjectValue[Const] :
620
- * - `{ }`
621
- * - `{ ObjectField[?Const]+ }`
635
+ * - { }
636
+ * - { ObjectField[?Const]+ }
637
+ * ```
622
638
*/
623
639
parseObject ( isConst : true ) : ConstObjectValueNode ;
624
640
parseObject ( isConst : boolean ) : ObjectValueNode ;
@@ -666,7 +682,9 @@ export class Parser {
666
682
}
667
683
668
684
/**
669
- * Directive[Const] : `@ Name Arguments[?Const]?`
685
+ * ```
686
+ * Directive[Const] : @ Name Arguments[?Const]?
687
+ * ```
670
688
*/
671
689
parseDirective ( isConst : true ) : ConstDirectiveNode ;
672
690
parseDirective ( isConst : boolean ) : DirectiveNode ;
@@ -782,7 +800,9 @@ export class Parser {
782
800
}
783
801
784
802
/**
785
- * SchemaDefinition : `Description? schema Directives[Const]? { OperationTypeDefinition+ }`
803
+ * ```
804
+ * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
805
+ * ```
786
806
*/
787
807
parseSchemaDefinition ( ) : SchemaDefinitionNode {
788
808
const start = this . _lexer . token ;
@@ -869,7 +889,9 @@ export class Parser {
869
889
}
870
890
871
891
/**
872
- * FieldsDefinition : `{ FieldDefinition+ }`
892
+ * ```
893
+ * FieldsDefinition : { FieldDefinition+ }
894
+ * ```
873
895
*/
874
896
parseFieldsDefinition ( ) : Array < FieldDefinitionNode > {
875
897
return this . optionalMany (
@@ -1011,7 +1033,9 @@ export class Parser {
1011
1033
}
1012
1034
1013
1035
/**
1014
- * EnumValuesDefinition : `{ EnumValueDefinition+ }`
1036
+ * ```
1037
+ * EnumValuesDefinition : { EnumValueDefinition+ }
1038
+ * ```
1015
1039
*/
1016
1040
parseEnumValuesDefinition ( ) : Array < EnumValueDefinitionNode > {
1017
1041
return this . optionalMany (
@@ -1060,7 +1084,9 @@ export class Parser {
1060
1084
}
1061
1085
1062
1086
/**
1063
- * InputFieldsDefinition : `{ InputValueDefinition+ }`
1087
+ * ```
1088
+ * InputFieldsDefinition : { InputValueDefinition+ }
1089
+ * ```
1064
1090
*/
1065
1091
parseInputFieldsDefinition ( ) : Array < InputValueDefinitionNode > {
1066
1092
return this . optionalMany (
@@ -1109,9 +1135,11 @@ export class Parser {
1109
1135
}
1110
1136
1111
1137
/**
1138
+ * ```
1112
1139
* SchemaExtension :
1113
- * - `extend schema Directives[Const]? { OperationTypeDefinition+ }`
1114
- * - `extend schema Directives[Const]`
1140
+ * - extend schema Directives[Const]? { OperationTypeDefinition+ }
1141
+ * - extend schema Directives[Const]
1142
+ * ```
1115
1143
*/
1116
1144
parseSchemaExtension ( ) : SchemaExtensionNode {
1117
1145
const start = this . _lexer . token ;
@@ -1283,8 +1311,10 @@ export class Parser {
1283
1311
}
1284
1312
1285
1313
/**
1314
+ * ```
1286
1315
* DirectiveDefinition :
1287
- * - `Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations`
1316
+ * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
1317
+ * ```
1288
1318
*/
1289
1319
parseDirectiveDefinition ( ) : DirectiveDefinitionNode {
1290
1320
const start = this . _lexer . token ;
0 commit comments