2 * Copyright (c) 2016, Facebook, Inc.
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
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
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
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
62 type t
[@@deriving show
, eq
]
63 val kind
: t
-> Full_fidelity_token_kind.t
64 val to_json
: t
-> Hh_json.json
65 val leading
: t
-> Trivia.t list
68 module type SyntaxValueType
= sig
69 type t
[@@deriving show
, eq
]
70 val to_json
: t
-> Hh_json.json
73 (* This functor describe the shape of a parse tree that has a particular kind of
74 * token in the leaves, and a particular kind of value associated with each
77 module MakeSyntaxType
(Token
: TokenType
)(SyntaxValue
: SyntaxValueType
) = struct
78 type value = SyntaxValue.t
[@@deriving show
, eq
]
79 type t
= { syntax
: syntax
; value : value } [@@deriving show
, eq
]
80 and function_declaration
=
81 { function_attribute_spec
: t
82 ; function_declaration_header
: t
85 and function_declaration_header
=
86 { function_modifiers
: t
87 ; function_keyword
: t
89 ; function_type_parameter_list
: t
90 ; function_left_paren
: t
91 ; function_parameter_list
: t
92 ; function_right_paren
: t
95 ; function_where_clause
: t
97 and methodish_declaration
=
98 { methodish_attribute
: t
99 ; methodish_function_decl_header
: t
100 ; methodish_function_body
: t
101 ; methodish_semicolon
: t
103 and anonymous_function
=
104 { anonymous_attribute_spec
: t
105 ; anonymous_static_keyword
: t
106 ; anonymous_async_keyword
: t
107 ; anonymous_function_keyword
: t
108 ; anonymous_left_paren
: t
109 ; anonymous_parameters
: t
110 ; anonymous_right_paren
: t
111 ; anonymous_colon
: t
116 and lambda_expression
=
117 { lambda_attribute_spec
: t
119 ; lambda_signature
: t
123 and lambda_signature
=
124 { lambda_left_paren
: t
125 ; lambda_parameters
: t
126 ; lambda_right_paren
: t
130 and closure_type_specifier
=
131 { closure_outer_left_paren
: t
132 ; closure_function_keyword
: t
133 ; closure_inner_left_paren
: t
134 ; closure_parameter_list
: t
135 ; closure_inner_right_paren
: t
137 ; closure_return_type
: t
138 ; closure_outer_right_paren
: t
143 | SyntaxList
of t list
145 { end_of_file_token
: t
148 { script_declarations
: t
151 { qualified_name_parts
: t
153 | SimpleTypeSpecifier
of
154 { simple_type_specifier
: t
156 | LiteralExpression
of
157 { literal_expression
: t
159 | PrefixedStringExpression
of
160 { prefixed_string_name
: t
161 ; prefixed_string_str
: t
163 | VariableExpression
of
164 { variable_expression
: t
166 | PipeVariableExpression
of
167 { pipe_variable_expression
: t
169 | FileAttributeSpecification
of
170 { file_attribute_specification_left_double_angle
: t
171 ; file_attribute_specification_keyword
: t
172 ; file_attribute_specification_colon
: t
173 ; file_attribute_specification_attributes
: t
174 ; file_attribute_specification_right_double_angle
: t
177 { enum_attribute_spec
: t
183 ; enum_left_brace
: t
184 ; enum_enumerators
: t
185 ; enum_right_brace
: t
188 { enumerator_name
: t
189 ; enumerator_equal
: t
190 ; enumerator_value
: t
191 ; enumerator_semicolon
: t
193 | RecordDeclaration
of
194 { record_attribute_spec
: t
195 ; record_modifier
: t
198 ; record_extends_keyword
: t
199 ; record_extends_opt
: t
200 ; record_left_brace
: t
202 ; record_right_brace
: t
205 { record_field_type
: t
206 ; record_field_name
: t
207 ; record_field_init
: t
208 ; record_field_semi
: t
210 | AliasDeclaration
of
211 { alias_attribute_spec
: t
214 ; alias_generic_parameter
: t
215 ; alias_constraint
: t
218 ; alias_semicolon
: t
220 | PropertyDeclaration
of
221 { property_attribute_spec
: t
222 ; property_modifiers
: t
224 ; property_declarators
: t
225 ; property_semicolon
: t
227 | PropertyDeclarator
of
229 ; property_initializer
: t
231 | NamespaceDeclaration
of
232 { namespace_header
: t
235 | NamespaceDeclarationHeader
of
236 { namespace_keyword
: t
240 { namespace_left_brace
: t
241 ; namespace_declarations
: t
242 ; namespace_right_brace
: t
244 | NamespaceEmptyBody
of
245 { namespace_semicolon
: t
247 | NamespaceUseDeclaration
of
248 { namespace_use_keyword
: t
249 ; namespace_use_kind
: t
250 ; namespace_use_clauses
: t
251 ; namespace_use_semicolon
: t
253 | NamespaceGroupUseDeclaration
of
254 { namespace_group_use_keyword
: t
255 ; namespace_group_use_kind
: t
256 ; namespace_group_use_prefix
: t
257 ; namespace_group_use_left_brace
: t
258 ; namespace_group_use_clauses
: t
259 ; namespace_group_use_right_brace
: t
260 ; namespace_group_use_semicolon
: t
262 | NamespaceUseClause
of
263 { namespace_use_clause_kind
: t
264 ; namespace_use_name
: t
265 ; namespace_use_as
: t
266 ; namespace_use_alias
: t
268 | FunctionDeclaration
of
269 { function_attribute_spec
: t
270 ; function_declaration_header
: t
273 | FunctionDeclarationHeader
of
274 { function_modifiers
: t
275 ; function_keyword
: t
277 ; function_type_parameter_list
: t
278 ; function_left_paren
: t
279 ; function_parameter_list
: t
280 ; function_right_paren
: t
283 ; function_where_clause
: t
286 { where_clause_keyword
: t
287 ; where_clause_constraints
: t
290 { where_constraint_left_type
: t
291 ; where_constraint_operator
: t
292 ; where_constraint_right_type
: t
294 | MethodishDeclaration
of
295 { methodish_attribute
: t
296 ; methodish_function_decl_header
: t
297 ; methodish_function_body
: t
298 ; methodish_semicolon
: t
300 | MethodishTraitResolution
of
301 { methodish_trait_attribute
: t
302 ; methodish_trait_function_decl_header
: t
303 ; methodish_trait_equal
: t
304 ; methodish_trait_name
: t
305 ; methodish_trait_semicolon
: t
307 | ClassishDeclaration
of
308 { classish_attribute
: t
309 ; classish_modifiers
: t
311 ; classish_keyword
: t
313 ; classish_type_parameters
: t
314 ; classish_extends_keyword
: t
315 ; classish_extends_list
: t
316 ; classish_implements_keyword
: t
317 ; classish_implements_list
: t
318 ; classish_where_clause
: t
322 { classish_body_left_brace
: t
323 ; classish_body_elements
: t
324 ; classish_body_right_brace
: t
326 | TraitUsePrecedenceItem
of
327 { trait_use_precedence_item_name
: t
328 ; trait_use_precedence_item_keyword
: t
329 ; trait_use_precedence_item_removed_names
: t
331 | TraitUseAliasItem
of
332 { trait_use_alias_item_aliasing_name
: t
333 ; trait_use_alias_item_keyword
: t
334 ; trait_use_alias_item_modifiers
: t
335 ; trait_use_alias_item_aliased_name
: t
337 | TraitUseConflictResolution
of
338 { trait_use_conflict_resolution_keyword
: t
339 ; trait_use_conflict_resolution_names
: t
340 ; trait_use_conflict_resolution_left_brace
: t
341 ; trait_use_conflict_resolution_clauses
: t
342 ; trait_use_conflict_resolution_right_brace
: t
345 { trait_use_keyword
: t
346 ; trait_use_names
: t
347 ; trait_use_semicolon
: t
350 { require_keyword
: t
353 ; require_semicolon
: t
355 | ConstDeclaration
of
356 { const_modifiers
: t
358 ; const_type_specifier
: t
359 ; const_declarators
: t
360 ; const_semicolon
: t
362 | ConstantDeclarator
of
363 { constant_declarator_name
: t
364 ; constant_declarator_initializer
: t
366 | TypeConstDeclaration
of
367 { type_const_attribute_spec
: t
368 ; type_const_modifiers
: t
369 ; type_const_keyword
: t
370 ; type_const_type_keyword
: t
371 ; type_const_name
: t
372 ; type_const_type_parameters
: t
373 ; type_const_type_constraint
: t
374 ; type_const_equal
: t
375 ; type_const_type_specifier
: t
376 ; type_const_semicolon
: t
378 | DecoratedExpression
of
379 { decorated_expression_decorator
: t
380 ; decorated_expression_expression
: t
382 | ParameterDeclaration
of
383 { parameter_attribute
: t
384 ; parameter_visibility
: t
385 ; parameter_call_convention
: t
388 ; parameter_default_value
: t
390 | VariadicParameter
of
391 { variadic_parameter_call_convention
: t
392 ; variadic_parameter_type
: t
393 ; variadic_parameter_ellipsis
: t
395 | OldAttributeSpecification
of
396 { old_attribute_specification_left_double_angle
: t
397 ; old_attribute_specification_attributes
: t
398 ; old_attribute_specification_right_double_angle
: t
400 | AttributeSpecification
of
401 { attribute_specification_attributes
: t
405 ; attribute_attribute_name
: t
407 | InclusionExpression
of
408 { inclusion_require
: t
409 ; inclusion_filename
: t
411 | InclusionDirective
of
412 { inclusion_expression
: t
413 ; inclusion_semicolon
: t
415 | CompoundStatement
of
416 { compound_left_brace
: t
417 ; compound_statements
: t
418 ; compound_right_brace
: t
420 | ExpressionStatement
of
421 { expression_statement_expression
: t
422 ; expression_statement_semicolon
: t
429 { markup_suffix_less_than_question
: t
430 ; markup_suffix_name
: t
434 ; unset_left_paren
: t
435 ; unset_variables
: t
436 ; unset_right_paren
: t
437 ; unset_semicolon
: t
439 | UsingStatementBlockScoped
of
440 { using_block_await_keyword
: t
441 ; using_block_using_keyword
: t
442 ; using_block_left_paren
: t
443 ; using_block_expressions
: t
444 ; using_block_right_paren
: t
445 ; using_block_body
: t
447 | UsingStatementFunctionScoped
of
448 { using_function_await_keyword
: t
449 ; using_function_using_keyword
: t
450 ; using_function_expression
: t
451 ; using_function_semicolon
: t
455 ; while_left_paren
: t
456 ; while_condition
: t
457 ; while_right_paren
: t
466 ; if_elseif_clauses
: t
471 ; elseif_left_paren
: t
472 ; elseif_condition
: t
473 ; elseif_right_paren
: t
474 ; elseif_statement
: t
482 ; try_compound_statement
: t
483 ; try_catch_clauses
: t
484 ; try_finally_clause
: t
488 ; catch_left_paren
: t
491 ; catch_right_paren
: t
495 { finally_keyword
: t
501 ; do_while_keyword
: t
510 ; for_initializer
: t
511 ; for_first_semicolon
: t
513 ; for_second_semicolon
: t
514 ; for_end_of_loop
: t
515 ; for_right_paren
: t
518 | ForeachStatement
of
519 { foreach_keyword
: t
520 ; foreach_left_paren
: t
521 ; foreach_collection
: t
522 ; foreach_await_keyword
: t
527 ; foreach_right_paren
: t
532 ; switch_left_paren
: t
533 ; switch_expression
: t
534 ; switch_right_paren
: t
535 ; switch_left_brace
: t
536 ; switch_sections
: t
537 ; switch_right_brace
: t
540 { switch_section_labels
: t
541 ; switch_section_statements
: t
542 ; switch_section_fallthrough
: t
544 | SwitchFallthrough
of
545 { fallthrough_keyword
: t
546 ; fallthrough_semicolon
: t
550 ; case_expression
: t
554 { default_keyword
: t
559 ; return_expression
: t
560 ; return_semicolon
: t
563 { goto_label_name
: t
564 ; goto_label_colon
: t
567 { goto_statement_keyword
: t
568 ; goto_statement_label_name
: t
569 ; goto_statement_semicolon
: t
573 ; throw_expression
: t
574 ; throw_semicolon
: t
578 ; break_semicolon
: t
580 | ContinueStatement
of
581 { continue_keyword
: t
582 ; continue_semicolon
: t
586 ; echo_expressions
: t
589 | ConcurrentStatement
of
590 { concurrent_keyword
: t
591 ; concurrent_statement
: t
593 | SimpleInitializer
of
594 { simple_initializer_equal
: t
595 ; simple_initializer_value
: t
598 { anonymous_class_class_keyword
: t
599 ; anonymous_class_left_paren
: t
600 ; anonymous_class_argument_list
: t
601 ; anonymous_class_right_paren
: t
602 ; anonymous_class_extends_keyword
: t
603 ; anonymous_class_extends_list
: t
604 ; anonymous_class_implements_keyword
: t
605 ; anonymous_class_implements_list
: t
606 ; anonymous_class_body
: t
608 | AnonymousFunction
of
609 { anonymous_attribute_spec
: t
610 ; anonymous_static_keyword
: t
611 ; anonymous_async_keyword
: t
612 ; anonymous_function_keyword
: t
613 ; anonymous_left_paren
: t
614 ; anonymous_parameters
: t
615 ; anonymous_right_paren
: t
616 ; anonymous_colon
: t
621 | AnonymousFunctionUseClause
of
622 { anonymous_use_keyword
: t
623 ; anonymous_use_left_paren
: t
624 ; anonymous_use_variables
: t
625 ; anonymous_use_right_paren
: t
627 | LambdaExpression
of
628 { lambda_attribute_spec
: t
630 ; lambda_signature
: t
635 { lambda_left_paren
: t
636 ; lambda_parameters
: t
637 ; lambda_right_paren
: t
642 { cast_left_paren
: t
644 ; cast_right_paren
: t
647 | ScopeResolutionExpression
of
648 { scope_resolution_qualifier
: t
649 ; scope_resolution_operator
: t
650 ; scope_resolution_name
: t
652 | MemberSelectionExpression
of
654 ; member_operator
: t
657 | SafeMemberSelectionExpression
of
658 { safe_member_object
: t
659 ; safe_member_operator
: t
660 ; safe_member_name
: t
662 | EmbeddedMemberSelectionExpression
of
663 { embedded_member_object
: t
664 ; embedded_member_operator
: t
665 ; embedded_member_name
: t
671 | PrefixUnaryExpression
of
672 { prefix_unary_operator
: t
673 ; prefix_unary_operand
: t
675 | PostfixUnaryExpression
of
676 { postfix_unary_operand
: t
677 ; postfix_unary_operator
: t
679 | BinaryExpression
of
680 { binary_left_operand
: t
681 ; binary_operator
: t
682 ; binary_right_operand
: t
685 { is_left_operand
: t
687 ; is_right_operand
: t
690 { as_left_operand
: t
692 ; as_right_operand
: t
694 | NullableAsExpression
of
695 { nullable_as_left_operand
: t
696 ; nullable_as_operator
: t
697 ; nullable_as_right_operand
: t
699 | ConditionalExpression
of
700 { conditional_test
: t
701 ; conditional_question
: t
702 ; conditional_consequence
: t
703 ; conditional_colon
: t
704 ; conditional_alternative
: t
708 ; eval_left_paren
: t
710 ; eval_right_paren
: t
712 | DefineExpression
of
714 ; define_left_paren
: t
715 ; define_argument_list
: t
716 ; define_right_paren
: t
720 ; isset_left_paren
: t
721 ; isset_argument_list
: t
722 ; isset_right_paren
: t
724 | FunctionCallExpression
of
725 { function_call_receiver
: t
726 ; function_call_type_args
: t
727 ; function_call_left_paren
: t
728 ; function_call_argument_list
: t
729 ; function_call_right_paren
: t
731 | FunctionPointerExpression
of
732 { function_pointer_receiver
: t
733 ; function_pointer_type_args
: t
735 | ParenthesizedExpression
of
736 { parenthesized_expression_left_paren
: t
737 ; parenthesized_expression_expression
: t
738 ; parenthesized_expression_right_paren
: t
740 | BracedExpression
of
741 { braced_expression_left_brace
: t
742 ; braced_expression_expression
: t
743 ; braced_expression_right_brace
: t
745 | EmbeddedBracedExpression
of
746 { embedded_braced_expression_left_brace
: t
747 ; embedded_braced_expression_expression
: t
748 ; embedded_braced_expression_right_brace
: t
752 ; list_left_paren
: t
754 ; list_right_paren
: t
756 | CollectionLiteralExpression
of
757 { collection_literal_name
: t
758 ; collection_literal_left_brace
: t
759 ; collection_literal_initializers
: t
760 ; collection_literal_right_brace
: t
762 | ObjectCreationExpression
of
763 { object_creation_new_keyword
: t
764 ; object_creation_object
: t
767 { constructor_call_type
: t
768 ; constructor_call_left_paren
: t
769 ; constructor_call_argument_list
: t
770 ; constructor_call_right_paren
: t
772 | RecordCreationExpression
of
773 { record_creation_type
: t
774 ; record_creation_left_bracket
: t
775 ; record_creation_members
: t
776 ; record_creation_right_bracket
: t
778 | ArrayIntrinsicExpression
of
779 { array_intrinsic_keyword
: t
780 ; array_intrinsic_left_paren
: t
781 ; array_intrinsic_members
: t
782 ; array_intrinsic_right_paren
: t
784 | DarrayIntrinsicExpression
of
785 { darray_intrinsic_keyword
: t
786 ; darray_intrinsic_explicit_type
: t
787 ; darray_intrinsic_left_bracket
: t
788 ; darray_intrinsic_members
: t
789 ; darray_intrinsic_right_bracket
: t
791 | DictionaryIntrinsicExpression
of
792 { dictionary_intrinsic_keyword
: t
793 ; dictionary_intrinsic_explicit_type
: t
794 ; dictionary_intrinsic_left_bracket
: t
795 ; dictionary_intrinsic_members
: t
796 ; dictionary_intrinsic_right_bracket
: t
798 | KeysetIntrinsicExpression
of
799 { keyset_intrinsic_keyword
: t
800 ; keyset_intrinsic_explicit_type
: t
801 ; keyset_intrinsic_left_bracket
: t
802 ; keyset_intrinsic_members
: t
803 ; keyset_intrinsic_right_bracket
: t
805 | VarrayIntrinsicExpression
of
806 { varray_intrinsic_keyword
: t
807 ; varray_intrinsic_explicit_type
: t
808 ; varray_intrinsic_left_bracket
: t
809 ; varray_intrinsic_members
: t
810 ; varray_intrinsic_right_bracket
: t
812 | VectorIntrinsicExpression
of
813 { vector_intrinsic_keyword
: t
814 ; vector_intrinsic_explicit_type
: t
815 ; vector_intrinsic_left_bracket
: t
816 ; vector_intrinsic_members
: t
817 ; vector_intrinsic_right_bracket
: t
819 | ElementInitializer
of
824 | SubscriptExpression
of
825 { subscript_receiver
: t
826 ; subscript_left_bracket
: t
827 ; subscript_index
: t
828 ; subscript_right_bracket
: t
830 | EmbeddedSubscriptExpression
of
831 { embedded_subscript_receiver
: t
832 ; embedded_subscript_left_bracket
: t
833 ; embedded_subscript_index
: t
834 ; embedded_subscript_right_bracket
: t
836 | AwaitableCreationExpression
of
837 { awaitable_attribute_spec
: t
838 ; awaitable_async
: t
839 ; awaitable_compound_statement
: t
841 | XHPChildrenDeclaration
of
842 { xhp_children_keyword
: t
843 ; xhp_children_expression
: t
844 ; xhp_children_semicolon
: t
846 | XHPChildrenParenthesizedList
of
847 { xhp_children_list_left_paren
: t
848 ; xhp_children_list_xhp_children
: t
849 ; xhp_children_list_right_paren
: t
851 | XHPCategoryDeclaration
of
852 { xhp_category_keyword
: t
853 ; xhp_category_categories
: t
854 ; xhp_category_semicolon
: t
857 { xhp_enum_optional
: t
858 ; xhp_enum_keyword
: t
859 ; xhp_enum_left_brace
: t
860 ; xhp_enum_values
: t
861 ; xhp_enum_right_brace
: t
864 { xhp_lateinit_at
: t
865 ; xhp_lateinit_keyword
: t
868 { xhp_required_at
: t
869 ; xhp_required_keyword
: t
871 | XHPClassAttributeDeclaration
of
872 { xhp_attribute_keyword
: t
873 ; xhp_attribute_attributes
: t
874 ; xhp_attribute_semicolon
: t
876 | XHPClassAttribute
of
877 { xhp_attribute_decl_type
: t
878 ; xhp_attribute_decl_name
: t
879 ; xhp_attribute_decl_initializer
: t
880 ; xhp_attribute_decl_required
: t
882 | XHPSimpleClassAttribute
of
883 { xhp_simple_class_attribute_type
: t
885 | XHPSimpleAttribute
of
886 { xhp_simple_attribute_name
: t
887 ; xhp_simple_attribute_equal
: t
888 ; xhp_simple_attribute_expression
: t
890 | XHPSpreadAttribute
of
891 { xhp_spread_attribute_left_brace
: t
892 ; xhp_spread_attribute_spread_operator
: t
893 ; xhp_spread_attribute_expression
: t
894 ; xhp_spread_attribute_right_brace
: t
897 { xhp_open_left_angle
: t
899 ; xhp_open_attributes
: t
900 ; xhp_open_right_angle
: t
908 { xhp_close_left_angle
: t
910 ; xhp_close_right_angle
: t
913 { type_constant_left_type
: t
914 ; type_constant_separator
: t
915 ; type_constant_right_type
: t
918 { pu_access_left_type
: t
919 ; pu_access_separator
: t
920 ; pu_access_right_type
: t
922 | VectorTypeSpecifier
of
923 { vector_type_keyword
: t
924 ; vector_type_left_angle
: t
925 ; vector_type_type
: t
926 ; vector_type_trailing_comma
: t
927 ; vector_type_right_angle
: t
929 | KeysetTypeSpecifier
of
930 { keyset_type_keyword
: t
931 ; keyset_type_left_angle
: t
932 ; keyset_type_type
: t
933 ; keyset_type_trailing_comma
: t
934 ; keyset_type_right_angle
: t
936 | TupleTypeExplicitSpecifier
of
937 { tuple_type_keyword
: t
938 ; tuple_type_left_angle
: t
939 ; tuple_type_types
: t
940 ; tuple_type_right_angle
: t
942 | VarrayTypeSpecifier
of
944 ; varray_left_angle
: t
946 ; varray_trailing_comma
: t
947 ; varray_right_angle
: t
949 | VectorArrayTypeSpecifier
of
950 { vector_array_keyword
: t
951 ; vector_array_left_angle
: t
952 ; vector_array_type
: t
953 ; vector_array_right_angle
: t
956 { type_attribute_spec
: t
960 ; type_param_params
: t
961 ; type_constraints
: t
964 { constraint_keyword
: t
965 ; constraint_type
: t
967 | DarrayTypeSpecifier
of
969 ; darray_left_angle
: t
973 ; darray_trailing_comma
: t
974 ; darray_right_angle
: t
976 | MapArrayTypeSpecifier
of
977 { map_array_keyword
: t
978 ; map_array_left_angle
: t
980 ; map_array_comma
: t
981 ; map_array_value
: t
982 ; map_array_right_angle
: t
984 | DictionaryTypeSpecifier
of
985 { dictionary_type_keyword
: t
986 ; dictionary_type_left_angle
: t
987 ; dictionary_type_members
: t
988 ; dictionary_type_right_angle
: t
990 | ClosureTypeSpecifier
of
991 { closure_outer_left_paren
: t
992 ; closure_function_keyword
: t
993 ; closure_inner_left_paren
: t
994 ; closure_parameter_list
: t
995 ; closure_inner_right_paren
: t
997 ; closure_return_type
: t
998 ; closure_outer_right_paren
: t
1000 | ClosureParameterTypeSpecifier
of
1001 { closure_parameter_call_convention
: t
1002 ; closure_parameter_type
: t
1004 | ClassnameTypeSpecifier
of
1005 { classname_keyword
: t
1006 ; classname_left_angle
: t
1007 ; classname_type
: t
1008 ; classname_trailing_comma
: t
1009 ; classname_right_angle
: t
1012 { field_question
: t
1017 | FieldInitializer
of
1018 { field_initializer_name
: t
1019 ; field_initializer_arrow
: t
1020 ; field_initializer_value
: t
1022 | ShapeTypeSpecifier
of
1023 { shape_type_keyword
: t
1024 ; shape_type_left_paren
: t
1025 ; shape_type_fields
: t
1026 ; shape_type_ellipsis
: t
1027 ; shape_type_right_paren
: t
1029 | ShapeExpression
of
1030 { shape_expression_keyword
: t
1031 ; shape_expression_left_paren
: t
1032 ; shape_expression_fields
: t
1033 ; shape_expression_right_paren
: t
1035 | TupleExpression
of
1036 { tuple_expression_keyword
: t
1037 ; tuple_expression_left_paren
: t
1038 ; tuple_expression_items
: t
1039 ; tuple_expression_right_paren
: t
1041 | GenericTypeSpecifier
of
1042 { generic_class_type
: t
1043 ; generic_argument_list
: t
1045 | NullableTypeSpecifier
of
1046 { nullable_question
: t
1049 | LikeTypeSpecifier
of
1053 | SoftTypeSpecifier
of
1057 | AttributizedSpecifier
of
1058 { attributized_specifier_attribute_spec
: t
1059 ; attributized_specifier_type
: t
1061 | ReifiedTypeArgument
of
1062 { reified_type_argument_reified
: t
1063 ; reified_type_argument_type
: t
1066 { type_arguments_left_angle
: t
1067 ; type_arguments_types
: t
1068 ; type_arguments_right_angle
: t
1071 { type_parameters_left_angle
: t
1072 ; type_parameters_parameters
: t
1073 ; type_parameters_right_angle
: t
1075 | TupleTypeSpecifier
of
1076 { tuple_left_paren
: t
1078 ; tuple_right_paren
: t
1080 | UnionTypeSpecifier
of
1081 { union_left_paren
: t
1083 ; union_right_paren
: t
1085 | IntersectionTypeSpecifier
of
1086 { intersection_left_paren
: t
1087 ; intersection_types
: t
1088 ; intersection_right_paren
: t
1095 ; list_separator
: t
1097 | PocketAtomExpression
of
1098 { pocket_atom_glyph
: t
1099 ; pocket_atom_expression
: t
1101 | PocketIdentifierExpression
of
1102 { pocket_identifier_qualifier
: t
1103 ; pocket_identifier_pu_operator
: t
1104 ; pocket_identifier_field
: t
1105 ; pocket_identifier_operator
: t
1106 ; pocket_identifier_name
: t
1108 | PocketAtomMappingDeclaration
of
1109 { pocket_atom_mapping_glyph
: t
1110 ; pocket_atom_mapping_name
: t
1111 ; pocket_atom_mapping_left_paren
: t
1112 ; pocket_atom_mapping_mappings
: t
1113 ; pocket_atom_mapping_right_paren
: t
1114 ; pocket_atom_mapping_semicolon
: t
1116 | PocketEnumDeclaration
of
1117 { pocket_enum_attributes
: t
1118 ; pocket_enum_modifiers
: t
1119 ; pocket_enum_enum
: t
1120 ; pocket_enum_name
: t
1121 ; pocket_enum_left_brace
: t
1122 ; pocket_enum_fields
: t
1123 ; pocket_enum_right_brace
: t
1125 | PocketFieldTypeExprDeclaration
of
1126 { pocket_field_type_expr_case
: t
1127 ; pocket_field_type_expr_type
: t
1128 ; pocket_field_type_expr_name
: t
1129 ; pocket_field_type_expr_semicolon
: t
1131 | PocketFieldTypeDeclaration
of
1132 { pocket_field_type_case
: t
1133 ; pocket_field_type_type
: t
1134 ; pocket_field_type_type_parameter
: t
1135 ; pocket_field_type_semicolon
: t
1137 | PocketMappingIdDeclaration
of
1138 { pocket_mapping_id_name
: t
1139 ; pocket_mapping_id_initializer
: t
1141 | PocketMappingTypeDeclaration
of
1142 { pocket_mapping_type_keyword
: t
1143 ; pocket_mapping_type_name
: t
1144 ; pocket_mapping_type_equal
: t
1145 ; pocket_mapping_type_type
: t
1150 module MakeValidated
(Token
: TokenType
)(SyntaxValue
: SyntaxValueType
) = struct
1151 type 'a
value = SyntaxValue.t
* 'a
[@@deriving show
]
1152 (* TODO: Different styles of list seem to only happen in predetermined places,
1153 * so split this out again into specific variants
1156 | Syntactic
of ('a
value * Token.t
option value) value list
1157 | NonSyntactic
of 'a
value list
1159 | SingletonList
of 'a
value
1160 and top_level_declaration
=
1161 | TLDEndOfFile
of end_of_file
1162 | TLDFileAttributeSpecification
of file_attribute_specification
1163 | TLDEnum
of enum_declaration
1164 | TLDRecord
of record_declaration
1165 | TLDAlias
of alias_declaration
1166 | TLDNamespace
of namespace_declaration
1167 | TLDNamespaceDeclarationHeader
of namespace_declaration_header
1168 | TLDNamespaceUse
of namespace_use_declaration
1169 | TLDNamespaceGroupUse
of namespace_group_use_declaration
1170 | TLDFunction
of function_declaration
1171 | TLDClassish
of classish_declaration
1172 | TLDConst
of const_declaration
1173 | TLDInclusionDirective
of inclusion_directive
1174 | TLDCompound
of compound_statement
1175 | TLDExpression
of expression_statement
1176 | TLDMarkupSection
of markup_section
1177 | TLDMarkupSuffix
of markup_suffix
1178 | TLDUnset
of unset_statement
1179 | TLDUsingStatementBlockScoped
of using_statement_block_scoped
1180 | TLDUsingStatementFunctionScoped
of using_statement_function_scoped
1181 | TLDWhile
of while_statement
1182 | TLDIf
of if_statement
1183 | TLDTry
of try_statement
1184 | TLDDo
of do_statement
1185 | TLDFor
of for_statement
1186 | TLDForeach
of foreach_statement
1187 | TLDSwitchFallthrough
of switch_fallthrough
1188 | TLDReturn
of return_statement
1189 | TLDGotoLabel
of goto_label
1190 | TLDGoto
of goto_statement
1191 | TLDThrow
of throw_statement
1192 | TLDBreak
of break_statement
1193 | TLDContinue
of continue_statement
1194 | TLDEcho
of echo_statement
1196 | ExprLiteral
of literal_expression
1197 | ExprPrefixedString
of prefixed_string_expression
1198 | ExprVariable
of variable_expression
1199 | ExprPipeVariable
of pipe_variable_expression
1200 | ExprDecorated
of decorated_expression
1201 | ExprInclusion
of inclusion_expression
1202 | ExprAnonymousFunction
of anonymous_function
1203 | ExprLambda
of lambda_expression
1204 | ExprCast
of cast_expression
1205 | ExprScopeResolution
of scope_resolution_expression
1206 | ExprMemberSelection
of member_selection_expression
1207 | ExprSafeMemberSelection
of safe_member_selection_expression
1208 | ExprEmbeddedMemberSelection
of embedded_member_selection_expression
1209 | ExprYield
of yield_expression
1210 | ExprPrefixUnary
of prefix_unary_expression
1211 | ExprPostfixUnary
of postfix_unary_expression
1212 | ExprBinary
of binary_expression
1213 | ExprIs
of is_expression
1214 | ExprAs
of as_expression
1215 | ExprNullableAs
of nullable_as_expression
1216 | ExprConditional
of conditional_expression
1217 | ExprEval
of eval_expression
1218 | ExprDefine
of define_expression
1219 | ExprIsset
of isset_expression
1220 | ExprFunctionCall
of function_call_expression
1221 | ExprFunctionPointer
of function_pointer_expression
1222 | ExprParenthesized
of parenthesized_expression
1223 | ExprBraced
of braced_expression
1224 | ExprEmbeddedBraced
of embedded_braced_expression
1225 | ExprList
of list_expression
1226 | ExprCollectionLiteral
of collection_literal_expression
1227 | ExprObjectCreation
of object_creation_expression
1228 | ExprRecordCreation
of record_creation_expression
1229 | ExprArrayIntrinsic
of array_intrinsic_expression
1230 | ExprDarrayIntrinsic
of darray_intrinsic_expression
1231 | ExprDictionaryIntrinsic
of dictionary_intrinsic_expression
1232 | ExprKeysetIntrinsic
of keyset_intrinsic_expression
1233 | ExprVarrayIntrinsic
of varray_intrinsic_expression
1234 | ExprVectorIntrinsic
of vector_intrinsic_expression
1235 | ExprSubscript
of subscript_expression
1236 | ExprEmbeddedSubscript
of embedded_subscript_expression
1237 | ExprAwaitableCreation
of awaitable_creation_expression
1238 | ExprXHPChildrenParenthesizedList
of xhp_children_parenthesized_list
1239 | ExprXHP
of xhp_expression
1240 | ExprShape
of shape_expression
1241 | ExprTuple
of tuple_expression
1242 | ExprPocketAtom
of pocket_atom_expression
1243 | ExprPocketIdentifier
of pocket_identifier_expression
1245 | SpecSimple
of simple_type_specifier
1246 | SpecVariadicParameter
of variadic_parameter
1247 | SpecLambdaSignature
of lambda_signature
1248 | SpecXHPEnumType
of xhp_enum_type
1249 | SpecVector
of vector_type_specifier
1250 | SpecKeyset
of keyset_type_specifier
1251 | SpecTupleTypeExplicit
of tuple_type_explicit_specifier
1252 | SpecVarray
of varray_type_specifier
1253 | SpecVectorArray
of vector_array_type_specifier
1254 | SpecDarray
of darray_type_specifier
1255 | SpecMapArray
of map_array_type_specifier
1256 | SpecDictionary
of dictionary_type_specifier
1257 | SpecClosure
of closure_type_specifier
1258 | SpecClosureParameter
of closure_parameter_type_specifier
1259 | SpecClassname
of classname_type_specifier
1260 | SpecField
of field_specifier
1261 | SpecShape
of shape_type_specifier
1262 | SpecGeneric
of generic_type_specifier
1263 | SpecNullable
of nullable_type_specifier
1264 | SpecLike
of like_type_specifier
1265 | SpecSoft
of soft_type_specifier
1266 | SpecTuple
of tuple_type_specifier
1267 | SpecUnion
of union_type_specifier
1268 | SpecIntersection
of intersection_type_specifier
1270 | ParamParameterDeclaration
of parameter_declaration
1271 | ParamVariadicParameter
of variadic_parameter
1272 and class_body_declaration
=
1273 | BodyProperty
of property_declaration
1274 | BodyMethodish
of methodish_declaration
1275 | BodyMethodishTraitResolution
of methodish_trait_resolution
1276 | BodyRequireClause
of require_clause
1277 | BodyConst
of const_declaration
1278 | BodyTypeConst
of type_const_declaration
1279 | BodyXHPChildren
of xhp_children_declaration
1280 | BodyXHPCategory
of xhp_category_declaration
1281 | BodyXHPClassAttribute
of xhp_class_attribute_declaration
1282 | BodyPocketEnum
of pocket_enum_declaration
1284 | StmtInclusionDirective
of inclusion_directive
1285 | StmtCompound
of compound_statement
1286 | StmtExpression
of expression_statement
1287 | StmtMarkupSection
of markup_section
1288 | StmtMarkupSuffix
of markup_suffix
1289 | StmtUnset
of unset_statement
1290 | StmtUsingStatementBlockScoped
of using_statement_block_scoped
1291 | StmtUsingStatementFunctionScoped
of using_statement_function_scoped
1292 | StmtWhile
of while_statement
1293 | StmtIf
of if_statement
1294 | StmtTry
of try_statement
1295 | StmtDo
of do_statement
1296 | StmtFor
of for_statement
1297 | StmtForeach
of foreach_statement
1298 | StmtSwitch
of switch_statement
1299 | StmtSwitchFallthrough
of switch_fallthrough
1300 | StmtReturn
of return_statement
1301 | StmtGotoLabel
of goto_label
1302 | StmtGoto
of goto_statement
1303 | StmtThrow
of throw_statement
1304 | StmtBreak
of break_statement
1305 | StmtContinue
of continue_statement
1306 | StmtEcho
of echo_statement
1307 | StmtConcurrent
of concurrent_statement
1308 | StmtTypeConstant
of type_constant
1309 | StmtPUAccess
of pu_access
1311 | SwitchCase
of case_label
1312 | SwitchDefault
of default_label
1314 | LambdaLiteral
of literal_expression
1315 | LambdaPrefixedString
of prefixed_string_expression
1316 | LambdaVariable
of variable_expression
1317 | LambdaPipeVariable
of pipe_variable_expression
1318 | LambdaDecorated
of decorated_expression
1319 | LambdaInclusion
of inclusion_expression
1320 | LambdaCompoundStatement
of compound_statement
1321 | LambdaAnonymousFunction
of anonymous_function
1322 | LambdaLambda
of lambda_expression
1323 | LambdaCast
of cast_expression
1324 | LambdaScopeResolution
of scope_resolution_expression
1325 | LambdaMemberSelection
of member_selection_expression
1326 | LambdaSafeMemberSelection
of safe_member_selection_expression
1327 | LambdaEmbeddedMemberSelection
of embedded_member_selection_expression
1328 | LambdaYield
of yield_expression
1329 | LambdaPrefixUnary
of prefix_unary_expression
1330 | LambdaPostfixUnary
of postfix_unary_expression
1331 | LambdaBinary
of binary_expression
1332 | LambdaIs
of is_expression
1333 | LambdaAs
of as_expression
1334 | LambdaNullableAs
of nullable_as_expression
1335 | LambdaConditional
of conditional_expression
1336 | LambdaEval
of eval_expression
1337 | LambdaDefine
of define_expression
1338 | LambdaIsset
of isset_expression
1339 | LambdaFunctionCall
of function_call_expression
1340 | LambdaFunctionPointer
of function_pointer_expression
1341 | LambdaParenthesized
of parenthesized_expression
1342 | LambdaBraced
of braced_expression
1343 | LambdaEmbeddedBraced
of embedded_braced_expression
1344 | LambdaList
of list_expression
1345 | LambdaCollectionLiteral
of collection_literal_expression
1346 | LambdaObjectCreation
of object_creation_expression
1347 | LambdaRecordCreation
of record_creation_expression
1348 | LambdaArrayIntrinsic
of array_intrinsic_expression
1349 | LambdaDarrayIntrinsic
of darray_intrinsic_expression
1350 | LambdaDictionaryIntrinsic
of dictionary_intrinsic_expression
1351 | LambdaKeysetIntrinsic
of keyset_intrinsic_expression
1352 | LambdaVarrayIntrinsic
of varray_intrinsic_expression
1353 | LambdaVectorIntrinsic
of vector_intrinsic_expression
1354 | LambdaSubscript
of subscript_expression
1355 | LambdaEmbeddedSubscript
of embedded_subscript_expression
1356 | LambdaAwaitableCreation
of awaitable_creation_expression
1357 | LambdaXHPChildrenParenthesizedList
of xhp_children_parenthesized_list
1358 | LambdaXHP
of xhp_expression
1359 | LambdaShape
of shape_expression
1360 | LambdaTuple
of tuple_expression
1361 | LambdaPocketIdentifier
of pocket_identifier_expression
1362 and constructor_expression
=
1363 | CExprLiteral
of literal_expression
1364 | CExprPrefixedString
of prefixed_string_expression
1365 | CExprVariable
of variable_expression
1366 | CExprPipeVariable
of pipe_variable_expression
1367 | CExprDecorated
of decorated_expression
1368 | CExprInclusion
of inclusion_expression
1369 | CExprAnonymousFunction
of anonymous_function
1370 | CExprLambda
of lambda_expression
1371 | CExprCast
of cast_expression
1372 | CExprScopeResolution
of scope_resolution_expression
1373 | CExprMemberSelection
of member_selection_expression
1374 | CExprSafeMemberSelection
of safe_member_selection_expression
1375 | CExprEmbeddedMemberSelection
of embedded_member_selection_expression
1376 | CExprYield
of yield_expression
1377 | CExprPrefixUnary
of prefix_unary_expression
1378 | CExprPostfixUnary
of postfix_unary_expression
1379 | CExprBinary
of binary_expression
1380 | CExprIs
of is_expression
1381 | CExprAs
of as_expression
1382 | CExprNullableAs
of nullable_as_expression
1383 | CExprConditional
of conditional_expression
1384 | CExprEval
of eval_expression
1385 | CExprDefine
of define_expression
1386 | CExprIsset
of isset_expression
1387 | CExprFunctionCall
of function_call_expression
1388 | CExprFunctionPointer
of function_pointer_expression
1389 | CExprParenthesized
of parenthesized_expression
1390 | CExprBraced
of braced_expression
1391 | CExprEmbeddedBraced
of embedded_braced_expression
1392 | CExprList
of list_expression
1393 | CExprCollectionLiteral
of collection_literal_expression
1394 | CExprObjectCreation
of object_creation_expression
1395 | CExprRecordCreation
of record_creation_expression
1396 | CExprArrayIntrinsic
of array_intrinsic_expression
1397 | CExprDarrayIntrinsic
of darray_intrinsic_expression
1398 | CExprDictionaryIntrinsic
of dictionary_intrinsic_expression
1399 | CExprKeysetIntrinsic
of keyset_intrinsic_expression
1400 | CExprVarrayIntrinsic
of varray_intrinsic_expression
1401 | CExprVectorIntrinsic
of vector_intrinsic_expression
1402 | CExprElementInitializer
of element_initializer
1403 | CExprSubscript
of subscript_expression
1404 | CExprEmbeddedSubscript
of embedded_subscript_expression
1405 | CExprAwaitableCreation
of awaitable_creation_expression
1406 | CExprXHPChildrenParenthesizedList
of xhp_children_parenthesized_list
1407 | CExprXHP
of xhp_expression
1408 | CExprShape
of shape_expression
1409 | CExprTuple
of tuple_expression
1410 | CExprPocketIdentifier
of pocket_identifier_expression
1411 and namespace_internals
=
1412 | NSINamespaceBody
of namespace_body
1413 | NSINamespaceEmptyBody
of namespace_empty_body
1415 | XHPAttrXHPSimpleAttribute
of xhp_simple_attribute
1416 | XHPAttrXHPSpreadAttribute
of xhp_spread_attribute
1417 and object_creation_what
=
1418 | NewAnonymousClass
of anonymous_class
1419 | NewConstructorCall
of constructor_call
1420 and todo_aggregate
=
1421 | TODOEndOfFile
of end_of_file
1422 and name_aggregate
=
1423 | NameQualifiedName
of qualified_name
1424 and pufield_aggregate
=
1425 | PocketFieldPocketAtomMappingDeclaration
of pocket_atom_mapping_declaration
1426 | PocketFieldPocketFieldTypeExprDeclaration
of pocket_field_type_expr_declaration
1427 | PocketFieldPocketFieldTypeDeclaration
of pocket_field_type_declaration
1428 and pumapping_aggregate
=
1429 | PocketMappingPocketMappingIdDeclaration
of pocket_mapping_id_declaration
1430 | PocketMappingPocketMappingTypeDeclaration
of pocket_mapping_type_declaration
1432 { end_of_file_token
: Token.t
value
1435 { script_declarations
: top_level_declaration listesque
value
1437 and qualified_name
=
1438 { qualified_name_parts
: Token.t listesque
value
1440 and simple_type_specifier
=
1441 { simple_type_specifier
: name_aggregate
value
1443 and literal_expression
=
1444 { literal_expression
: expression listesque
value
1446 and prefixed_string_expression
=
1447 { prefixed_string_name
: Token.t
value
1448 ; prefixed_string_str
: Token.t
value
1450 and variable_expression
=
1451 { variable_expression
: Token.t
value
1453 and pipe_variable_expression
=
1454 { pipe_variable_expression
: Token.t
value
1456 and file_attribute_specification
=
1457 { file_attribute_specification_left_double_angle
: Token.t
value
1458 ; file_attribute_specification_keyword
: Token.t
value
1459 ; file_attribute_specification_colon
: Token.t
value
1460 ; file_attribute_specification_attributes
: constructor_call listesque
value
1461 ; file_attribute_specification_right_double_angle
: Token.t
value
1463 and enum_declaration
=
1464 { enum_attribute_spec
: attribute_specification
option value
1465 ; enum_keyword
: Token.t
value
1466 ; enum_name
: Token.t
value
1467 ; enum_colon
: Token.t
value
1468 ; enum_base
: specifier
value
1469 ; enum_type
: type_constraint
option value
1470 ; enum_left_brace
: Token.t
value
1471 ; enum_enumerators
: enumerator listesque
value
1472 ; enum_right_brace
: Token.t
value
1475 { enumerator_name
: Token.t
value
1476 ; enumerator_equal
: Token.t
value
1477 ; enumerator_value
: expression
value
1478 ; enumerator_semicolon
: Token.t
value
1480 and record_declaration
=
1481 { record_attribute_spec
: attribute_specification
option value
1482 ; record_modifier
: Token.t
value
1483 ; record_keyword
: Token.t
value
1484 ; record_name
: Token.t
value
1485 ; record_extends_keyword
: Token.t
option value
1486 ; record_extends_opt
: type_constraint
option value
1487 ; record_left_brace
: Token.t
value
1488 ; record_fields
: record_field listesque
value
1489 ; record_right_brace
: Token.t
value
1492 { record_field_type
: type_constraint
value
1493 ; record_field_name
: Token.t
value
1494 ; record_field_init
: simple_initializer
option value
1495 ; record_field_semi
: Token.t
value
1497 and alias_declaration
=
1498 { alias_attribute_spec
: attribute_specification
option value
1499 ; alias_keyword
: Token.t
value
1500 ; alias_name
: Token.t
option value
1501 ; alias_generic_parameter
: type_parameters
option value
1502 ; alias_constraint
: type_constraint
option value
1503 ; alias_equal
: Token.t
option value
1504 ; alias_type
: specifier
value
1505 ; alias_semicolon
: Token.t
value
1507 and property_declaration
=
1508 { property_attribute_spec
: attribute_specification
option value
1509 ; property_modifiers
: Token.t listesque
value
1510 ; property_type
: specifier
option value
1511 ; property_declarators
: property_declarator listesque
value
1512 ; property_semicolon
: Token.t
value
1514 and property_declarator
=
1515 { property_name
: Token.t
value
1516 ; property_initializer
: simple_initializer
option value
1518 and namespace_declaration
=
1519 { namespace_header
: namespace_declaration_header
value
1520 ; namespace_body
: namespace_internals
value
1522 and namespace_declaration_header
=
1523 { namespace_keyword
: Token.t
value
1524 ; namespace_name
: name_aggregate
option value
1526 and namespace_body
=
1527 { namespace_left_brace
: Token.t
value
1528 ; namespace_declarations
: top_level_declaration listesque
value
1529 ; namespace_right_brace
: Token.t
value
1531 and namespace_empty_body
=
1532 { namespace_semicolon
: Token.t
value
1534 and namespace_use_declaration
=
1535 { namespace_use_keyword
: Token.t
value
1536 ; namespace_use_kind
: Token.t
option value
1537 ; namespace_use_clauses
: (namespace_use_clause
option) listesque
value
1538 ; namespace_use_semicolon
: Token.t
option value
1540 and namespace_group_use_declaration
=
1541 { namespace_group_use_keyword
: Token.t
value
1542 ; namespace_group_use_kind
: Token.t
option value
1543 ; namespace_group_use_prefix
: name_aggregate
value
1544 ; namespace_group_use_left_brace
: Token.t
value
1545 ; namespace_group_use_clauses
: namespace_use_clause listesque
value
1546 ; namespace_group_use_right_brace
: Token.t
value
1547 ; namespace_group_use_semicolon
: Token.t
value
1549 and namespace_use_clause
=
1550 { namespace_use_clause_kind
: Token.t
option value
1551 ; namespace_use_name
: name_aggregate
value
1552 ; namespace_use_as
: Token.t
option value
1553 ; namespace_use_alias
: Token.t
option value
1555 and function_declaration
=
1556 { function_attribute_spec
: attribute_specification
option value
1557 ; function_declaration_header
: function_declaration_header
value
1558 ; function_body
: compound_statement
value
1560 and function_declaration_header
=
1561 { function_modifiers
: Token.t listesque
value
1562 ; function_keyword
: Token.t
value
1563 ; function_name
: Token.t
value
1564 ; function_type_parameter_list
: type_parameters
option value
1565 ; function_left_paren
: Token.t
value
1566 ; function_parameter_list
: (parameter
option) listesque
value
1567 ; function_right_paren
: Token.t
value
1568 ; function_colon
: Token.t
option value
1569 ; function_type
: attributized_specifier
option value
1570 ; function_where_clause
: where_clause
option value
1573 { where_clause_keyword
: Token.t
value
1574 ; where_clause_constraints
: where_constraint listesque
value
1576 and where_constraint
=
1577 { where_constraint_left_type
: specifier
value
1578 ; where_constraint_operator
: Token.t
value
1579 ; where_constraint_right_type
: specifier
value
1581 and methodish_declaration
=
1582 { methodish_attribute
: attribute_specification
option value
1583 ; methodish_function_decl_header
: function_declaration_header
value
1584 ; methodish_function_body
: compound_statement
option value
1585 ; methodish_semicolon
: Token.t
option value
1587 and methodish_trait_resolution
=
1588 { methodish_trait_attribute
: attribute_specification
option value
1589 ; methodish_trait_function_decl_header
: function_declaration_header
value
1590 ; methodish_trait_equal
: Token.t
value
1591 ; methodish_trait_name
: specifier
value
1592 ; methodish_trait_semicolon
: Token.t
value
1594 and classish_declaration
=
1595 { classish_attribute
: attribute_specification
option value
1596 ; classish_modifiers
: Token.t listesque
value
1597 ; classish_xhp
: Token.t
option value
1598 ; classish_keyword
: Token.t
value
1599 ; classish_name
: Token.t
value
1600 ; classish_type_parameters
: type_parameters
option value
1601 ; classish_extends_keyword
: Token.t
option value
1602 ; classish_extends_list
: specifier listesque
value
1603 ; classish_implements_keyword
: Token.t
option value
1604 ; classish_implements_list
: specifier listesque
value
1605 ; classish_where_clause
: where_clause
option value
1606 ; classish_body
: classish_body
value
1609 { classish_body_left_brace
: Token.t
value
1610 ; classish_body_elements
: class_body_declaration listesque
value
1611 ; classish_body_right_brace
: Token.t
value
1613 and trait_use_precedence_item
=
1614 { trait_use_precedence_item_name
: specifier
value
1615 ; trait_use_precedence_item_keyword
: Token.t
value
1616 ; trait_use_precedence_item_removed_names
: specifier listesque
value
1618 and trait_use_alias_item
=
1619 { trait_use_alias_item_aliasing_name
: specifier
value
1620 ; trait_use_alias_item_keyword
: Token.t
value
1621 ; trait_use_alias_item_modifiers
: Token.t listesque
value
1622 ; trait_use_alias_item_aliased_name
: specifier
option value
1624 and trait_use_conflict_resolution
=
1625 { trait_use_conflict_resolution_keyword
: Token.t
value
1626 ; trait_use_conflict_resolution_names
: specifier listesque
value
1627 ; trait_use_conflict_resolution_left_brace
: Token.t
value
1628 ; trait_use_conflict_resolution_clauses
: specifier listesque
value
1629 ; trait_use_conflict_resolution_right_brace
: Token.t
value
1632 { trait_use_keyword
: Token.t
value
1633 ; trait_use_names
: specifier listesque
value
1634 ; trait_use_semicolon
: Token.t
option value
1636 and require_clause
=
1637 { require_keyword
: Token.t
value
1638 ; require_kind
: Token.t
value
1639 ; require_name
: specifier
value
1640 ; require_semicolon
: Token.t
value
1642 and const_declaration
=
1643 { const_modifiers
: Token.t listesque
value
1644 ; const_keyword
: Token.t
value
1645 ; const_type_specifier
: specifier
option value
1646 ; const_declarators
: constant_declarator listesque
value
1647 ; const_semicolon
: Token.t
value
1649 and constant_declarator
=
1650 { constant_declarator_name
: Token.t
value
1651 ; constant_declarator_initializer
: simple_initializer
option value
1653 and type_const_declaration
=
1654 { type_const_attribute_spec
: attribute_specification
option value
1655 ; type_const_modifiers
: Token.t
option value
1656 ; type_const_keyword
: Token.t
value
1657 ; type_const_type_keyword
: Token.t
value
1658 ; type_const_name
: Token.t
value
1659 ; type_const_type_parameters
: type_parameters
option value
1660 ; type_const_type_constraint
: type_constraint
option value
1661 ; type_const_equal
: Token.t
option value
1662 ; type_const_type_specifier
: specifier
option value
1663 ; type_const_semicolon
: Token.t
value
1665 and decorated_expression
=
1666 { decorated_expression_decorator
: Token.t
value
1667 ; decorated_expression_expression
: expression
value
1669 and parameter_declaration
=
1670 { parameter_attribute
: attribute_specification
option value
1671 ; parameter_visibility
: Token.t
option value
1672 ; parameter_call_convention
: Token.t
option value
1673 ; parameter_type
: specifier
option value
1674 ; parameter_name
: expression
value
1675 ; parameter_default_value
: simple_initializer
option value
1677 and variadic_parameter
=
1678 { variadic_parameter_call_convention
: Token.t
option value
1679 ; variadic_parameter_type
: simple_type_specifier
option value
1680 ; variadic_parameter_ellipsis
: Token.t
value
1682 and old_attribute_specification
=
1683 { old_attribute_specification_left_double_angle
: Token.t
value
1684 ; old_attribute_specification_attributes
: constructor_call listesque
value
1685 ; old_attribute_specification_right_double_angle
: Token.t
value
1687 and attribute_specification
=
1688 { attribute_specification_attributes
: attribute listesque
value
1691 { attribute_at
: Token.t
value
1692 ; attribute_attribute_name
: constructor_call
value
1694 and inclusion_expression
=
1695 { inclusion_require
: Token.t
value
1696 ; inclusion_filename
: expression
value
1698 and inclusion_directive
=
1699 { inclusion_expression
: inclusion_expression
value
1700 ; inclusion_semicolon
: Token.t
value
1702 and compound_statement
=
1703 { compound_left_brace
: Token.t
value
1704 ; compound_statements
: statement listesque
value
1705 ; compound_right_brace
: Token.t
value
1707 and expression_statement
=
1708 { expression_statement_expression
: expression
option value
1709 ; expression_statement_semicolon
: Token.t
value
1711 and markup_section
=
1712 { markup_text
: Token.t
value
1713 ; markup_suffix
: markup_suffix
option value
1716 { markup_suffix_less_than_question
: Token.t
value
1717 ; markup_suffix_name
: Token.t
option value
1719 and unset_statement
=
1720 { unset_keyword
: Token.t
value
1721 ; unset_left_paren
: Token.t
value
1722 ; unset_variables
: expression listesque
value
1723 ; unset_right_paren
: Token.t
value
1724 ; unset_semicolon
: Token.t
value
1726 and using_statement_block_scoped
=
1727 { using_block_await_keyword
: Token.t
option value
1728 ; using_block_using_keyword
: Token.t
value
1729 ; using_block_left_paren
: Token.t
value
1730 ; using_block_expressions
: expression listesque
value
1731 ; using_block_right_paren
: Token.t
value
1732 ; using_block_body
: statement
value
1734 and using_statement_function_scoped
=
1735 { using_function_await_keyword
: Token.t
option value
1736 ; using_function_using_keyword
: Token.t
value
1737 ; using_function_expression
: expression
value
1738 ; using_function_semicolon
: Token.t
value
1740 and while_statement
=
1741 { while_keyword
: Token.t
value
1742 ; while_left_paren
: Token.t
value
1743 ; while_condition
: expression
value
1744 ; while_right_paren
: Token.t
value
1745 ; while_body
: statement
value
1748 { if_keyword
: Token.t
value
1749 ; if_left_paren
: Token.t
value
1750 ; if_condition
: expression
value
1751 ; if_right_paren
: Token.t
value
1752 ; if_statement
: statement
value
1753 ; if_elseif_clauses
: elseif_clause listesque
value
1754 ; if_else_clause
: else_clause
option value
1757 { elseif_keyword
: Token.t
value
1758 ; elseif_left_paren
: Token.t
value
1759 ; elseif_condition
: expression
value
1760 ; elseif_right_paren
: Token.t
value
1761 ; elseif_statement
: statement
value
1764 { else_keyword
: Token.t
value
1765 ; else_statement
: statement
value
1768 { try_keyword
: Token.t
value
1769 ; try_compound_statement
: compound_statement
value
1770 ; try_catch_clauses
: catch_clause listesque
value
1771 ; try_finally_clause
: finally_clause
option value
1774 { catch_keyword
: Token.t
value
1775 ; catch_left_paren
: Token.t
value
1776 ; catch_type
: simple_type_specifier
value
1777 ; catch_variable
: Token.t
value
1778 ; catch_right_paren
: Token.t
value
1779 ; catch_body
: compound_statement
value
1781 and finally_clause
=
1782 { finally_keyword
: Token.t
value
1783 ; finally_body
: compound_statement
value
1786 { do_keyword
: Token.t
value
1787 ; do_body
: statement
value
1788 ; do_while_keyword
: Token.t
value
1789 ; do_left_paren
: Token.t
value
1790 ; do_condition
: expression
value
1791 ; do_right_paren
: Token.t
value
1792 ; do_semicolon
: Token.t
value
1795 { for_keyword
: Token.t
value
1796 ; for_left_paren
: Token.t
value
1797 ; for_initializer
: expression listesque
value
1798 ; for_first_semicolon
: Token.t
value
1799 ; for_control
: expression listesque
value
1800 ; for_second_semicolon
: Token.t
value
1801 ; for_end_of_loop
: expression listesque
value
1802 ; for_right_paren
: Token.t
value
1803 ; for_body
: statement
value
1805 and foreach_statement
=
1806 { foreach_keyword
: Token.t
value
1807 ; foreach_left_paren
: Token.t
value
1808 ; foreach_collection
: expression
value
1809 ; foreach_await_keyword
: Token.t
option value
1810 ; foreach_as
: Token.t
value
1811 ; foreach_key
: expression
option value
1812 ; foreach_arrow
: Token.t
option value
1813 ; foreach_value
: expression
value
1814 ; foreach_right_paren
: Token.t
value
1815 ; foreach_body
: statement
value
1817 and switch_statement
=
1818 { switch_keyword
: Token.t
value
1819 ; switch_left_paren
: Token.t
value
1820 ; switch_expression
: expression
value
1821 ; switch_right_paren
: Token.t
value
1822 ; switch_left_brace
: Token.t
value
1823 ; switch_sections
: switch_section listesque
value
1824 ; switch_right_brace
: Token.t
value
1826 and switch_section
=
1827 { switch_section_labels
: switch_label listesque
value
1828 ; switch_section_statements
: top_level_declaration listesque
value
1829 ; switch_section_fallthrough
: switch_fallthrough
option value
1831 and switch_fallthrough
=
1832 { fallthrough_keyword
: Token.t
value
1833 ; fallthrough_semicolon
: Token.t
value
1836 { case_keyword
: Token.t
value
1837 ; case_expression
: expression
value
1838 ; case_colon
: Token.t
value
1841 { default_keyword
: Token.t
value
1842 ; default_colon
: Token.t
value
1844 and return_statement
=
1845 { return_keyword
: Token.t
value
1846 ; return_expression
: expression
option value
1847 ; return_semicolon
: Token.t
option value
1850 { goto_label_name
: Token.t
value
1851 ; goto_label_colon
: Token.t
value
1853 and goto_statement
=
1854 { goto_statement_keyword
: Token.t
value
1855 ; goto_statement_label_name
: Token.t
value
1856 ; goto_statement_semicolon
: Token.t
value
1858 and throw_statement
=
1859 { throw_keyword
: Token.t
value
1860 ; throw_expression
: expression
value
1861 ; throw_semicolon
: Token.t
value
1863 and break_statement
=
1864 { break_keyword
: Token.t
value
1865 ; break_semicolon
: Token.t
value
1867 and continue_statement
=
1868 { continue_keyword
: Token.t
value
1869 ; continue_semicolon
: Token.t
value
1871 and echo_statement
=
1872 { echo_keyword
: Token.t
value
1873 ; echo_expressions
: expression listesque
value
1874 ; echo_semicolon
: Token.t
value
1876 and concurrent_statement
=
1877 { concurrent_keyword
: Token.t
value
1878 ; concurrent_statement
: statement
value
1880 and simple_initializer
=
1881 { simple_initializer_equal
: Token.t
value
1882 ; simple_initializer_value
: expression
value
1884 and anonymous_class
=
1885 { anonymous_class_class_keyword
: Token.t
value
1886 ; anonymous_class_left_paren
: Token.t
option value
1887 ; anonymous_class_argument_list
: expression listesque
value
1888 ; anonymous_class_right_paren
: Token.t
option value
1889 ; anonymous_class_extends_keyword
: Token.t
option value
1890 ; anonymous_class_extends_list
: specifier listesque
value
1891 ; anonymous_class_implements_keyword
: Token.t
option value
1892 ; anonymous_class_implements_list
: specifier listesque
value
1893 ; anonymous_class_body
: classish_body
value
1895 and anonymous_function
=
1896 { anonymous_attribute_spec
: attribute_specification
option value
1897 ; anonymous_static_keyword
: Token.t
option value
1898 ; anonymous_async_keyword
: Token.t
option value
1899 ; anonymous_function_keyword
: Token.t
value
1900 ; anonymous_left_paren
: Token.t
value
1901 ; anonymous_parameters
: parameter listesque
value
1902 ; anonymous_right_paren
: Token.t
value
1903 ; anonymous_colon
: Token.t
option value
1904 ; anonymous_type
: specifier
option value
1905 ; anonymous_use
: anonymous_function_use_clause
option value
1906 ; anonymous_body
: compound_statement
value
1908 and anonymous_function_use_clause
=
1909 { anonymous_use_keyword
: Token.t
value
1910 ; anonymous_use_left_paren
: Token.t
value
1911 ; anonymous_use_variables
: expression listesque
value
1912 ; anonymous_use_right_paren
: Token.t
value
1914 and lambda_expression
=
1915 { lambda_attribute_spec
: attribute_specification
option value
1916 ; lambda_async
: Token.t
option value
1917 ; lambda_signature
: specifier
value
1918 ; lambda_arrow
: Token.t
value
1919 ; lambda_body
: lambda_body
value
1921 and lambda_signature
=
1922 { lambda_left_paren
: Token.t
value
1923 ; lambda_parameters
: parameter listesque
value
1924 ; lambda_right_paren
: Token.t
value
1925 ; lambda_colon
: Token.t
option value
1926 ; lambda_type
: specifier
option value
1928 and cast_expression
=
1929 { cast_left_paren
: Token.t
value
1930 ; cast_type
: Token.t
value
1931 ; cast_right_paren
: Token.t
value
1932 ; cast_operand
: expression
value
1934 and scope_resolution_expression
=
1935 { scope_resolution_qualifier
: expression
value
1936 ; scope_resolution_operator
: Token.t
value
1937 ; scope_resolution_name
: expression
value
1939 and member_selection_expression
=
1940 { member_object
: expression
value
1941 ; member_operator
: Token.t
value
1942 ; member_name
: Token.t
value
1944 and safe_member_selection_expression
=
1945 { safe_member_object
: expression
value
1946 ; safe_member_operator
: Token.t
value
1947 ; safe_member_name
: Token.t
value
1949 and embedded_member_selection_expression
=
1950 { embedded_member_object
: variable_expression
value
1951 ; embedded_member_operator
: Token.t
value
1952 ; embedded_member_name
: Token.t
value
1954 and yield_expression
=
1955 { yield_keyword
: Token.t
value
1956 ; yield_operand
: constructor_expression
value
1958 and prefix_unary_expression
=
1959 { prefix_unary_operator
: Token.t
value
1960 ; prefix_unary_operand
: expression
value
1962 and postfix_unary_expression
=
1963 { postfix_unary_operand
: expression
value
1964 ; postfix_unary_operator
: Token.t
value
1966 and binary_expression
=
1967 { binary_left_operand
: expression
value
1968 ; binary_operator
: Token.t
value
1969 ; binary_right_operand
: expression
value
1972 { is_left_operand
: expression
value
1973 ; is_operator
: Token.t
value
1974 ; is_right_operand
: specifier
value
1977 { as_left_operand
: expression
value
1978 ; as_operator
: Token.t
value
1979 ; as_right_operand
: specifier
value
1981 and nullable_as_expression
=
1982 { nullable_as_left_operand
: expression
value
1983 ; nullable_as_operator
: Token.t
value
1984 ; nullable_as_right_operand
: specifier
value
1986 and conditional_expression
=
1987 { conditional_test
: expression
value
1988 ; conditional_question
: Token.t
value
1989 ; conditional_consequence
: expression
option value
1990 ; conditional_colon
: Token.t
value
1991 ; conditional_alternative
: expression
value
1993 and eval_expression
=
1994 { eval_keyword
: Token.t
value
1995 ; eval_left_paren
: Token.t
value
1996 ; eval_argument
: expression
value
1997 ; eval_right_paren
: Token.t
value
1999 and define_expression
=
2000 { define_keyword
: Token.t
value
2001 ; define_left_paren
: Token.t
value
2002 ; define_argument_list
: expression listesque
value
2003 ; define_right_paren
: Token.t
value
2005 and isset_expression
=
2006 { isset_keyword
: Token.t
value
2007 ; isset_left_paren
: Token.t
value
2008 ; isset_argument_list
: expression listesque
value
2009 ; isset_right_paren
: Token.t
value
2011 and function_call_expression
=
2012 { function_call_receiver
: expression
value
2013 ; function_call_type_args
: type_arguments
option value
2014 ; function_call_left_paren
: Token.t
value
2015 ; function_call_argument_list
: expression listesque
value
2016 ; function_call_right_paren
: Token.t
value
2018 and function_pointer_expression
=
2019 { function_pointer_receiver
: expression
value
2020 ; function_pointer_type_args
: type_arguments
value
2022 and parenthesized_expression
=
2023 { parenthesized_expression_left_paren
: Token.t
value
2024 ; parenthesized_expression_expression
: expression
value
2025 ; parenthesized_expression_right_paren
: Token.t
value
2027 and braced_expression
=
2028 { braced_expression_left_brace
: Token.t
value
2029 ; braced_expression_expression
: expression
value
2030 ; braced_expression_right_brace
: Token.t
value
2032 and embedded_braced_expression
=
2033 { embedded_braced_expression_left_brace
: Token.t
value
2034 ; embedded_braced_expression_expression
: expression
value
2035 ; embedded_braced_expression_right_brace
: Token.t
value
2037 and list_expression
=
2038 { list_keyword
: Token.t
value
2039 ; list_left_paren
: Token.t
value
2040 ; list_members
: (expression
option) listesque
value
2041 ; list_right_paren
: Token.t
value
2043 and collection_literal_expression
=
2044 { collection_literal_name
: specifier
value
2045 ; collection_literal_left_brace
: Token.t
value
2046 ; collection_literal_initializers
: constructor_expression listesque
value
2047 ; collection_literal_right_brace
: Token.t
value
2049 and object_creation_expression
=
2050 { object_creation_new_keyword
: Token.t
value
2051 ; object_creation_object
: object_creation_what
value
2053 and constructor_call
=
2054 { constructor_call_type
: todo_aggregate
value
2055 ; constructor_call_left_paren
: Token.t
option value
2056 ; constructor_call_argument_list
: expression listesque
value
2057 ; constructor_call_right_paren
: Token.t
option value
2059 and record_creation_expression
=
2060 { record_creation_type
: todo_aggregate
value
2061 ; record_creation_left_bracket
: Token.t
value
2062 ; record_creation_members
: element_initializer listesque
value
2063 ; record_creation_right_bracket
: Token.t
value
2065 and array_intrinsic_expression
=
2066 { array_intrinsic_keyword
: Token.t
value
2067 ; array_intrinsic_left_paren
: Token.t
value
2068 ; array_intrinsic_members
: constructor_expression listesque
value
2069 ; array_intrinsic_right_paren
: Token.t
value
2071 and darray_intrinsic_expression
=
2072 { darray_intrinsic_keyword
: Token.t
value
2073 ; darray_intrinsic_explicit_type
: type_arguments
option value
2074 ; darray_intrinsic_left_bracket
: Token.t
value
2075 ; darray_intrinsic_members
: element_initializer listesque
value
2076 ; darray_intrinsic_right_bracket
: Token.t
value
2078 and dictionary_intrinsic_expression
=
2079 { dictionary_intrinsic_keyword
: Token.t
value
2080 ; dictionary_intrinsic_explicit_type
: type_arguments
option value
2081 ; dictionary_intrinsic_left_bracket
: Token.t
value
2082 ; dictionary_intrinsic_members
: element_initializer listesque
value
2083 ; dictionary_intrinsic_right_bracket
: Token.t
value
2085 and keyset_intrinsic_expression
=
2086 { keyset_intrinsic_keyword
: Token.t
value
2087 ; keyset_intrinsic_explicit_type
: type_arguments
option value
2088 ; keyset_intrinsic_left_bracket
: Token.t
value
2089 ; keyset_intrinsic_members
: expression listesque
value
2090 ; keyset_intrinsic_right_bracket
: Token.t
value
2092 and varray_intrinsic_expression
=
2093 { varray_intrinsic_keyword
: Token.t
value
2094 ; varray_intrinsic_explicit_type
: type_arguments
option value
2095 ; varray_intrinsic_left_bracket
: Token.t
value
2096 ; varray_intrinsic_members
: expression listesque
value
2097 ; varray_intrinsic_right_bracket
: Token.t
value
2099 and vector_intrinsic_expression
=
2100 { vector_intrinsic_keyword
: Token.t
value
2101 ; vector_intrinsic_explicit_type
: type_arguments
option value
2102 ; vector_intrinsic_left_bracket
: Token.t
value
2103 ; vector_intrinsic_members
: expression listesque
value
2104 ; vector_intrinsic_right_bracket
: Token.t
value
2106 and element_initializer
=
2107 { element_key
: expression
value
2108 ; element_arrow
: Token.t
value
2109 ; element_value
: expression
value
2111 and subscript_expression
=
2112 { subscript_receiver
: expression
value
2113 ; subscript_left_bracket
: Token.t
value
2114 ; subscript_index
: expression
option value
2115 ; subscript_right_bracket
: Token.t
value
2117 and embedded_subscript_expression
=
2118 { embedded_subscript_receiver
: variable_expression
value
2119 ; embedded_subscript_left_bracket
: Token.t
value
2120 ; embedded_subscript_index
: expression
value
2121 ; embedded_subscript_right_bracket
: Token.t
value
2123 and awaitable_creation_expression
=
2124 { awaitable_attribute_spec
: attribute_specification
option value
2125 ; awaitable_async
: Token.t
value
2126 ; awaitable_compound_statement
: compound_statement
value
2128 and xhp_children_declaration
=
2129 { xhp_children_keyword
: Token.t
value
2130 ; xhp_children_expression
: expression
value
2131 ; xhp_children_semicolon
: Token.t
value
2133 and xhp_children_parenthesized_list
=
2134 { xhp_children_list_left_paren
: Token.t
value
2135 ; xhp_children_list_xhp_children
: expression listesque
value
2136 ; xhp_children_list_right_paren
: Token.t
value
2138 and xhp_category_declaration
=
2139 { xhp_category_keyword
: Token.t
value
2140 ; xhp_category_categories
: Token.t listesque
value
2141 ; xhp_category_semicolon
: Token.t
value
2144 { xhp_enum_optional
: Token.t
option value
2145 ; xhp_enum_keyword
: Token.t
value
2146 ; xhp_enum_left_brace
: Token.t
value
2147 ; xhp_enum_values
: literal_expression listesque
value
2148 ; xhp_enum_right_brace
: Token.t
value
2151 { xhp_lateinit_at
: Token.t
value
2152 ; xhp_lateinit_keyword
: Token.t
value
2155 { xhp_required_at
: Token.t
value
2156 ; xhp_required_keyword
: Token.t
value
2158 and xhp_class_attribute_declaration
=
2159 { xhp_attribute_keyword
: Token.t
value
2160 ; xhp_attribute_attributes
: todo_aggregate listesque
value
2161 ; xhp_attribute_semicolon
: Token.t
value
2163 and xhp_class_attribute
=
2164 { xhp_attribute_decl_type
: specifier
value
2165 ; xhp_attribute_decl_name
: Token.t
value
2166 ; xhp_attribute_decl_initializer
: simple_initializer
option value
2167 ; xhp_attribute_decl_required
: xhp_required
option value
2169 and xhp_simple_class_attribute
=
2170 { xhp_simple_class_attribute_type
: simple_type_specifier
value
2172 and xhp_simple_attribute
=
2173 { xhp_simple_attribute_name
: Token.t
value
2174 ; xhp_simple_attribute_equal
: Token.t
value
2175 ; xhp_simple_attribute_expression
: expression
value
2177 and xhp_spread_attribute
=
2178 { xhp_spread_attribute_left_brace
: Token.t
value
2179 ; xhp_spread_attribute_spread_operator
: Token.t
value
2180 ; xhp_spread_attribute_expression
: expression
value
2181 ; xhp_spread_attribute_right_brace
: Token.t
value
2184 { xhp_open_left_angle
: Token.t
value
2185 ; xhp_open_name
: Token.t
value
2186 ; xhp_open_attributes
: xhp_attribute listesque
value
2187 ; xhp_open_right_angle
: Token.t
value
2189 and xhp_expression
=
2190 { xhp_open
: xhp_open
value
2191 ; xhp_body
: expression listesque
value
2192 ; xhp_close
: xhp_close
option value
2195 { xhp_close_left_angle
: Token.t
value
2196 ; xhp_close_name
: Token.t
value
2197 ; xhp_close_right_angle
: Token.t
value
2200 { type_constant_left_type
: specifier
value
2201 ; type_constant_separator
: Token.t
value
2202 ; type_constant_right_type
: Token.t
value
2205 { pu_access_left_type
: specifier
value
2206 ; pu_access_separator
: Token.t
value
2207 ; pu_access_right_type
: Token.t
value
2209 and vector_type_specifier
=
2210 { vector_type_keyword
: Token.t
value
2211 ; vector_type_left_angle
: Token.t
value
2212 ; vector_type_type
: specifier
value
2213 ; vector_type_trailing_comma
: Token.t
option value
2214 ; vector_type_right_angle
: Token.t
value
2216 and keyset_type_specifier
=
2217 { keyset_type_keyword
: Token.t
value
2218 ; keyset_type_left_angle
: Token.t
value
2219 ; keyset_type_type
: specifier
value
2220 ; keyset_type_trailing_comma
: Token.t
option value
2221 ; keyset_type_right_angle
: Token.t
value
2223 and tuple_type_explicit_specifier
=
2224 { tuple_type_keyword
: Token.t
value
2225 ; tuple_type_left_angle
: Token.t
value
2226 ; tuple_type_types
: simple_type_specifier
value
2227 ; tuple_type_right_angle
: Token.t
value
2229 and varray_type_specifier
=
2230 { varray_keyword
: Token.t
value
2231 ; varray_left_angle
: Token.t
value
2232 ; varray_type
: simple_type_specifier
value
2233 ; varray_trailing_comma
: Token.t
option value
2234 ; varray_right_angle
: Token.t
value
2236 and vector_array_type_specifier
=
2237 { vector_array_keyword
: Token.t
value
2238 ; vector_array_left_angle
: Token.t
value
2239 ; vector_array_type
: specifier
value
2240 ; vector_array_right_angle
: Token.t
value
2242 and type_parameter
=
2243 { type_attribute_spec
: attribute_specification
option value
2244 ; type_reified
: Token.t
option value
2245 ; type_variance
: Token.t
option value
2246 ; type_name
: Token.t
value
2247 ; type_param_params
: type_parameters
option value
2248 ; type_constraints
: type_constraint listesque
value
2250 and type_constraint
=
2251 { constraint_keyword
: Token.t
value
2252 ; constraint_type
: specifier
value
2254 and darray_type_specifier
=
2255 { darray_keyword
: Token.t
value
2256 ; darray_left_angle
: Token.t
value
2257 ; darray_key
: simple_type_specifier
value
2258 ; darray_comma
: Token.t
value
2259 ; darray_value
: simple_type_specifier
value
2260 ; darray_trailing_comma
: Token.t
option value
2261 ; darray_right_angle
: Token.t
value
2263 and map_array_type_specifier
=
2264 { map_array_keyword
: Token.t
value
2265 ; map_array_left_angle
: Token.t
value
2266 ; map_array_key
: specifier
value
2267 ; map_array_comma
: Token.t
value
2268 ; map_array_value
: specifier
value
2269 ; map_array_right_angle
: Token.t
value
2271 and dictionary_type_specifier
=
2272 { dictionary_type_keyword
: Token.t
value
2273 ; dictionary_type_left_angle
: Token.t
value
2274 ; dictionary_type_members
: specifier listesque
value
2275 ; dictionary_type_right_angle
: Token.t
value
2277 and closure_type_specifier
=
2278 { closure_outer_left_paren
: Token.t
value
2279 ; closure_function_keyword
: Token.t
value
2280 ; closure_inner_left_paren
: Token.t
value
2281 ; closure_parameter_list
: closure_parameter_type_specifier listesque
value
2282 ; closure_inner_right_paren
: Token.t
value
2283 ; closure_colon
: Token.t
value
2284 ; closure_return_type
: specifier
value
2285 ; closure_outer_right_paren
: Token.t
value
2287 and closure_parameter_type_specifier
=
2288 { closure_parameter_call_convention
: Token.t
option value
2289 ; closure_parameter_type
: specifier
value
2291 and classname_type_specifier
=
2292 { classname_keyword
: Token.t
value
2293 ; classname_left_angle
: Token.t
value
2294 ; classname_type
: specifier
value
2295 ; classname_trailing_comma
: Token.t
option value
2296 ; classname_right_angle
: Token.t
value
2298 and field_specifier
=
2299 { field_question
: Token.t
option value
2300 ; field_name
: expression
value
2301 ; field_arrow
: Token.t
value
2302 ; field_type
: specifier
value
2304 and field_initializer
=
2305 { field_initializer_name
: expression
value
2306 ; field_initializer_arrow
: Token.t
value
2307 ; field_initializer_value
: expression
value
2309 and shape_type_specifier
=
2310 { shape_type_keyword
: Token.t
value
2311 ; shape_type_left_paren
: Token.t
value
2312 ; shape_type_fields
: field_specifier listesque
value
2313 ; shape_type_ellipsis
: Token.t
option value
2314 ; shape_type_right_paren
: Token.t
value
2316 and shape_expression
=
2317 { shape_expression_keyword
: Token.t
value
2318 ; shape_expression_left_paren
: Token.t
value
2319 ; shape_expression_fields
: field_initializer listesque
value
2320 ; shape_expression_right_paren
: Token.t
value
2322 and tuple_expression
=
2323 { tuple_expression_keyword
: Token.t
value
2324 ; tuple_expression_left_paren
: Token.t
value
2325 ; tuple_expression_items
: expression listesque
value
2326 ; tuple_expression_right_paren
: Token.t
value
2328 and generic_type_specifier
=
2329 { generic_class_type
: Token.t
value
2330 ; generic_argument_list
: type_arguments
value
2332 and nullable_type_specifier
=
2333 { nullable_question
: Token.t
value
2334 ; nullable_type
: specifier
value
2336 and like_type_specifier
=
2337 { like_tilde
: Token.t
value
2338 ; like_type
: specifier
value
2340 and soft_type_specifier
=
2341 { soft_at
: Token.t
value
2342 ; soft_type
: specifier
value
2344 and attributized_specifier
=
2345 { attributized_specifier_attribute_spec
: attribute_specification
option value
2346 ; attributized_specifier_type
: specifier
value
2348 and reified_type_argument
=
2349 { reified_type_argument_reified
: Token.t
value
2350 ; reified_type_argument_type
: specifier
value
2352 and type_arguments
=
2353 { type_arguments_left_angle
: Token.t
value
2354 ; type_arguments_types
: attributized_specifier listesque
value
2355 ; type_arguments_right_angle
: Token.t
value
2357 and type_parameters
=
2358 { type_parameters_left_angle
: Token.t
value
2359 ; type_parameters_parameters
: type_parameter listesque
value
2360 ; type_parameters_right_angle
: Token.t
value
2362 and tuple_type_specifier
=
2363 { tuple_left_paren
: Token.t
value
2364 ; tuple_types
: (specifier
option) listesque
value
2365 ; tuple_right_paren
: Token.t
value
2367 and union_type_specifier
=
2368 { union_left_paren
: Token.t
value
2369 ; union_types
: (specifier
option) listesque
value
2370 ; union_right_paren
: Token.t
value
2372 and intersection_type_specifier
=
2373 { intersection_left_paren
: Token.t
value
2374 ; intersection_types
: (specifier
option) listesque
value
2375 ; intersection_right_paren
: Token.t
value
2377 and pocket_atom_expression
=
2378 { pocket_atom_glyph
: Token.t
value
2379 ; pocket_atom_expression
: Token.t
value
2381 and pocket_identifier_expression
=
2382 { pocket_identifier_qualifier
: expression
value
2383 ; pocket_identifier_pu_operator
: Token.t
value
2384 ; pocket_identifier_field
: expression
value
2385 ; pocket_identifier_operator
: Token.t
value
2386 ; pocket_identifier_name
: expression
value
2388 and pocket_atom_mapping_declaration
=
2389 { pocket_atom_mapping_glyph
: Token.t
value
2390 ; pocket_atom_mapping_name
: expression
value
2391 ; pocket_atom_mapping_left_paren
: Token.t
option value
2392 ; pocket_atom_mapping_mappings
: pumapping_aggregate listesque
value
2393 ; pocket_atom_mapping_right_paren
: Token.t
option value
2394 ; pocket_atom_mapping_semicolon
: Token.t
value
2396 and pocket_enum_declaration
=
2397 { pocket_enum_attributes
: attribute_specification
option value
2398 ; pocket_enum_modifiers
: Token.t listesque
value
2399 ; pocket_enum_enum
: Token.t
value
2400 ; pocket_enum_name
: Token.t
value
2401 ; pocket_enum_left_brace
: Token.t
value
2402 ; pocket_enum_fields
: pufield_aggregate listesque
value
2403 ; pocket_enum_right_brace
: Token.t
value
2405 and pocket_field_type_expr_declaration
=
2406 { pocket_field_type_expr_case
: Token.t
value
2407 ; pocket_field_type_expr_type
: specifier
value
2408 ; pocket_field_type_expr_name
: expression
value
2409 ; pocket_field_type_expr_semicolon
: Token.t
value
2411 and pocket_field_type_declaration
=
2412 { pocket_field_type_case
: Token.t
value
2413 ; pocket_field_type_type
: Token.t
value
2414 ; pocket_field_type_type_parameter
: type_parameter
value
2415 ; pocket_field_type_semicolon
: Token.t
value
2417 and pocket_mapping_id_declaration
=
2418 { pocket_mapping_id_name
: expression
value
2419 ; pocket_mapping_id_initializer
: simple_initializer
value
2421 and pocket_mapping_type_declaration
=
2422 { pocket_mapping_type_keyword
: Token.t
value
2423 ; pocket_mapping_type_name
: expression
value
2424 ; pocket_mapping_type_equal
: Token.t
value
2425 ; pocket_mapping_type_type
: specifier
value