Add an upcast expression
[hiphop-php.git] / hphp / hack / src / parser / full_fidelity_syntax_type.ml
blob6d79e94458e3877af2e00a1f2f06373b496567c5
1 (*
2 * Copyright (c) 2016, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree. An additional
7 * directory.
9 **
11 * THIS FILE IS @generated; DO NOT EDIT IT
12 * To regenerate this file, run
14 * buck run //hphp/hack/src:generate_full_fidelity
18 * This module contains the type describing the structure of a syntax tree.
20 * The structure of the syntax tree is described by the collection of recursive
21 * types that makes up the bulk of this file. The type `t` is the type of a node
22 * in the syntax tree; each node has associated with it an arbitrary value of
23 * type `SyntaxValue.t`, and syntax node proper, which has structure given by
24 * the `syntax` type.
26 * Note that every child in the syntax tree is of type `t`, except for the
27 * `Token.t` type. This should be the *only* child of a type other than `t`.
28 * We are explicitly NOT attempting to impose a type structure on the parse
29 * tree beyond what is already implied by the types here. For example,
30 * we are not attempting to put into the type system here the restriction that
31 * the children of a binary operator must be expressions. The reason for this
32 * is because we are potentially parsing code as it is being typed, and we
33 * do not want to restrict our ability to make good error recovery by imposing
34 * a restriction that will only be valid in correct program text.
36 * That said, it would of course be ideal if the only children of a compound
37 * statement were statements, and so on. But those invariants should be
38 * imposed by the design of the parser, not by the type system of the syntax
39 * tree code.
41 * We want to be able to use different kinds of tokens, with different
42 * performance characteristics. Moreover, we want to associate arbitrary values
43 * with the syntax nodes, so that we can construct syntax trees with various
44 * properties -- trees that only know their widths and are thereby cheap to
45 * serialize, trees that have full position data for each node, trees where the
46 * tokens know their text and can therefore be edited, trees that have name
47 * annotations or type annotations, and so on.
49 * We wish to associate arbitrary values with the syntax nodes so that we can
50 * construct syntax trees with various properties -- trees that only know
51 * their widths and are thereby cheap to serialize, trees that have full
52 * position data for each node, trees where the tokens know their text and
53 * can therefore be edited, trees that have name annotations or type
54 * annotations, and so on.
56 * Therefore this module is functorized by the types for token and value to be
57 * associated with the node.
60 module type TokenType = sig
61 module Trivia : Lexable_trivia_sig.LexableTrivia_S
63 type t [@@deriving show, eq]
65 val kind : t -> Full_fidelity_token_kind.t
67 val to_json : t -> Hh_json.json
69 val leading : t -> Trivia.t list
70 end
72 module type SyntaxValueType = sig
73 type t [@@deriving show, eq]
75 val to_json : t -> Hh_json.json
76 end
78 (* This functor describe the shape of a parse tree that has a particular kind of
79 * token in the leaves, and a particular kind of value associated with each
80 * node.
82 module MakeSyntaxType (Token : TokenType) (SyntaxValue : SyntaxValueType) =
83 struct
84 type value = SyntaxValue.t [@@deriving show, eq]
86 type t = {
87 syntax: syntax;
88 value: value;
90 [@@deriving show, eq]
92 and function_declaration = {
93 function_attribute_spec: t;
94 function_declaration_header: t;
95 function_body: t;
98 and function_declaration_header = {
99 function_modifiers: t;
100 function_keyword: t;
101 function_name: t;
102 function_type_parameter_list: t;
103 function_left_paren: t;
104 function_parameter_list: t;
105 function_right_paren: t;
106 function_contexts: t;
107 function_colon: t;
108 function_readonly_return: t;
109 function_type: t;
110 function_where_clause: t;
113 and methodish_declaration = {
114 methodish_attribute: t;
115 methodish_function_decl_header: t;
116 methodish_function_body: t;
117 methodish_semicolon: t;
120 and anonymous_function = {
121 anonymous_attribute_spec: t;
122 anonymous_async_keyword: t;
123 anonymous_function_keyword: t;
124 anonymous_left_paren: t;
125 anonymous_parameters: t;
126 anonymous_right_paren: t;
127 anonymous_ctx_list: t;
128 anonymous_colon: t;
129 anonymous_readonly_return: t;
130 anonymous_type: t;
131 anonymous_use: t;
132 anonymous_body: t;
135 and lambda_expression = {
136 lambda_attribute_spec: t;
137 lambda_async: t;
138 lambda_signature: t;
139 lambda_arrow: t;
140 lambda_body: t;
143 and lambda_signature = {
144 lambda_left_paren: t;
145 lambda_parameters: t;
146 lambda_right_paren: t;
147 lambda_contexts: t;
148 lambda_colon: t;
149 lambda_readonly_return: t;
150 lambda_type: t;
153 and closure_type_specifier = {
154 closure_outer_left_paren: t;
155 closure_readonly_keyword: t;
156 closure_function_keyword: t;
157 closure_inner_left_paren: t;
158 closure_parameter_list: t;
159 closure_inner_right_paren: t;
160 closure_contexts: t;
161 closure_colon: t;
162 closure_readonly_return: t;
163 closure_return_type: t;
164 closure_outer_right_paren: t;
167 and syntax =
168 | Token of Token.t
169 | Missing
170 | SyntaxList of t list
171 | EndOfFile of { end_of_file_token: t }
172 | Script of { script_declarations: t }
173 | QualifiedName of { qualified_name_parts: t }
174 | SimpleTypeSpecifier of { simple_type_specifier: t }
175 | LiteralExpression of { literal_expression: t }
176 | PrefixedStringExpression of {
177 prefixed_string_name: t;
178 prefixed_string_str: t;
180 | PrefixedCodeExpression of {
181 prefixed_code_prefix: t;
182 prefixed_code_left_backtick: t;
183 prefixed_code_expression: t;
184 prefixed_code_right_backtick: t;
186 | VariableExpression of { variable_expression: t }
187 | PipeVariableExpression of { pipe_variable_expression: t }
188 | FileAttributeSpecification of {
189 file_attribute_specification_left_double_angle: t;
190 file_attribute_specification_keyword: t;
191 file_attribute_specification_colon: t;
192 file_attribute_specification_attributes: t;
193 file_attribute_specification_right_double_angle: t;
195 | EnumDeclaration of {
196 enum_attribute_spec: t;
197 enum_keyword: t;
198 enum_name: t;
199 enum_colon: t;
200 enum_base: t;
201 enum_type: t;
202 enum_left_brace: t;
203 enum_use_clauses: t;
204 enum_enumerators: t;
205 enum_right_brace: t;
207 | EnumUse of {
208 enum_use_keyword: t;
209 enum_use_names: t;
210 enum_use_semicolon: t;
212 | Enumerator of {
213 enumerator_name: t;
214 enumerator_equal: t;
215 enumerator_value: t;
216 enumerator_semicolon: t;
218 | EnumClassDeclaration of {
219 enum_class_attribute_spec: t;
220 enum_class_modifiers: t;
221 enum_class_enum_keyword: t;
222 enum_class_class_keyword: t;
223 enum_class_name: t;
224 enum_class_colon: t;
225 enum_class_base: t;
226 enum_class_extends: t;
227 enum_class_extends_list: t;
228 enum_class_left_brace: t;
229 enum_class_elements: t;
230 enum_class_right_brace: t;
232 | EnumClassEnumerator of {
233 enum_class_enumerator_modifiers: t;
234 enum_class_enumerator_type: t;
235 enum_class_enumerator_name: t;
236 enum_class_enumerator_initializer: t;
237 enum_class_enumerator_semicolon: t;
239 | RecordDeclaration of {
240 record_attribute_spec: t;
241 record_modifier: t;
242 record_keyword: t;
243 record_name: t;
244 record_extends_keyword: t;
245 record_extends_opt: t;
246 record_left_brace: t;
247 record_fields: t;
248 record_right_brace: t;
250 | RecordField of {
251 record_field_type: t;
252 record_field_name: t;
253 record_field_init: t;
254 record_field_semi: t;
256 | AliasDeclaration of {
257 alias_attribute_spec: t;
258 alias_keyword: t;
259 alias_name: t;
260 alias_generic_parameter: t;
261 alias_constraint: t;
262 alias_equal: t;
263 alias_type: t;
264 alias_semicolon: t;
266 | ContextAliasDeclaration of {
267 ctx_alias_attribute_spec: t;
268 ctx_alias_keyword: t;
269 ctx_alias_name: t;
270 ctx_alias_generic_parameter: t;
271 ctx_alias_as_constraint: t;
272 ctx_alias_equal: t;
273 ctx_alias_context: t;
274 ctx_alias_semicolon: t;
276 | PropertyDeclaration of {
277 property_attribute_spec: t;
278 property_modifiers: t;
279 property_type: t;
280 property_declarators: t;
281 property_semicolon: t;
283 | PropertyDeclarator of {
284 property_name: t;
285 property_initializer: t;
287 | NamespaceDeclaration of {
288 namespace_header: t;
289 namespace_body: t;
291 | NamespaceDeclarationHeader of {
292 namespace_keyword: t;
293 namespace_name: t;
295 | NamespaceBody of {
296 namespace_left_brace: t;
297 namespace_declarations: t;
298 namespace_right_brace: t;
300 | NamespaceEmptyBody of { namespace_semicolon: t }
301 | NamespaceUseDeclaration of {
302 namespace_use_keyword: t;
303 namespace_use_kind: t;
304 namespace_use_clauses: t;
305 namespace_use_semicolon: t;
307 | NamespaceGroupUseDeclaration of {
308 namespace_group_use_keyword: t;
309 namespace_group_use_kind: t;
310 namespace_group_use_prefix: t;
311 namespace_group_use_left_brace: t;
312 namespace_group_use_clauses: t;
313 namespace_group_use_right_brace: t;
314 namespace_group_use_semicolon: t;
316 | NamespaceUseClause of {
317 namespace_use_clause_kind: t;
318 namespace_use_name: t;
319 namespace_use_as: t;
320 namespace_use_alias: t;
322 | FunctionDeclaration of {
323 function_attribute_spec: t;
324 function_declaration_header: t;
325 function_body: t;
327 | FunctionDeclarationHeader of {
328 function_modifiers: t;
329 function_keyword: t;
330 function_name: t;
331 function_type_parameter_list: t;
332 function_left_paren: t;
333 function_parameter_list: t;
334 function_right_paren: t;
335 function_contexts: t;
336 function_colon: t;
337 function_readonly_return: t;
338 function_type: t;
339 function_where_clause: t;
341 | Contexts of {
342 contexts_left_bracket: t;
343 contexts_types: t;
344 contexts_right_bracket: t;
346 | WhereClause of {
347 where_clause_keyword: t;
348 where_clause_constraints: t;
350 | WhereConstraint of {
351 where_constraint_left_type: t;
352 where_constraint_operator: t;
353 where_constraint_right_type: t;
355 | MethodishDeclaration of {
356 methodish_attribute: t;
357 methodish_function_decl_header: t;
358 methodish_function_body: t;
359 methodish_semicolon: t;
361 | MethodishTraitResolution of {
362 methodish_trait_attribute: t;
363 methodish_trait_function_decl_header: t;
364 methodish_trait_equal: t;
365 methodish_trait_name: t;
366 methodish_trait_semicolon: t;
368 | ClassishDeclaration of {
369 classish_attribute: t;
370 classish_modifiers: t;
371 classish_xhp: t;
372 classish_keyword: t;
373 classish_name: t;
374 classish_type_parameters: t;
375 classish_extends_keyword: t;
376 classish_extends_list: t;
377 classish_implements_keyword: t;
378 classish_implements_list: t;
379 classish_where_clause: t;
380 classish_body: t;
382 | ClassishBody of {
383 classish_body_left_brace: t;
384 classish_body_elements: t;
385 classish_body_right_brace: t;
387 | TraitUsePrecedenceItem of {
388 trait_use_precedence_item_name: t;
389 trait_use_precedence_item_keyword: t;
390 trait_use_precedence_item_removed_names: t;
392 | TraitUseAliasItem of {
393 trait_use_alias_item_aliasing_name: t;
394 trait_use_alias_item_keyword: t;
395 trait_use_alias_item_modifiers: t;
396 trait_use_alias_item_aliased_name: t;
398 | TraitUseConflictResolution of {
399 trait_use_conflict_resolution_keyword: t;
400 trait_use_conflict_resolution_names: t;
401 trait_use_conflict_resolution_left_brace: t;
402 trait_use_conflict_resolution_clauses: t;
403 trait_use_conflict_resolution_right_brace: t;
405 | TraitUse of {
406 trait_use_keyword: t;
407 trait_use_names: t;
408 trait_use_semicolon: t;
410 | RequireClause of {
411 require_keyword: t;
412 require_kind: t;
413 require_name: t;
414 require_semicolon: t;
416 | ConstDeclaration of {
417 const_modifiers: t;
418 const_keyword: t;
419 const_type_specifier: t;
420 const_declarators: t;
421 const_semicolon: t;
423 | ConstantDeclarator of {
424 constant_declarator_name: t;
425 constant_declarator_initializer: t;
427 | TypeConstDeclaration of {
428 type_const_attribute_spec: t;
429 type_const_modifiers: t;
430 type_const_keyword: t;
431 type_const_type_keyword: t;
432 type_const_name: t;
433 type_const_type_parameters: t;
434 type_const_type_constraint: t;
435 type_const_equal: t;
436 type_const_type_specifier: t;
437 type_const_semicolon: t;
439 | ContextConstDeclaration of {
440 context_const_modifiers: t;
441 context_const_const_keyword: t;
442 context_const_ctx_keyword: t;
443 context_const_name: t;
444 context_const_type_parameters: t;
445 context_const_constraint: t;
446 context_const_equal: t;
447 context_const_ctx_list: t;
448 context_const_semicolon: t;
450 | DecoratedExpression of {
451 decorated_expression_decorator: t;
452 decorated_expression_expression: t;
454 | ParameterDeclaration of {
455 parameter_attribute: t;
456 parameter_visibility: t;
457 parameter_call_convention: t;
458 parameter_readonly: t;
459 parameter_type: t;
460 parameter_name: t;
461 parameter_default_value: t;
463 | VariadicParameter of {
464 variadic_parameter_call_convention: t;
465 variadic_parameter_type: t;
466 variadic_parameter_ellipsis: t;
468 | OldAttributeSpecification of {
469 old_attribute_specification_left_double_angle: t;
470 old_attribute_specification_attributes: t;
471 old_attribute_specification_right_double_angle: t;
473 | AttributeSpecification of { attribute_specification_attributes: t }
474 | Attribute of {
475 attribute_at: t;
476 attribute_attribute_name: t;
478 | InclusionExpression of {
479 inclusion_require: t;
480 inclusion_filename: t;
482 | InclusionDirective of {
483 inclusion_expression: t;
484 inclusion_semicolon: t;
486 | CompoundStatement of {
487 compound_left_brace: t;
488 compound_statements: t;
489 compound_right_brace: t;
491 | ExpressionStatement of {
492 expression_statement_expression: t;
493 expression_statement_semicolon: t;
495 | MarkupSection of {
496 markup_hashbang: t;
497 markup_suffix: t;
499 | MarkupSuffix of {
500 markup_suffix_less_than_question: t;
501 markup_suffix_name: t;
503 | UnsetStatement of {
504 unset_keyword: t;
505 unset_left_paren: t;
506 unset_variables: t;
507 unset_right_paren: t;
508 unset_semicolon: t;
510 | UsingStatementBlockScoped of {
511 using_block_await_keyword: t;
512 using_block_using_keyword: t;
513 using_block_left_paren: t;
514 using_block_expressions: t;
515 using_block_right_paren: t;
516 using_block_body: t;
518 | UsingStatementFunctionScoped of {
519 using_function_await_keyword: t;
520 using_function_using_keyword: t;
521 using_function_expression: t;
522 using_function_semicolon: t;
524 | WhileStatement of {
525 while_keyword: t;
526 while_left_paren: t;
527 while_condition: t;
528 while_right_paren: t;
529 while_body: t;
531 | IfStatement of {
532 if_keyword: t;
533 if_left_paren: t;
534 if_condition: t;
535 if_right_paren: t;
536 if_statement: t;
537 if_elseif_clauses: t;
538 if_else_clause: t;
540 | ElseifClause of {
541 elseif_keyword: t;
542 elseif_left_paren: t;
543 elseif_condition: t;
544 elseif_right_paren: t;
545 elseif_statement: t;
547 | ElseClause of {
548 else_keyword: t;
549 else_statement: t;
551 | TryStatement of {
552 try_keyword: t;
553 try_compound_statement: t;
554 try_catch_clauses: t;
555 try_finally_clause: t;
557 | CatchClause of {
558 catch_keyword: t;
559 catch_left_paren: t;
560 catch_type: t;
561 catch_variable: t;
562 catch_right_paren: t;
563 catch_body: t;
565 | FinallyClause of {
566 finally_keyword: t;
567 finally_body: t;
569 | DoStatement of {
570 do_keyword: t;
571 do_body: t;
572 do_while_keyword: t;
573 do_left_paren: t;
574 do_condition: t;
575 do_right_paren: t;
576 do_semicolon: t;
578 | ForStatement of {
579 for_keyword: t;
580 for_left_paren: t;
581 for_initializer: t;
582 for_first_semicolon: t;
583 for_control: t;
584 for_second_semicolon: t;
585 for_end_of_loop: t;
586 for_right_paren: t;
587 for_body: t;
589 | ForeachStatement of {
590 foreach_keyword: t;
591 foreach_left_paren: t;
592 foreach_collection: t;
593 foreach_await_keyword: t;
594 foreach_as: t;
595 foreach_key: t;
596 foreach_arrow: t;
597 foreach_value: t;
598 foreach_right_paren: t;
599 foreach_body: t;
601 | SwitchStatement of {
602 switch_keyword: t;
603 switch_left_paren: t;
604 switch_expression: t;
605 switch_right_paren: t;
606 switch_left_brace: t;
607 switch_sections: t;
608 switch_right_brace: t;
610 | SwitchSection of {
611 switch_section_labels: t;
612 switch_section_statements: t;
613 switch_section_fallthrough: t;
615 | SwitchFallthrough of {
616 fallthrough_keyword: t;
617 fallthrough_semicolon: t;
619 | CaseLabel of {
620 case_keyword: t;
621 case_expression: t;
622 case_colon: t;
624 | DefaultLabel of {
625 default_keyword: t;
626 default_colon: t;
628 | ReturnStatement of {
629 return_keyword: t;
630 return_expression: t;
631 return_semicolon: t;
633 | YieldBreakStatement of {
634 yield_break_keyword: t;
635 yield_break_break: t;
636 yield_break_semicolon: t;
638 | ThrowStatement of {
639 throw_keyword: t;
640 throw_expression: t;
641 throw_semicolon: t;
643 | BreakStatement of {
644 break_keyword: t;
645 break_semicolon: t;
647 | ContinueStatement of {
648 continue_keyword: t;
649 continue_semicolon: t;
651 | EchoStatement of {
652 echo_keyword: t;
653 echo_expressions: t;
654 echo_semicolon: t;
656 | ConcurrentStatement of {
657 concurrent_keyword: t;
658 concurrent_statement: t;
660 | SimpleInitializer of {
661 simple_initializer_equal: t;
662 simple_initializer_value: t;
664 | AnonymousClass of {
665 anonymous_class_class_keyword: t;
666 anonymous_class_left_paren: t;
667 anonymous_class_argument_list: t;
668 anonymous_class_right_paren: t;
669 anonymous_class_extends_keyword: t;
670 anonymous_class_extends_list: t;
671 anonymous_class_implements_keyword: t;
672 anonymous_class_implements_list: t;
673 anonymous_class_body: t;
675 | AnonymousFunction of {
676 anonymous_attribute_spec: t;
677 anonymous_async_keyword: t;
678 anonymous_function_keyword: t;
679 anonymous_left_paren: t;
680 anonymous_parameters: t;
681 anonymous_right_paren: t;
682 anonymous_ctx_list: t;
683 anonymous_colon: t;
684 anonymous_readonly_return: t;
685 anonymous_type: t;
686 anonymous_use: t;
687 anonymous_body: t;
689 | AnonymousFunctionUseClause of {
690 anonymous_use_keyword: t;
691 anonymous_use_left_paren: t;
692 anonymous_use_variables: t;
693 anonymous_use_right_paren: t;
695 | LambdaExpression of {
696 lambda_attribute_spec: t;
697 lambda_async: t;
698 lambda_signature: t;
699 lambda_arrow: t;
700 lambda_body: t;
702 | LambdaSignature of {
703 lambda_left_paren: t;
704 lambda_parameters: t;
705 lambda_right_paren: t;
706 lambda_contexts: t;
707 lambda_colon: t;
708 lambda_readonly_return: t;
709 lambda_type: t;
711 | CastExpression of {
712 cast_left_paren: t;
713 cast_type: t;
714 cast_right_paren: t;
715 cast_operand: t;
717 | ScopeResolutionExpression of {
718 scope_resolution_qualifier: t;
719 scope_resolution_operator: t;
720 scope_resolution_name: t;
722 | MemberSelectionExpression of {
723 member_object: t;
724 member_operator: t;
725 member_name: t;
727 | SafeMemberSelectionExpression of {
728 safe_member_object: t;
729 safe_member_operator: t;
730 safe_member_name: t;
732 | EmbeddedMemberSelectionExpression of {
733 embedded_member_object: t;
734 embedded_member_operator: t;
735 embedded_member_name: t;
737 | YieldExpression of {
738 yield_keyword: t;
739 yield_operand: t;
741 | PrefixUnaryExpression of {
742 prefix_unary_operator: t;
743 prefix_unary_operand: t;
745 | PostfixUnaryExpression of {
746 postfix_unary_operand: t;
747 postfix_unary_operator: t;
749 | BinaryExpression of {
750 binary_left_operand: t;
751 binary_operator: t;
752 binary_right_operand: t;
754 | IsExpression of {
755 is_left_operand: t;
756 is_operator: t;
757 is_right_operand: t;
759 | AsExpression of {
760 as_left_operand: t;
761 as_operator: t;
762 as_right_operand: t;
764 | NullableAsExpression of {
765 nullable_as_left_operand: t;
766 nullable_as_operator: t;
767 nullable_as_right_operand: t;
769 | UpcastExpression of {
770 upcast_left_operand: t;
771 upcast_operator: t;
772 upcast_right_operand: t;
774 | ConditionalExpression of {
775 conditional_test: t;
776 conditional_question: t;
777 conditional_consequence: t;
778 conditional_colon: t;
779 conditional_alternative: t;
781 | EvalExpression of {
782 eval_keyword: t;
783 eval_left_paren: t;
784 eval_argument: t;
785 eval_right_paren: t;
787 | IssetExpression of {
788 isset_keyword: t;
789 isset_left_paren: t;
790 isset_argument_list: t;
791 isset_right_paren: t;
793 | FunctionCallExpression of {
794 function_call_receiver: t;
795 function_call_type_args: t;
796 function_call_enum_class_label: t;
797 function_call_left_paren: t;
798 function_call_argument_list: t;
799 function_call_right_paren: t;
801 | FunctionPointerExpression of {
802 function_pointer_receiver: t;
803 function_pointer_type_args: t;
805 | ParenthesizedExpression of {
806 parenthesized_expression_left_paren: t;
807 parenthesized_expression_expression: t;
808 parenthesized_expression_right_paren: t;
810 | BracedExpression of {
811 braced_expression_left_brace: t;
812 braced_expression_expression: t;
813 braced_expression_right_brace: t;
815 | ETSpliceExpression of {
816 et_splice_expression_dollar: t;
817 et_splice_expression_left_brace: t;
818 et_splice_expression_expression: t;
819 et_splice_expression_right_brace: t;
821 | EmbeddedBracedExpression of {
822 embedded_braced_expression_left_brace: t;
823 embedded_braced_expression_expression: t;
824 embedded_braced_expression_right_brace: t;
826 | ListExpression of {
827 list_keyword: t;
828 list_left_paren: t;
829 list_members: t;
830 list_right_paren: t;
832 | CollectionLiteralExpression of {
833 collection_literal_name: t;
834 collection_literal_left_brace: t;
835 collection_literal_initializers: t;
836 collection_literal_right_brace: t;
838 | ObjectCreationExpression of {
839 object_creation_new_keyword: t;
840 object_creation_object: t;
842 | ConstructorCall of {
843 constructor_call_type: t;
844 constructor_call_left_paren: t;
845 constructor_call_argument_list: t;
846 constructor_call_right_paren: t;
848 | RecordCreationExpression of {
849 record_creation_type: t;
850 record_creation_left_bracket: t;
851 record_creation_members: t;
852 record_creation_right_bracket: t;
854 | DarrayIntrinsicExpression of {
855 darray_intrinsic_keyword: t;
856 darray_intrinsic_explicit_type: t;
857 darray_intrinsic_left_bracket: t;
858 darray_intrinsic_members: t;
859 darray_intrinsic_right_bracket: t;
861 | DictionaryIntrinsicExpression of {
862 dictionary_intrinsic_keyword: t;
863 dictionary_intrinsic_explicit_type: t;
864 dictionary_intrinsic_left_bracket: t;
865 dictionary_intrinsic_members: t;
866 dictionary_intrinsic_right_bracket: t;
868 | KeysetIntrinsicExpression of {
869 keyset_intrinsic_keyword: t;
870 keyset_intrinsic_explicit_type: t;
871 keyset_intrinsic_left_bracket: t;
872 keyset_intrinsic_members: t;
873 keyset_intrinsic_right_bracket: t;
875 | VarrayIntrinsicExpression of {
876 varray_intrinsic_keyword: t;
877 varray_intrinsic_explicit_type: t;
878 varray_intrinsic_left_bracket: t;
879 varray_intrinsic_members: t;
880 varray_intrinsic_right_bracket: t;
882 | VectorIntrinsicExpression of {
883 vector_intrinsic_keyword: t;
884 vector_intrinsic_explicit_type: t;
885 vector_intrinsic_left_bracket: t;
886 vector_intrinsic_members: t;
887 vector_intrinsic_right_bracket: t;
889 | ElementInitializer of {
890 element_key: t;
891 element_arrow: t;
892 element_value: t;
894 | SubscriptExpression of {
895 subscript_receiver: t;
896 subscript_left_bracket: t;
897 subscript_index: t;
898 subscript_right_bracket: t;
900 | EmbeddedSubscriptExpression of {
901 embedded_subscript_receiver: t;
902 embedded_subscript_left_bracket: t;
903 embedded_subscript_index: t;
904 embedded_subscript_right_bracket: t;
906 | AwaitableCreationExpression of {
907 awaitable_attribute_spec: t;
908 awaitable_async: t;
909 awaitable_compound_statement: t;
911 | XHPChildrenDeclaration of {
912 xhp_children_keyword: t;
913 xhp_children_expression: t;
914 xhp_children_semicolon: t;
916 | XHPChildrenParenthesizedList of {
917 xhp_children_list_left_paren: t;
918 xhp_children_list_xhp_children: t;
919 xhp_children_list_right_paren: t;
921 | XHPCategoryDeclaration of {
922 xhp_category_keyword: t;
923 xhp_category_categories: t;
924 xhp_category_semicolon: t;
926 | XHPEnumType of {
927 xhp_enum_keyword: t;
928 xhp_enum_left_brace: t;
929 xhp_enum_values: t;
930 xhp_enum_right_brace: t;
932 | XHPLateinit of {
933 xhp_lateinit_at: t;
934 xhp_lateinit_keyword: t;
936 | XHPRequired of {
937 xhp_required_at: t;
938 xhp_required_keyword: t;
940 | XHPClassAttributeDeclaration of {
941 xhp_attribute_keyword: t;
942 xhp_attribute_attributes: t;
943 xhp_attribute_semicolon: t;
945 | XHPClassAttribute of {
946 xhp_attribute_decl_type: t;
947 xhp_attribute_decl_name: t;
948 xhp_attribute_decl_initializer: t;
949 xhp_attribute_decl_required: t;
951 | XHPSimpleClassAttribute of { xhp_simple_class_attribute_type: t }
952 | XHPSimpleAttribute of {
953 xhp_simple_attribute_name: t;
954 xhp_simple_attribute_equal: t;
955 xhp_simple_attribute_expression: t;
957 | XHPSpreadAttribute of {
958 xhp_spread_attribute_left_brace: t;
959 xhp_spread_attribute_spread_operator: t;
960 xhp_spread_attribute_expression: t;
961 xhp_spread_attribute_right_brace: t;
963 | XHPOpen of {
964 xhp_open_left_angle: t;
965 xhp_open_name: t;
966 xhp_open_attributes: t;
967 xhp_open_right_angle: t;
969 | XHPExpression of {
970 xhp_open: t;
971 xhp_body: t;
972 xhp_close: t;
974 | XHPClose of {
975 xhp_close_left_angle: t;
976 xhp_close_name: t;
977 xhp_close_right_angle: t;
979 | TypeConstant of {
980 type_constant_left_type: t;
981 type_constant_separator: t;
982 type_constant_right_type: t;
984 | VectorTypeSpecifier of {
985 vector_type_keyword: t;
986 vector_type_left_angle: t;
987 vector_type_type: t;
988 vector_type_trailing_comma: t;
989 vector_type_right_angle: t;
991 | KeysetTypeSpecifier of {
992 keyset_type_keyword: t;
993 keyset_type_left_angle: t;
994 keyset_type_type: t;
995 keyset_type_trailing_comma: t;
996 keyset_type_right_angle: t;
998 | TupleTypeExplicitSpecifier of {
999 tuple_type_keyword: t;
1000 tuple_type_left_angle: t;
1001 tuple_type_types: t;
1002 tuple_type_right_angle: t;
1004 | VarrayTypeSpecifier of {
1005 varray_keyword: t;
1006 varray_left_angle: t;
1007 varray_type: t;
1008 varray_trailing_comma: t;
1009 varray_right_angle: t;
1011 | FunctionCtxTypeSpecifier of {
1012 function_ctx_type_keyword: t;
1013 function_ctx_type_variable: t;
1015 | TypeParameter of {
1016 type_attribute_spec: t;
1017 type_reified: t;
1018 type_variance: t;
1019 type_name: t;
1020 type_param_params: t;
1021 type_constraints: t;
1023 | TypeConstraint of {
1024 constraint_keyword: t;
1025 constraint_type: t;
1027 | ContextConstraint of {
1028 ctx_constraint_keyword: t;
1029 ctx_constraint_ctx_list: t;
1031 | DarrayTypeSpecifier of {
1032 darray_keyword: t;
1033 darray_left_angle: t;
1034 darray_key: t;
1035 darray_comma: t;
1036 darray_value: t;
1037 darray_trailing_comma: t;
1038 darray_right_angle: t;
1040 | DictionaryTypeSpecifier of {
1041 dictionary_type_keyword: t;
1042 dictionary_type_left_angle: t;
1043 dictionary_type_members: t;
1044 dictionary_type_right_angle: t;
1046 | ClosureTypeSpecifier of {
1047 closure_outer_left_paren: t;
1048 closure_readonly_keyword: t;
1049 closure_function_keyword: t;
1050 closure_inner_left_paren: t;
1051 closure_parameter_list: t;
1052 closure_inner_right_paren: t;
1053 closure_contexts: t;
1054 closure_colon: t;
1055 closure_readonly_return: t;
1056 closure_return_type: t;
1057 closure_outer_right_paren: t;
1059 | ClosureParameterTypeSpecifier of {
1060 closure_parameter_call_convention: t;
1061 closure_parameter_readonly: t;
1062 closure_parameter_type: t;
1064 | ClassnameTypeSpecifier of {
1065 classname_keyword: t;
1066 classname_left_angle: t;
1067 classname_type: t;
1068 classname_trailing_comma: t;
1069 classname_right_angle: t;
1071 | FieldSpecifier of {
1072 field_question: t;
1073 field_name: t;
1074 field_arrow: t;
1075 field_type: t;
1077 | FieldInitializer of {
1078 field_initializer_name: t;
1079 field_initializer_arrow: t;
1080 field_initializer_value: t;
1082 | ShapeTypeSpecifier of {
1083 shape_type_keyword: t;
1084 shape_type_left_paren: t;
1085 shape_type_fields: t;
1086 shape_type_ellipsis: t;
1087 shape_type_right_paren: t;
1089 | ShapeExpression of {
1090 shape_expression_keyword: t;
1091 shape_expression_left_paren: t;
1092 shape_expression_fields: t;
1093 shape_expression_right_paren: t;
1095 | TupleExpression of {
1096 tuple_expression_keyword: t;
1097 tuple_expression_left_paren: t;
1098 tuple_expression_items: t;
1099 tuple_expression_right_paren: t;
1101 | GenericTypeSpecifier of {
1102 generic_class_type: t;
1103 generic_argument_list: t;
1105 | NullableTypeSpecifier of {
1106 nullable_question: t;
1107 nullable_type: t;
1109 | LikeTypeSpecifier of {
1110 like_tilde: t;
1111 like_type: t;
1113 | SoftTypeSpecifier of {
1114 soft_at: t;
1115 soft_type: t;
1117 | AttributizedSpecifier of {
1118 attributized_specifier_attribute_spec: t;
1119 attributized_specifier_type: t;
1121 | ReifiedTypeArgument of {
1122 reified_type_argument_reified: t;
1123 reified_type_argument_type: t;
1125 | TypeArguments of {
1126 type_arguments_left_angle: t;
1127 type_arguments_types: t;
1128 type_arguments_right_angle: t;
1130 | TypeParameters of {
1131 type_parameters_left_angle: t;
1132 type_parameters_parameters: t;
1133 type_parameters_right_angle: t;
1135 | TupleTypeSpecifier of {
1136 tuple_left_paren: t;
1137 tuple_types: t;
1138 tuple_right_paren: t;
1140 | UnionTypeSpecifier of {
1141 union_left_paren: t;
1142 union_types: t;
1143 union_right_paren: t;
1145 | IntersectionTypeSpecifier of {
1146 intersection_left_paren: t;
1147 intersection_types: t;
1148 intersection_right_paren: t;
1150 | ErrorSyntax of { error_error: t }
1151 | ListItem of {
1152 list_item: t;
1153 list_separator: t;
1155 | EnumClassLabelExpression of {
1156 enum_class_label_qualifier: t;
1157 enum_class_label_hash: t;
1158 enum_class_label_expression: t;
1162 module MakeValidated (Token : TokenType) (SyntaxValue : SyntaxValueType) =
1163 struct
1164 type 'a value = SyntaxValue.t * 'a [@@deriving show]
1166 (* TODO: Different styles of list seem to only happen in predetermined places,
1167 * so split this out again into specific variants
1169 type 'a listesque =
1170 | Syntactic of ('a value * Token.t option value) value list
1171 | NonSyntactic of 'a value list
1172 | MissingList
1173 | SingletonList of 'a value
1175 and top_level_declaration =
1176 | TLDEndOfFile of end_of_file
1177 | TLDFileAttributeSpecification of file_attribute_specification
1178 | TLDEnum of enum_declaration
1179 | TLDEnumClass of enum_class_declaration
1180 | TLDRecord of record_declaration
1181 | TLDAlias of alias_declaration
1182 | TLDContextAlias of context_alias_declaration
1183 | TLDNamespace of namespace_declaration
1184 | TLDNamespaceDeclarationHeader of namespace_declaration_header
1185 | TLDNamespaceUse of namespace_use_declaration
1186 | TLDNamespaceGroupUse of namespace_group_use_declaration
1187 | TLDFunction of function_declaration
1188 | TLDClassish of classish_declaration
1189 | TLDConst of const_declaration
1190 | TLDInclusionDirective of inclusion_directive
1191 | TLDCompound of compound_statement
1192 | TLDExpression of expression_statement
1193 | TLDMarkupSection of markup_section
1194 | TLDMarkupSuffix of markup_suffix
1195 | TLDUnset of unset_statement
1196 | TLDUsingStatementBlockScoped of using_statement_block_scoped
1197 | TLDUsingStatementFunctionScoped of using_statement_function_scoped
1198 | TLDWhile of while_statement
1199 | TLDIf of if_statement
1200 | TLDTry of try_statement
1201 | TLDDo of do_statement
1202 | TLDFor of for_statement
1203 | TLDForeach of foreach_statement
1204 | TLDSwitchFallthrough of switch_fallthrough
1205 | TLDReturn of return_statement
1206 | TLDYieldBreak of yield_break_statement
1207 | TLDThrow of throw_statement
1208 | TLDBreak of break_statement
1209 | TLDContinue of continue_statement
1210 | TLDEcho of echo_statement
1212 and expression =
1213 | ExprLiteral of literal_expression
1214 | ExprPrefixedString of prefixed_string_expression
1215 | ExprPrefixedCode of prefixed_code_expression
1216 | ExprVariable of variable_expression
1217 | ExprPipeVariable of pipe_variable_expression
1218 | ExprDecorated of decorated_expression
1219 | ExprInclusion of inclusion_expression
1220 | ExprAnonymousFunction of anonymous_function
1221 | ExprLambda of lambda_expression
1222 | ExprCast of cast_expression
1223 | ExprScopeResolution of scope_resolution_expression
1224 | ExprMemberSelection of member_selection_expression
1225 | ExprSafeMemberSelection of safe_member_selection_expression
1226 | ExprEmbeddedMemberSelection of embedded_member_selection_expression
1227 | ExprYield of yield_expression
1228 | ExprPrefixUnary of prefix_unary_expression
1229 | ExprPostfixUnary of postfix_unary_expression
1230 | ExprBinary of binary_expression
1231 | ExprIs of is_expression
1232 | ExprAs of as_expression
1233 | ExprNullableAs of nullable_as_expression
1234 | ExprUpcast of upcast_expression
1235 | ExprConditional of conditional_expression
1236 | ExprEval of eval_expression
1237 | ExprIsset of isset_expression
1238 | ExprFunctionCall of function_call_expression
1239 | ExprFunctionPointer of function_pointer_expression
1240 | ExprParenthesized of parenthesized_expression
1241 | ExprBraced of braced_expression
1242 | ExprETSplice of et_splice_expression
1243 | ExprEmbeddedBraced of embedded_braced_expression
1244 | ExprList of list_expression
1245 | ExprCollectionLiteral of collection_literal_expression
1246 | ExprObjectCreation of object_creation_expression
1247 | ExprRecordCreation of record_creation_expression
1248 | ExprDarrayIntrinsic of darray_intrinsic_expression
1249 | ExprDictionaryIntrinsic of dictionary_intrinsic_expression
1250 | ExprKeysetIntrinsic of keyset_intrinsic_expression
1251 | ExprVarrayIntrinsic of varray_intrinsic_expression
1252 | ExprVectorIntrinsic of vector_intrinsic_expression
1253 | ExprSubscript of subscript_expression
1254 | ExprEmbeddedSubscript of embedded_subscript_expression
1255 | ExprAwaitableCreation of awaitable_creation_expression
1256 | ExprXHPChildrenParenthesizedList of xhp_children_parenthesized_list
1257 | ExprXHP of xhp_expression
1258 | ExprShape of shape_expression
1259 | ExprTuple of tuple_expression
1260 | ExprEnumClassLabel of enum_class_label_expression
1262 and specifier =
1263 | SpecSimple of simple_type_specifier
1264 | SpecContexts of contexts
1265 | SpecVariadicParameter of variadic_parameter
1266 | SpecLambdaSignature of lambda_signature
1267 | SpecXHPEnumType of xhp_enum_type
1268 | SpecVector of vector_type_specifier
1269 | SpecKeyset of keyset_type_specifier
1270 | SpecTupleTypeExplicit of tuple_type_explicit_specifier
1271 | SpecVarray of varray_type_specifier
1272 | SpecFunctionCtx of function_ctx_type_specifier
1273 | SpecDarray of darray_type_specifier
1274 | SpecDictionary of dictionary_type_specifier
1275 | SpecClosure of closure_type_specifier
1276 | SpecClosureParameter of closure_parameter_type_specifier
1277 | SpecClassname of classname_type_specifier
1278 | SpecField of field_specifier
1279 | SpecShape of shape_type_specifier
1280 | SpecGeneric of generic_type_specifier
1281 | SpecNullable of nullable_type_specifier
1282 | SpecLike of like_type_specifier
1283 | SpecSoft of soft_type_specifier
1284 | SpecTuple of tuple_type_specifier
1285 | SpecUnion of union_type_specifier
1286 | SpecIntersection of intersection_type_specifier
1288 and parameter =
1289 | ParamParameterDeclaration of parameter_declaration
1290 | ParamVariadicParameter of variadic_parameter
1292 and class_body_declaration =
1293 | BodyProperty of property_declaration
1294 | BodyMethodish of methodish_declaration
1295 | BodyMethodishTraitResolution of methodish_trait_resolution
1296 | BodyRequireClause of require_clause
1297 | BodyConst of const_declaration
1298 | BodyTypeConst of type_const_declaration
1299 | BodyContextConst of context_const_declaration
1300 | BodyXHPChildren of xhp_children_declaration
1301 | BodyXHPCategory of xhp_category_declaration
1302 | BodyXHPClassAttribute of xhp_class_attribute_declaration
1304 and statement =
1305 | StmtInclusionDirective of inclusion_directive
1306 | StmtCompound of compound_statement
1307 | StmtExpression of expression_statement
1308 | StmtMarkupSection of markup_section
1309 | StmtMarkupSuffix of markup_suffix
1310 | StmtUnset of unset_statement
1311 | StmtUsingStatementBlockScoped of using_statement_block_scoped
1312 | StmtUsingStatementFunctionScoped of using_statement_function_scoped
1313 | StmtWhile of while_statement
1314 | StmtIf of if_statement
1315 | StmtTry of try_statement
1316 | StmtDo of do_statement
1317 | StmtFor of for_statement
1318 | StmtForeach of foreach_statement
1319 | StmtSwitch of switch_statement
1320 | StmtSwitchFallthrough of switch_fallthrough
1321 | StmtReturn of return_statement
1322 | StmtYieldBreak of yield_break_statement
1323 | StmtThrow of throw_statement
1324 | StmtBreak of break_statement
1325 | StmtContinue of continue_statement
1326 | StmtEcho of echo_statement
1327 | StmtConcurrent of concurrent_statement
1328 | StmtTypeConstant of type_constant
1330 and switch_label =
1331 | SwitchCase of case_label
1332 | SwitchDefault of default_label
1334 and lambda_body =
1335 | LambdaLiteral of literal_expression
1336 | LambdaPrefixedString of prefixed_string_expression
1337 | LambdaPrefixedCode of prefixed_code_expression
1338 | LambdaVariable of variable_expression
1339 | LambdaPipeVariable of pipe_variable_expression
1340 | LambdaDecorated of decorated_expression
1341 | LambdaInclusion of inclusion_expression
1342 | LambdaCompoundStatement of compound_statement
1343 | LambdaAnonymousFunction of anonymous_function
1344 | LambdaLambda of lambda_expression
1345 | LambdaCast of cast_expression
1346 | LambdaScopeResolution of scope_resolution_expression
1347 | LambdaMemberSelection of member_selection_expression
1348 | LambdaSafeMemberSelection of safe_member_selection_expression
1349 | LambdaEmbeddedMemberSelection of embedded_member_selection_expression
1350 | LambdaYield of yield_expression
1351 | LambdaPrefixUnary of prefix_unary_expression
1352 | LambdaPostfixUnary of postfix_unary_expression
1353 | LambdaBinary of binary_expression
1354 | LambdaIs of is_expression
1355 | LambdaAs of as_expression
1356 | LambdaNullableAs of nullable_as_expression
1357 | LambdaUpcast of upcast_expression
1358 | LambdaConditional of conditional_expression
1359 | LambdaEval of eval_expression
1360 | LambdaIsset of isset_expression
1361 | LambdaFunctionCall of function_call_expression
1362 | LambdaFunctionPointer of function_pointer_expression
1363 | LambdaParenthesized of parenthesized_expression
1364 | LambdaBraced of braced_expression
1365 | LambdaETSplice of et_splice_expression
1366 | LambdaEmbeddedBraced of embedded_braced_expression
1367 | LambdaList of list_expression
1368 | LambdaCollectionLiteral of collection_literal_expression
1369 | LambdaObjectCreation of object_creation_expression
1370 | LambdaRecordCreation of record_creation_expression
1371 | LambdaDarrayIntrinsic of darray_intrinsic_expression
1372 | LambdaDictionaryIntrinsic of dictionary_intrinsic_expression
1373 | LambdaKeysetIntrinsic of keyset_intrinsic_expression
1374 | LambdaVarrayIntrinsic of varray_intrinsic_expression
1375 | LambdaVectorIntrinsic of vector_intrinsic_expression
1376 | LambdaSubscript of subscript_expression
1377 | LambdaEmbeddedSubscript of embedded_subscript_expression
1378 | LambdaAwaitableCreation of awaitable_creation_expression
1379 | LambdaXHPChildrenParenthesizedList of xhp_children_parenthesized_list
1380 | LambdaXHP of xhp_expression
1381 | LambdaShape of shape_expression
1382 | LambdaTuple of tuple_expression
1384 and constructor_expression =
1385 | CExprLiteral of literal_expression
1386 | CExprPrefixedString of prefixed_string_expression
1387 | CExprPrefixedCode of prefixed_code_expression
1388 | CExprVariable of variable_expression
1389 | CExprPipeVariable of pipe_variable_expression
1390 | CExprDecorated of decorated_expression
1391 | CExprInclusion of inclusion_expression
1392 | CExprAnonymousFunction of anonymous_function
1393 | CExprLambda of lambda_expression
1394 | CExprCast of cast_expression
1395 | CExprScopeResolution of scope_resolution_expression
1396 | CExprMemberSelection of member_selection_expression
1397 | CExprSafeMemberSelection of safe_member_selection_expression
1398 | CExprEmbeddedMemberSelection of embedded_member_selection_expression
1399 | CExprYield of yield_expression
1400 | CExprPrefixUnary of prefix_unary_expression
1401 | CExprPostfixUnary of postfix_unary_expression
1402 | CExprBinary of binary_expression
1403 | CExprIs of is_expression
1404 | CExprAs of as_expression
1405 | CExprNullableAs of nullable_as_expression
1406 | CExprUpcast of upcast_expression
1407 | CExprConditional of conditional_expression
1408 | CExprEval of eval_expression
1409 | CExprIsset of isset_expression
1410 | CExprFunctionCall of function_call_expression
1411 | CExprFunctionPointer of function_pointer_expression
1412 | CExprParenthesized of parenthesized_expression
1413 | CExprBraced of braced_expression
1414 | CExprETSplice of et_splice_expression
1415 | CExprEmbeddedBraced of embedded_braced_expression
1416 | CExprList of list_expression
1417 | CExprCollectionLiteral of collection_literal_expression
1418 | CExprObjectCreation of object_creation_expression
1419 | CExprRecordCreation of record_creation_expression
1420 | CExprDarrayIntrinsic of darray_intrinsic_expression
1421 | CExprDictionaryIntrinsic of dictionary_intrinsic_expression
1422 | CExprKeysetIntrinsic of keyset_intrinsic_expression
1423 | CExprVarrayIntrinsic of varray_intrinsic_expression
1424 | CExprVectorIntrinsic of vector_intrinsic_expression
1425 | CExprElementInitializer of element_initializer
1426 | CExprSubscript of subscript_expression
1427 | CExprEmbeddedSubscript of embedded_subscript_expression
1428 | CExprAwaitableCreation of awaitable_creation_expression
1429 | CExprXHPChildrenParenthesizedList of xhp_children_parenthesized_list
1430 | CExprXHP of xhp_expression
1431 | CExprShape of shape_expression
1432 | CExprTuple of tuple_expression
1434 and namespace_internals =
1435 | NSINamespaceBody of namespace_body
1436 | NSINamespaceEmptyBody of namespace_empty_body
1438 and xhp_attribute =
1439 | XHPAttrXHPSimpleAttribute of xhp_simple_attribute
1440 | XHPAttrXHPSpreadAttribute of xhp_spread_attribute
1442 and object_creation_what =
1443 | NewAnonymousClass of anonymous_class
1444 | NewConstructorCall of constructor_call
1446 and todo_aggregate = TODOEndOfFile of end_of_file
1448 and name_aggregate = NameQualifiedName of qualified_name
1450 and end_of_file = { end_of_file_token: Token.t value }
1452 and script = { script_declarations: top_level_declaration listesque value }
1454 and qualified_name = { qualified_name_parts: Token.t listesque value }
1456 and simple_type_specifier = { simple_type_specifier: name_aggregate value }
1458 and literal_expression = { literal_expression: expression listesque value }
1460 and prefixed_string_expression = {
1461 prefixed_string_name: Token.t value;
1462 prefixed_string_str: Token.t value;
1465 and prefixed_code_expression = {
1466 prefixed_code_prefix: Token.t value;
1467 prefixed_code_left_backtick: Token.t value;
1468 prefixed_code_expression: expression value;
1469 prefixed_code_right_backtick: Token.t value;
1472 and variable_expression = { variable_expression: Token.t value }
1474 and pipe_variable_expression = { pipe_variable_expression: Token.t value }
1476 and file_attribute_specification = {
1477 file_attribute_specification_left_double_angle: Token.t value;
1478 file_attribute_specification_keyword: Token.t value;
1479 file_attribute_specification_colon: Token.t value;
1480 file_attribute_specification_attributes: constructor_call listesque value;
1481 file_attribute_specification_right_double_angle: Token.t value;
1484 and enum_declaration = {
1485 enum_attribute_spec: attribute_specification option value;
1486 enum_keyword: Token.t value;
1487 enum_name: Token.t value;
1488 enum_colon: Token.t value;
1489 enum_base: specifier value;
1490 enum_type: type_constraint option value;
1491 enum_left_brace: Token.t value;
1492 enum_use_clauses: enum_use listesque value;
1493 enum_enumerators: enumerator listesque value;
1494 enum_right_brace: Token.t value;
1497 and enum_use = {
1498 enum_use_keyword: Token.t value;
1499 enum_use_names: specifier listesque value;
1500 enum_use_semicolon: Token.t value;
1503 and enumerator = {
1504 enumerator_name: Token.t value;
1505 enumerator_equal: Token.t value;
1506 enumerator_value: expression value;
1507 enumerator_semicolon: Token.t value;
1510 and enum_class_declaration = {
1511 enum_class_attribute_spec: attribute_specification option value;
1512 enum_class_modifiers: Token.t option value;
1513 enum_class_enum_keyword: Token.t value;
1514 enum_class_class_keyword: Token.t value;
1515 enum_class_name: Token.t value;
1516 enum_class_colon: Token.t value;
1517 enum_class_base: specifier value;
1518 enum_class_extends: Token.t option value;
1519 enum_class_extends_list: specifier listesque value;
1520 enum_class_left_brace: Token.t value;
1521 enum_class_elements: enum_class_enumerator listesque value;
1522 enum_class_right_brace: Token.t value;
1525 and enum_class_enumerator = {
1526 enum_class_enumerator_modifiers: Token.t option value;
1527 enum_class_enumerator_type: specifier value;
1528 enum_class_enumerator_name: Token.t value;
1529 enum_class_enumerator_initializer: simple_initializer option value;
1530 enum_class_enumerator_semicolon: Token.t value;
1533 and record_declaration = {
1534 record_attribute_spec: attribute_specification option value;
1535 record_modifier: Token.t value;
1536 record_keyword: Token.t value;
1537 record_name: Token.t value;
1538 record_extends_keyword: Token.t option value;
1539 record_extends_opt: type_constraint option value;
1540 record_left_brace: Token.t value;
1541 record_fields: record_field listesque value;
1542 record_right_brace: Token.t value;
1545 and record_field = {
1546 record_field_type: type_constraint value;
1547 record_field_name: Token.t value;
1548 record_field_init: simple_initializer option value;
1549 record_field_semi: Token.t value;
1552 and alias_declaration = {
1553 alias_attribute_spec: attribute_specification option value;
1554 alias_keyword: Token.t value;
1555 alias_name: Token.t option value;
1556 alias_generic_parameter: type_parameters option value;
1557 alias_constraint: type_constraint option value;
1558 alias_equal: Token.t option value;
1559 alias_type: specifier value;
1560 alias_semicolon: Token.t value;
1563 and context_alias_declaration = {
1564 ctx_alias_attribute_spec: attribute_specification option value;
1565 ctx_alias_keyword: Token.t value;
1566 ctx_alias_name: Token.t option value;
1567 ctx_alias_generic_parameter: type_parameters option value;
1568 ctx_alias_as_constraint: context_constraint option value;
1569 ctx_alias_equal: Token.t option value;
1570 ctx_alias_context: specifier value;
1571 ctx_alias_semicolon: Token.t value;
1574 and property_declaration = {
1575 property_attribute_spec: attribute_specification option value;
1576 property_modifiers: Token.t listesque value;
1577 property_type: specifier option value;
1578 property_declarators: property_declarator listesque value;
1579 property_semicolon: Token.t value;
1582 and property_declarator = {
1583 property_name: Token.t value;
1584 property_initializer: simple_initializer option value;
1587 and namespace_declaration = {
1588 namespace_header: namespace_declaration_header value;
1589 namespace_body: namespace_internals value;
1592 and namespace_declaration_header = {
1593 namespace_keyword: Token.t value;
1594 namespace_name: name_aggregate option value;
1597 and namespace_body = {
1598 namespace_left_brace: Token.t value;
1599 namespace_declarations: top_level_declaration listesque value;
1600 namespace_right_brace: Token.t value;
1603 and namespace_empty_body = { namespace_semicolon: Token.t value }
1605 and namespace_use_declaration = {
1606 namespace_use_keyword: Token.t value;
1607 namespace_use_kind: Token.t option value;
1608 namespace_use_clauses: namespace_use_clause listesque value;
1609 namespace_use_semicolon: Token.t option value;
1612 and namespace_group_use_declaration = {
1613 namespace_group_use_keyword: Token.t value;
1614 namespace_group_use_kind: Token.t option value;
1615 namespace_group_use_prefix: name_aggregate value;
1616 namespace_group_use_left_brace: Token.t value;
1617 namespace_group_use_clauses: namespace_use_clause listesque value;
1618 namespace_group_use_right_brace: Token.t value;
1619 namespace_group_use_semicolon: Token.t value;
1622 and namespace_use_clause = {
1623 namespace_use_clause_kind: Token.t option value;
1624 namespace_use_name: name_aggregate value;
1625 namespace_use_as: Token.t option value;
1626 namespace_use_alias: Token.t option value;
1629 and function_declaration = {
1630 function_attribute_spec: attribute_specification option value;
1631 function_declaration_header: function_declaration_header value;
1632 function_body: compound_statement value;
1635 and function_declaration_header = {
1636 function_modifiers: Token.t listesque value;
1637 function_keyword: Token.t value;
1638 function_name: Token.t value;
1639 function_type_parameter_list: type_parameters option value;
1640 function_left_paren: Token.t value;
1641 function_parameter_list: parameter listesque value;
1642 function_right_paren: Token.t value;
1643 function_contexts: contexts option value;
1644 function_colon: Token.t option value;
1645 function_readonly_return: Token.t option value;
1646 function_type: attributized_specifier option value;
1647 function_where_clause: where_clause option value;
1650 and contexts = {
1651 contexts_left_bracket: Token.t value;
1652 contexts_types: specifier listesque value;
1653 contexts_right_bracket: Token.t value;
1656 and where_clause = {
1657 where_clause_keyword: Token.t value;
1658 where_clause_constraints: where_constraint listesque value;
1661 and where_constraint = {
1662 where_constraint_left_type: specifier value;
1663 where_constraint_operator: Token.t value;
1664 where_constraint_right_type: specifier value;
1667 and methodish_declaration = {
1668 methodish_attribute: attribute_specification option value;
1669 methodish_function_decl_header: function_declaration_header value;
1670 methodish_function_body: compound_statement option value;
1671 methodish_semicolon: Token.t option value;
1674 and methodish_trait_resolution = {
1675 methodish_trait_attribute: attribute_specification option value;
1676 methodish_trait_function_decl_header: function_declaration_header value;
1677 methodish_trait_equal: Token.t value;
1678 methodish_trait_name: specifier value;
1679 methodish_trait_semicolon: Token.t value;
1682 and classish_declaration = {
1683 classish_attribute: attribute_specification option value;
1684 classish_modifiers: Token.t listesque value;
1685 classish_xhp: Token.t option value;
1686 classish_keyword: Token.t value;
1687 classish_name: Token.t value;
1688 classish_type_parameters: type_parameters option value;
1689 classish_extends_keyword: Token.t option value;
1690 classish_extends_list: specifier listesque value;
1691 classish_implements_keyword: Token.t option value;
1692 classish_implements_list: specifier listesque value;
1693 classish_where_clause: where_clause option value;
1694 classish_body: classish_body value;
1697 and classish_body = {
1698 classish_body_left_brace: Token.t value;
1699 classish_body_elements: class_body_declaration listesque value;
1700 classish_body_right_brace: Token.t value;
1703 and trait_use_precedence_item = {
1704 trait_use_precedence_item_name: specifier value;
1705 trait_use_precedence_item_keyword: Token.t value;
1706 trait_use_precedence_item_removed_names: specifier listesque value;
1709 and trait_use_alias_item = {
1710 trait_use_alias_item_aliasing_name: specifier value;
1711 trait_use_alias_item_keyword: Token.t value;
1712 trait_use_alias_item_modifiers: Token.t listesque value;
1713 trait_use_alias_item_aliased_name: specifier option value;
1716 and trait_use_conflict_resolution = {
1717 trait_use_conflict_resolution_keyword: Token.t value;
1718 trait_use_conflict_resolution_names: specifier listesque value;
1719 trait_use_conflict_resolution_left_brace: Token.t value;
1720 trait_use_conflict_resolution_clauses: specifier listesque value;
1721 trait_use_conflict_resolution_right_brace: Token.t value;
1724 and trait_use = {
1725 trait_use_keyword: Token.t value;
1726 trait_use_names: specifier listesque value;
1727 trait_use_semicolon: Token.t option value;
1730 and require_clause = {
1731 require_keyword: Token.t value;
1732 require_kind: Token.t value;
1733 require_name: specifier value;
1734 require_semicolon: Token.t value;
1737 and const_declaration = {
1738 const_modifiers: Token.t listesque value;
1739 const_keyword: Token.t value;
1740 const_type_specifier: specifier option value;
1741 const_declarators: constant_declarator listesque value;
1742 const_semicolon: Token.t value;
1745 and constant_declarator = {
1746 constant_declarator_name: Token.t value;
1747 constant_declarator_initializer: simple_initializer option value;
1750 and type_const_declaration = {
1751 type_const_attribute_spec: attribute_specification option value;
1752 type_const_modifiers: Token.t option value;
1753 type_const_keyword: Token.t value;
1754 type_const_type_keyword: Token.t value;
1755 type_const_name: Token.t value;
1756 type_const_type_parameters: type_parameters option value;
1757 type_const_type_constraint: type_constraint option value;
1758 type_const_equal: Token.t option value;
1759 type_const_type_specifier: specifier option value;
1760 type_const_semicolon: Token.t value;
1763 and context_const_declaration = {
1764 context_const_modifiers: Token.t option value;
1765 context_const_const_keyword: Token.t value;
1766 context_const_ctx_keyword: Token.t value;
1767 context_const_name: Token.t value;
1768 context_const_type_parameters: type_parameters option value;
1769 context_const_constraint: context_constraint listesque value;
1770 context_const_equal: Token.t option value;
1771 context_const_ctx_list: contexts option value;
1772 context_const_semicolon: Token.t value;
1775 and decorated_expression = {
1776 decorated_expression_decorator: Token.t value;
1777 decorated_expression_expression: expression value;
1780 and parameter_declaration = {
1781 parameter_attribute: attribute_specification option value;
1782 parameter_visibility: Token.t option value;
1783 parameter_call_convention: Token.t option value;
1784 parameter_readonly: Token.t option value;
1785 parameter_type: specifier option value;
1786 parameter_name: expression value;
1787 parameter_default_value: simple_initializer option value;
1790 and variadic_parameter = {
1791 variadic_parameter_call_convention: Token.t option value;
1792 variadic_parameter_type: simple_type_specifier option value;
1793 variadic_parameter_ellipsis: Token.t value;
1796 and old_attribute_specification = {
1797 old_attribute_specification_left_double_angle: Token.t value;
1798 old_attribute_specification_attributes: constructor_call listesque value;
1799 old_attribute_specification_right_double_angle: Token.t value;
1802 and attribute_specification = {
1803 attribute_specification_attributes: attribute listesque value;
1806 and attribute = {
1807 attribute_at: Token.t value;
1808 attribute_attribute_name: constructor_call value;
1811 and inclusion_expression = {
1812 inclusion_require: Token.t value;
1813 inclusion_filename: expression value;
1816 and inclusion_directive = {
1817 inclusion_expression: inclusion_expression value;
1818 inclusion_semicolon: Token.t value;
1821 and compound_statement = {
1822 compound_left_brace: Token.t value;
1823 compound_statements: statement listesque value;
1824 compound_right_brace: Token.t value;
1827 and expression_statement = {
1828 expression_statement_expression: expression option value;
1829 expression_statement_semicolon: Token.t value;
1832 and markup_section = {
1833 markup_hashbang: Token.t value;
1834 markup_suffix: markup_suffix option value;
1837 and markup_suffix = {
1838 markup_suffix_less_than_question: Token.t value;
1839 markup_suffix_name: Token.t option value;
1842 and unset_statement = {
1843 unset_keyword: Token.t value;
1844 unset_left_paren: Token.t value;
1845 unset_variables: expression listesque value;
1846 unset_right_paren: Token.t value;
1847 unset_semicolon: Token.t value;
1850 and using_statement_block_scoped = {
1851 using_block_await_keyword: Token.t option value;
1852 using_block_using_keyword: Token.t value;
1853 using_block_left_paren: Token.t value;
1854 using_block_expressions: expression listesque value;
1855 using_block_right_paren: Token.t value;
1856 using_block_body: statement value;
1859 and using_statement_function_scoped = {
1860 using_function_await_keyword: Token.t option value;
1861 using_function_using_keyword: Token.t value;
1862 using_function_expression: expression value;
1863 using_function_semicolon: Token.t value;
1866 and while_statement = {
1867 while_keyword: Token.t value;
1868 while_left_paren: Token.t value;
1869 while_condition: expression value;
1870 while_right_paren: Token.t value;
1871 while_body: statement value;
1874 and if_statement = {
1875 if_keyword: Token.t value;
1876 if_left_paren: Token.t value;
1877 if_condition: expression value;
1878 if_right_paren: Token.t value;
1879 if_statement: statement value;
1880 if_elseif_clauses: elseif_clause listesque value;
1881 if_else_clause: else_clause option value;
1884 and elseif_clause = {
1885 elseif_keyword: Token.t value;
1886 elseif_left_paren: Token.t value;
1887 elseif_condition: expression value;
1888 elseif_right_paren: Token.t value;
1889 elseif_statement: statement value;
1892 and else_clause = {
1893 else_keyword: Token.t value;
1894 else_statement: statement value;
1897 and try_statement = {
1898 try_keyword: Token.t value;
1899 try_compound_statement: compound_statement value;
1900 try_catch_clauses: catch_clause listesque value;
1901 try_finally_clause: finally_clause option value;
1904 and catch_clause = {
1905 catch_keyword: Token.t value;
1906 catch_left_paren: Token.t value;
1907 catch_type: simple_type_specifier value;
1908 catch_variable: Token.t value;
1909 catch_right_paren: Token.t value;
1910 catch_body: compound_statement value;
1913 and finally_clause = {
1914 finally_keyword: Token.t value;
1915 finally_body: compound_statement value;
1918 and do_statement = {
1919 do_keyword: Token.t value;
1920 do_body: statement value;
1921 do_while_keyword: Token.t value;
1922 do_left_paren: Token.t value;
1923 do_condition: expression value;
1924 do_right_paren: Token.t value;
1925 do_semicolon: Token.t value;
1928 and for_statement = {
1929 for_keyword: Token.t value;
1930 for_left_paren: Token.t value;
1931 for_initializer: expression listesque value;
1932 for_first_semicolon: Token.t value;
1933 for_control: expression listesque value;
1934 for_second_semicolon: Token.t value;
1935 for_end_of_loop: expression listesque value;
1936 for_right_paren: Token.t value;
1937 for_body: statement value;
1940 and foreach_statement = {
1941 foreach_keyword: Token.t value;
1942 foreach_left_paren: Token.t value;
1943 foreach_collection: expression value;
1944 foreach_await_keyword: Token.t option value;
1945 foreach_as: Token.t value;
1946 foreach_key: expression option value;
1947 foreach_arrow: Token.t option value;
1948 foreach_value: expression value;
1949 foreach_right_paren: Token.t value;
1950 foreach_body: statement value;
1953 and switch_statement = {
1954 switch_keyword: Token.t value;
1955 switch_left_paren: Token.t value;
1956 switch_expression: expression value;
1957 switch_right_paren: Token.t value;
1958 switch_left_brace: Token.t value;
1959 switch_sections: switch_section listesque value;
1960 switch_right_brace: Token.t value;
1963 and switch_section = {
1964 switch_section_labels: switch_label listesque value;
1965 switch_section_statements: top_level_declaration listesque value;
1966 switch_section_fallthrough: switch_fallthrough option value;
1969 and switch_fallthrough = {
1970 fallthrough_keyword: Token.t value;
1971 fallthrough_semicolon: Token.t value;
1974 and case_label = {
1975 case_keyword: Token.t value;
1976 case_expression: expression value;
1977 case_colon: Token.t value;
1980 and default_label = {
1981 default_keyword: Token.t value;
1982 default_colon: Token.t value;
1985 and return_statement = {
1986 return_keyword: Token.t value;
1987 return_expression: expression option value;
1988 return_semicolon: Token.t option value;
1991 and yield_break_statement = {
1992 yield_break_keyword: Token.t value;
1993 yield_break_break: Token.t value;
1994 yield_break_semicolon: Token.t value;
1997 and throw_statement = {
1998 throw_keyword: Token.t value;
1999 throw_expression: expression value;
2000 throw_semicolon: Token.t value;
2003 and break_statement = {
2004 break_keyword: Token.t value;
2005 break_semicolon: Token.t value;
2008 and continue_statement = {
2009 continue_keyword: Token.t value;
2010 continue_semicolon: Token.t value;
2013 and echo_statement = {
2014 echo_keyword: Token.t value;
2015 echo_expressions: expression listesque value;
2016 echo_semicolon: Token.t value;
2019 and concurrent_statement = {
2020 concurrent_keyword: Token.t value;
2021 concurrent_statement: statement value;
2024 and simple_initializer = {
2025 simple_initializer_equal: Token.t value;
2026 simple_initializer_value: expression value;
2029 and anonymous_class = {
2030 anonymous_class_class_keyword: Token.t value;
2031 anonymous_class_left_paren: Token.t option value;
2032 anonymous_class_argument_list: expression listesque value;
2033 anonymous_class_right_paren: Token.t option value;
2034 anonymous_class_extends_keyword: Token.t option value;
2035 anonymous_class_extends_list: specifier listesque value;
2036 anonymous_class_implements_keyword: Token.t option value;
2037 anonymous_class_implements_list: specifier listesque value;
2038 anonymous_class_body: classish_body value;
2041 and anonymous_function = {
2042 anonymous_attribute_spec: attribute_specification option value;
2043 anonymous_async_keyword: Token.t option value;
2044 anonymous_function_keyword: Token.t value;
2045 anonymous_left_paren: Token.t value;
2046 anonymous_parameters: parameter listesque value;
2047 anonymous_right_paren: Token.t value;
2048 anonymous_ctx_list: contexts option value;
2049 anonymous_colon: Token.t option value;
2050 anonymous_readonly_return: Token.t option value;
2051 anonymous_type: specifier option value;
2052 anonymous_use: anonymous_function_use_clause option value;
2053 anonymous_body: compound_statement value;
2056 and anonymous_function_use_clause = {
2057 anonymous_use_keyword: Token.t value;
2058 anonymous_use_left_paren: Token.t value;
2059 anonymous_use_variables: expression listesque value;
2060 anonymous_use_right_paren: Token.t value;
2063 and lambda_expression = {
2064 lambda_attribute_spec: attribute_specification option value;
2065 lambda_async: Token.t option value;
2066 lambda_signature: specifier value;
2067 lambda_arrow: Token.t value;
2068 lambda_body: lambda_body value;
2071 and lambda_signature = {
2072 lambda_left_paren: Token.t value;
2073 lambda_parameters: parameter listesque value;
2074 lambda_right_paren: Token.t value;
2075 lambda_contexts: contexts option value;
2076 lambda_colon: Token.t option value;
2077 lambda_readonly_return: Token.t option value;
2078 lambda_type: specifier option value;
2081 and cast_expression = {
2082 cast_left_paren: Token.t value;
2083 cast_type: Token.t value;
2084 cast_right_paren: Token.t value;
2085 cast_operand: expression value;
2088 and scope_resolution_expression = {
2089 scope_resolution_qualifier: expression value;
2090 scope_resolution_operator: Token.t value;
2091 scope_resolution_name: expression value;
2094 and member_selection_expression = {
2095 member_object: expression value;
2096 member_operator: Token.t value;
2097 member_name: Token.t value;
2100 and safe_member_selection_expression = {
2101 safe_member_object: expression value;
2102 safe_member_operator: Token.t value;
2103 safe_member_name: Token.t value;
2106 and embedded_member_selection_expression = {
2107 embedded_member_object: variable_expression value;
2108 embedded_member_operator: Token.t value;
2109 embedded_member_name: Token.t value;
2112 and yield_expression = {
2113 yield_keyword: Token.t value;
2114 yield_operand: constructor_expression value;
2117 and prefix_unary_expression = {
2118 prefix_unary_operator: Token.t value;
2119 prefix_unary_operand: expression value;
2122 and postfix_unary_expression = {
2123 postfix_unary_operand: expression value;
2124 postfix_unary_operator: Token.t value;
2127 and binary_expression = {
2128 binary_left_operand: expression value;
2129 binary_operator: Token.t value;
2130 binary_right_operand: expression value;
2133 and is_expression = {
2134 is_left_operand: expression value;
2135 is_operator: Token.t value;
2136 is_right_operand: specifier value;
2139 and as_expression = {
2140 as_left_operand: expression value;
2141 as_operator: Token.t value;
2142 as_right_operand: specifier value;
2145 and nullable_as_expression = {
2146 nullable_as_left_operand: expression value;
2147 nullable_as_operator: Token.t value;
2148 nullable_as_right_operand: specifier value;
2151 and upcast_expression = {
2152 upcast_left_operand: expression value;
2153 upcast_operator: Token.t value;
2154 upcast_right_operand: specifier value;
2157 and conditional_expression = {
2158 conditional_test: expression value;
2159 conditional_question: Token.t value;
2160 conditional_consequence: expression option value;
2161 conditional_colon: Token.t value;
2162 conditional_alternative: expression value;
2165 and eval_expression = {
2166 eval_keyword: Token.t value;
2167 eval_left_paren: Token.t value;
2168 eval_argument: expression value;
2169 eval_right_paren: Token.t value;
2172 and isset_expression = {
2173 isset_keyword: Token.t value;
2174 isset_left_paren: Token.t value;
2175 isset_argument_list: expression listesque value;
2176 isset_right_paren: Token.t value;
2179 and function_call_expression = {
2180 function_call_receiver: expression value;
2181 function_call_type_args: type_arguments option value;
2182 function_call_enum_class_label: expression option value;
2183 function_call_left_paren: Token.t value;
2184 function_call_argument_list: expression listesque value;
2185 function_call_right_paren: Token.t value;
2188 and function_pointer_expression = {
2189 function_pointer_receiver: expression value;
2190 function_pointer_type_args: type_arguments value;
2193 and parenthesized_expression = {
2194 parenthesized_expression_left_paren: Token.t value;
2195 parenthesized_expression_expression: expression value;
2196 parenthesized_expression_right_paren: Token.t value;
2199 and braced_expression = {
2200 braced_expression_left_brace: Token.t value;
2201 braced_expression_expression: expression value;
2202 braced_expression_right_brace: Token.t value;
2205 and et_splice_expression = {
2206 et_splice_expression_dollar: Token.t value;
2207 et_splice_expression_left_brace: Token.t value;
2208 et_splice_expression_expression: expression value;
2209 et_splice_expression_right_brace: Token.t value;
2212 and embedded_braced_expression = {
2213 embedded_braced_expression_left_brace: Token.t value;
2214 embedded_braced_expression_expression: expression value;
2215 embedded_braced_expression_right_brace: Token.t value;
2218 and list_expression = {
2219 list_keyword: Token.t value;
2220 list_left_paren: Token.t value;
2221 list_members: expression listesque value;
2222 list_right_paren: Token.t value;
2225 and collection_literal_expression = {
2226 collection_literal_name: specifier value;
2227 collection_literal_left_brace: Token.t value;
2228 collection_literal_initializers: constructor_expression listesque value;
2229 collection_literal_right_brace: Token.t value;
2232 and object_creation_expression = {
2233 object_creation_new_keyword: Token.t value;
2234 object_creation_object: object_creation_what value;
2237 and constructor_call = {
2238 constructor_call_type: todo_aggregate value;
2239 constructor_call_left_paren: Token.t option value;
2240 constructor_call_argument_list: expression listesque value;
2241 constructor_call_right_paren: Token.t option value;
2244 and record_creation_expression = {
2245 record_creation_type: todo_aggregate value;
2246 record_creation_left_bracket: Token.t value;
2247 record_creation_members: element_initializer listesque value;
2248 record_creation_right_bracket: Token.t value;
2251 and darray_intrinsic_expression = {
2252 darray_intrinsic_keyword: Token.t value;
2253 darray_intrinsic_explicit_type: type_arguments option value;
2254 darray_intrinsic_left_bracket: Token.t value;
2255 darray_intrinsic_members: element_initializer listesque value;
2256 darray_intrinsic_right_bracket: Token.t value;
2259 and dictionary_intrinsic_expression = {
2260 dictionary_intrinsic_keyword: Token.t value;
2261 dictionary_intrinsic_explicit_type: type_arguments option value;
2262 dictionary_intrinsic_left_bracket: Token.t value;
2263 dictionary_intrinsic_members: element_initializer listesque value;
2264 dictionary_intrinsic_right_bracket: Token.t value;
2267 and keyset_intrinsic_expression = {
2268 keyset_intrinsic_keyword: Token.t value;
2269 keyset_intrinsic_explicit_type: type_arguments option value;
2270 keyset_intrinsic_left_bracket: Token.t value;
2271 keyset_intrinsic_members: expression listesque value;
2272 keyset_intrinsic_right_bracket: Token.t value;
2275 and varray_intrinsic_expression = {
2276 varray_intrinsic_keyword: Token.t value;
2277 varray_intrinsic_explicit_type: type_arguments option value;
2278 varray_intrinsic_left_bracket: Token.t value;
2279 varray_intrinsic_members: expression listesque value;
2280 varray_intrinsic_right_bracket: Token.t value;
2283 and vector_intrinsic_expression = {
2284 vector_intrinsic_keyword: Token.t value;
2285 vector_intrinsic_explicit_type: type_arguments option value;
2286 vector_intrinsic_left_bracket: Token.t value;
2287 vector_intrinsic_members: expression listesque value;
2288 vector_intrinsic_right_bracket: Token.t value;
2291 and element_initializer = {
2292 element_key: expression value;
2293 element_arrow: Token.t value;
2294 element_value: expression value;
2297 and subscript_expression = {
2298 subscript_receiver: expression value;
2299 subscript_left_bracket: Token.t value;
2300 subscript_index: expression option value;
2301 subscript_right_bracket: Token.t value;
2304 and embedded_subscript_expression = {
2305 embedded_subscript_receiver: variable_expression value;
2306 embedded_subscript_left_bracket: Token.t value;
2307 embedded_subscript_index: expression value;
2308 embedded_subscript_right_bracket: Token.t value;
2311 and awaitable_creation_expression = {
2312 awaitable_attribute_spec: attribute_specification option value;
2313 awaitable_async: Token.t value;
2314 awaitable_compound_statement: compound_statement value;
2317 and xhp_children_declaration = {
2318 xhp_children_keyword: Token.t value;
2319 xhp_children_expression: expression value;
2320 xhp_children_semicolon: Token.t value;
2323 and xhp_children_parenthesized_list = {
2324 xhp_children_list_left_paren: Token.t value;
2325 xhp_children_list_xhp_children: expression listesque value;
2326 xhp_children_list_right_paren: Token.t value;
2329 and xhp_category_declaration = {
2330 xhp_category_keyword: Token.t value;
2331 xhp_category_categories: Token.t listesque value;
2332 xhp_category_semicolon: Token.t value;
2335 and xhp_enum_type = {
2336 xhp_enum_keyword: Token.t value;
2337 xhp_enum_left_brace: Token.t value;
2338 xhp_enum_values: literal_expression listesque value;
2339 xhp_enum_right_brace: Token.t value;
2342 and xhp_lateinit = {
2343 xhp_lateinit_at: Token.t value;
2344 xhp_lateinit_keyword: Token.t value;
2347 and xhp_required = {
2348 xhp_required_at: Token.t value;
2349 xhp_required_keyword: Token.t value;
2352 and xhp_class_attribute_declaration = {
2353 xhp_attribute_keyword: Token.t value;
2354 xhp_attribute_attributes: todo_aggregate listesque value;
2355 xhp_attribute_semicolon: Token.t value;
2358 and xhp_class_attribute = {
2359 xhp_attribute_decl_type: specifier value;
2360 xhp_attribute_decl_name: Token.t value;
2361 xhp_attribute_decl_initializer: simple_initializer option value;
2362 xhp_attribute_decl_required: xhp_required option value;
2365 and xhp_simple_class_attribute = {
2366 xhp_simple_class_attribute_type: simple_type_specifier value;
2369 and xhp_simple_attribute = {
2370 xhp_simple_attribute_name: Token.t value;
2371 xhp_simple_attribute_equal: Token.t value;
2372 xhp_simple_attribute_expression: expression value;
2375 and xhp_spread_attribute = {
2376 xhp_spread_attribute_left_brace: Token.t value;
2377 xhp_spread_attribute_spread_operator: Token.t value;
2378 xhp_spread_attribute_expression: expression value;
2379 xhp_spread_attribute_right_brace: Token.t value;
2382 and xhp_open = {
2383 xhp_open_left_angle: Token.t value;
2384 xhp_open_name: Token.t value;
2385 xhp_open_attributes: xhp_attribute listesque value;
2386 xhp_open_right_angle: Token.t value;
2389 and xhp_expression = {
2390 xhp_open: xhp_open value;
2391 xhp_body: expression listesque value;
2392 xhp_close: xhp_close option value;
2395 and xhp_close = {
2396 xhp_close_left_angle: Token.t value;
2397 xhp_close_name: Token.t value;
2398 xhp_close_right_angle: Token.t value;
2401 and type_constant = {
2402 type_constant_left_type: specifier value;
2403 type_constant_separator: Token.t value;
2404 type_constant_right_type: Token.t value;
2407 and vector_type_specifier = {
2408 vector_type_keyword: Token.t value;
2409 vector_type_left_angle: Token.t value;
2410 vector_type_type: specifier value;
2411 vector_type_trailing_comma: Token.t option value;
2412 vector_type_right_angle: Token.t value;
2415 and keyset_type_specifier = {
2416 keyset_type_keyword: Token.t value;
2417 keyset_type_left_angle: Token.t value;
2418 keyset_type_type: specifier value;
2419 keyset_type_trailing_comma: Token.t option value;
2420 keyset_type_right_angle: Token.t value;
2423 and tuple_type_explicit_specifier = {
2424 tuple_type_keyword: Token.t value;
2425 tuple_type_left_angle: Token.t value;
2426 tuple_type_types: simple_type_specifier value;
2427 tuple_type_right_angle: Token.t value;
2430 and varray_type_specifier = {
2431 varray_keyword: Token.t value;
2432 varray_left_angle: Token.t value;
2433 varray_type: simple_type_specifier value;
2434 varray_trailing_comma: Token.t option value;
2435 varray_right_angle: Token.t value;
2438 and function_ctx_type_specifier = {
2439 function_ctx_type_keyword: Token.t value;
2440 function_ctx_type_variable: variable_expression value;
2443 and type_parameter = {
2444 type_attribute_spec: attribute_specification option value;
2445 type_reified: Token.t option value;
2446 type_variance: Token.t option value;
2447 type_name: Token.t value;
2448 type_param_params: type_parameters option value;
2449 type_constraints: type_constraint listesque value;
2452 and type_constraint = {
2453 constraint_keyword: Token.t value;
2454 constraint_type: specifier value;
2457 and context_constraint = {
2458 ctx_constraint_keyword: Token.t value;
2459 ctx_constraint_ctx_list: contexts option value;
2462 and darray_type_specifier = {
2463 darray_keyword: Token.t value;
2464 darray_left_angle: Token.t value;
2465 darray_key: simple_type_specifier value;
2466 darray_comma: Token.t value;
2467 darray_value: simple_type_specifier value;
2468 darray_trailing_comma: Token.t option value;
2469 darray_right_angle: Token.t value;
2472 and dictionary_type_specifier = {
2473 dictionary_type_keyword: Token.t value;
2474 dictionary_type_left_angle: Token.t value;
2475 dictionary_type_members: specifier listesque value;
2476 dictionary_type_right_angle: Token.t value;
2479 and closure_type_specifier = {
2480 closure_outer_left_paren: Token.t value;
2481 closure_readonly_keyword: Token.t option value;
2482 closure_function_keyword: Token.t value;
2483 closure_inner_left_paren: Token.t value;
2484 closure_parameter_list: closure_parameter_type_specifier listesque value;
2485 closure_inner_right_paren: Token.t value;
2486 closure_contexts: contexts option value;
2487 closure_colon: Token.t value;
2488 closure_readonly_return: Token.t option value;
2489 closure_return_type: specifier value;
2490 closure_outer_right_paren: Token.t value;
2493 and closure_parameter_type_specifier = {
2494 closure_parameter_call_convention: Token.t option value;
2495 closure_parameter_readonly: Token.t option value;
2496 closure_parameter_type: specifier value;
2499 and classname_type_specifier = {
2500 classname_keyword: Token.t value;
2501 classname_left_angle: Token.t value;
2502 classname_type: specifier value;
2503 classname_trailing_comma: Token.t option value;
2504 classname_right_angle: Token.t value;
2507 and field_specifier = {
2508 field_question: Token.t option value;
2509 field_name: expression value;
2510 field_arrow: Token.t value;
2511 field_type: specifier value;
2514 and field_initializer = {
2515 field_initializer_name: expression value;
2516 field_initializer_arrow: Token.t value;
2517 field_initializer_value: expression value;
2520 and shape_type_specifier = {
2521 shape_type_keyword: Token.t value;
2522 shape_type_left_paren: Token.t value;
2523 shape_type_fields: field_specifier listesque value;
2524 shape_type_ellipsis: Token.t option value;
2525 shape_type_right_paren: Token.t value;
2528 and shape_expression = {
2529 shape_expression_keyword: Token.t value;
2530 shape_expression_left_paren: Token.t value;
2531 shape_expression_fields: field_initializer listesque value;
2532 shape_expression_right_paren: Token.t value;
2535 and tuple_expression = {
2536 tuple_expression_keyword: Token.t value;
2537 tuple_expression_left_paren: Token.t value;
2538 tuple_expression_items: expression listesque value;
2539 tuple_expression_right_paren: Token.t value;
2542 and generic_type_specifier = {
2543 generic_class_type: Token.t value;
2544 generic_argument_list: type_arguments value;
2547 and nullable_type_specifier = {
2548 nullable_question: Token.t value;
2549 nullable_type: specifier value;
2552 and like_type_specifier = {
2553 like_tilde: Token.t value;
2554 like_type: specifier value;
2557 and soft_type_specifier = {
2558 soft_at: Token.t value;
2559 soft_type: specifier value;
2562 and attributized_specifier = {
2563 attributized_specifier_attribute_spec: attribute_specification option value;
2564 attributized_specifier_type: specifier value;
2567 and reified_type_argument = {
2568 reified_type_argument_reified: Token.t value;
2569 reified_type_argument_type: specifier value;
2572 and type_arguments = {
2573 type_arguments_left_angle: Token.t value;
2574 type_arguments_types: attributized_specifier listesque value;
2575 type_arguments_right_angle: Token.t value;
2578 and type_parameters = {
2579 type_parameters_left_angle: Token.t value;
2580 type_parameters_parameters: type_parameter listesque value;
2581 type_parameters_right_angle: Token.t value;
2584 and tuple_type_specifier = {
2585 tuple_left_paren: Token.t value;
2586 tuple_types: specifier listesque value;
2587 tuple_right_paren: Token.t value;
2590 and union_type_specifier = {
2591 union_left_paren: Token.t value;
2592 union_types: specifier listesque value;
2593 union_right_paren: Token.t value;
2596 and intersection_type_specifier = {
2597 intersection_left_paren: Token.t value;
2598 intersection_types: specifier listesque value;
2599 intersection_right_paren: Token.t value;
2602 and enum_class_label_expression = {
2603 enum_class_label_qualifier: expression option value;
2604 enum_class_label_hash: Token.t value;
2605 enum_class_label_expression: Token.t value;
2607 [@@deriving show]