disallow keywords as identifiers
[hiphop-php.git] / hphp / hack / src / parser / full_fidelity_syntax.ml
blob98318f84a2f93ddf069bf61540647acd171cb321
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 * With these factory methods, nodes can be built up from their child nodes. A
19 * factory method must not just know all the children and the kind of node it is
20 * constructing; it also must know how to construct the value that this node is
21 * going to be tagged with. For that reason, an optional functor is provided.
22 * This functor requires that methods be provided to construct the values
23 * associated with a token or with any arbitrary node, given its children. If
24 * this functor is used then the resulting module contains factory methods.
26 * This module also provides some useful helper functions, like an iterator,
27 * a rewriting visitor, and so on.
30 open Core_kernel
31 open Full_fidelity_syntax_type
33 module SyntaxKind = Full_fidelity_syntax_kind
34 module TokenKind = Full_fidelity_token_kind
35 module Operator = Full_fidelity_operator
36 [@@@warning "-27"] (* unused variable *)
38 module WithToken(Token: TokenType) = struct
39 module WithSyntaxValue(SyntaxValue: SyntaxValueType) = struct
41 include MakeSyntaxType(Token)(SyntaxValue)
43 let make syntax value =
44 { syntax; value }
46 let syntax node =
47 node.syntax
49 let value node =
50 node.value
52 let syntax_node_to_list node =
53 match syntax node with
54 | SyntaxList x -> x
55 | Missing -> []
56 | _ -> [node]
58 let to_kind syntax =
59 match syntax with
60 | Missing -> SyntaxKind.Missing
61 | Token t -> SyntaxKind.Token (Token.kind t)
62 | SyntaxList _ -> SyntaxKind.SyntaxList
63 | EndOfFile _ -> SyntaxKind.EndOfFile
64 | Script _ -> SyntaxKind.Script
65 | QualifiedName _ -> SyntaxKind.QualifiedName
66 | SimpleTypeSpecifier _ -> SyntaxKind.SimpleTypeSpecifier
67 | LiteralExpression _ -> SyntaxKind.LiteralExpression
68 | PrefixedStringExpression _ -> SyntaxKind.PrefixedStringExpression
69 | VariableExpression _ -> SyntaxKind.VariableExpression
70 | PipeVariableExpression _ -> SyntaxKind.PipeVariableExpression
71 | EnumDeclaration _ -> SyntaxKind.EnumDeclaration
72 | Enumerator _ -> SyntaxKind.Enumerator
73 | AliasDeclaration _ -> SyntaxKind.AliasDeclaration
74 | PropertyDeclaration _ -> SyntaxKind.PropertyDeclaration
75 | PropertyDeclarator _ -> SyntaxKind.PropertyDeclarator
76 | NamespaceDeclaration _ -> SyntaxKind.NamespaceDeclaration
77 | NamespaceBody _ -> SyntaxKind.NamespaceBody
78 | NamespaceEmptyBody _ -> SyntaxKind.NamespaceEmptyBody
79 | NamespaceUseDeclaration _ -> SyntaxKind.NamespaceUseDeclaration
80 | NamespaceGroupUseDeclaration _ -> SyntaxKind.NamespaceGroupUseDeclaration
81 | NamespaceUseClause _ -> SyntaxKind.NamespaceUseClause
82 | FunctionDeclaration _ -> SyntaxKind.FunctionDeclaration
83 | FunctionDeclarationHeader _ -> SyntaxKind.FunctionDeclarationHeader
84 | WhereClause _ -> SyntaxKind.WhereClause
85 | WhereConstraint _ -> SyntaxKind.WhereConstraint
86 | MethodishDeclaration _ -> SyntaxKind.MethodishDeclaration
87 | ClassishDeclaration _ -> SyntaxKind.ClassishDeclaration
88 | ClassishBody _ -> SyntaxKind.ClassishBody
89 | TraitUsePrecedenceItem _ -> SyntaxKind.TraitUsePrecedenceItem
90 | TraitUseAliasItem _ -> SyntaxKind.TraitUseAliasItem
91 | TraitUseConflictResolution _ -> SyntaxKind.TraitUseConflictResolution
92 | TraitUse _ -> SyntaxKind.TraitUse
93 | RequireClause _ -> SyntaxKind.RequireClause
94 | ConstDeclaration _ -> SyntaxKind.ConstDeclaration
95 | ConstantDeclarator _ -> SyntaxKind.ConstantDeclarator
96 | TypeConstDeclaration _ -> SyntaxKind.TypeConstDeclaration
97 | DecoratedExpression _ -> SyntaxKind.DecoratedExpression
98 | ParameterDeclaration _ -> SyntaxKind.ParameterDeclaration
99 | VariadicParameter _ -> SyntaxKind.VariadicParameter
100 | AttributeSpecification _ -> SyntaxKind.AttributeSpecification
101 | InclusionExpression _ -> SyntaxKind.InclusionExpression
102 | InclusionDirective _ -> SyntaxKind.InclusionDirective
103 | CompoundStatement _ -> SyntaxKind.CompoundStatement
104 | AlternateLoopStatement _ -> SyntaxKind.AlternateLoopStatement
105 | ExpressionStatement _ -> SyntaxKind.ExpressionStatement
106 | MarkupSection _ -> SyntaxKind.MarkupSection
107 | MarkupSuffix _ -> SyntaxKind.MarkupSuffix
108 | UnsetStatement _ -> SyntaxKind.UnsetStatement
109 | LetStatement _ -> SyntaxKind.LetStatement
110 | UsingStatementBlockScoped _ -> SyntaxKind.UsingStatementBlockScoped
111 | UsingStatementFunctionScoped _ -> SyntaxKind.UsingStatementFunctionScoped
112 | DeclareDirectiveStatement _ -> SyntaxKind.DeclareDirectiveStatement
113 | DeclareBlockStatement _ -> SyntaxKind.DeclareBlockStatement
114 | WhileStatement _ -> SyntaxKind.WhileStatement
115 | IfStatement _ -> SyntaxKind.IfStatement
116 | ElseifClause _ -> SyntaxKind.ElseifClause
117 | ElseClause _ -> SyntaxKind.ElseClause
118 | AlternateIfStatement _ -> SyntaxKind.AlternateIfStatement
119 | AlternateElseifClause _ -> SyntaxKind.AlternateElseifClause
120 | AlternateElseClause _ -> SyntaxKind.AlternateElseClause
121 | TryStatement _ -> SyntaxKind.TryStatement
122 | CatchClause _ -> SyntaxKind.CatchClause
123 | FinallyClause _ -> SyntaxKind.FinallyClause
124 | DoStatement _ -> SyntaxKind.DoStatement
125 | ForStatement _ -> SyntaxKind.ForStatement
126 | ForeachStatement _ -> SyntaxKind.ForeachStatement
127 | SwitchStatement _ -> SyntaxKind.SwitchStatement
128 | AlternateSwitchStatement _ -> SyntaxKind.AlternateSwitchStatement
129 | SwitchSection _ -> SyntaxKind.SwitchSection
130 | SwitchFallthrough _ -> SyntaxKind.SwitchFallthrough
131 | CaseLabel _ -> SyntaxKind.CaseLabel
132 | DefaultLabel _ -> SyntaxKind.DefaultLabel
133 | ReturnStatement _ -> SyntaxKind.ReturnStatement
134 | GotoLabel _ -> SyntaxKind.GotoLabel
135 | GotoStatement _ -> SyntaxKind.GotoStatement
136 | ThrowStatement _ -> SyntaxKind.ThrowStatement
137 | BreakStatement _ -> SyntaxKind.BreakStatement
138 | ContinueStatement _ -> SyntaxKind.ContinueStatement
139 | FunctionStaticStatement _ -> SyntaxKind.FunctionStaticStatement
140 | StaticDeclarator _ -> SyntaxKind.StaticDeclarator
141 | EchoStatement _ -> SyntaxKind.EchoStatement
142 | GlobalStatement _ -> SyntaxKind.GlobalStatement
143 | SimpleInitializer _ -> SyntaxKind.SimpleInitializer
144 | AnonymousClass _ -> SyntaxKind.AnonymousClass
145 | AnonymousFunction _ -> SyntaxKind.AnonymousFunction
146 | Php7AnonymousFunction _ -> SyntaxKind.Php7AnonymousFunction
147 | AnonymousFunctionUseClause _ -> SyntaxKind.AnonymousFunctionUseClause
148 | LambdaExpression _ -> SyntaxKind.LambdaExpression
149 | LambdaSignature _ -> SyntaxKind.LambdaSignature
150 | CastExpression _ -> SyntaxKind.CastExpression
151 | ScopeResolutionExpression _ -> SyntaxKind.ScopeResolutionExpression
152 | MemberSelectionExpression _ -> SyntaxKind.MemberSelectionExpression
153 | SafeMemberSelectionExpression _ -> SyntaxKind.SafeMemberSelectionExpression
154 | EmbeddedMemberSelectionExpression _ -> SyntaxKind.EmbeddedMemberSelectionExpression
155 | YieldExpression _ -> SyntaxKind.YieldExpression
156 | YieldFromExpression _ -> SyntaxKind.YieldFromExpression
157 | PrefixUnaryExpression _ -> SyntaxKind.PrefixUnaryExpression
158 | PostfixUnaryExpression _ -> SyntaxKind.PostfixUnaryExpression
159 | BinaryExpression _ -> SyntaxKind.BinaryExpression
160 | InstanceofExpression _ -> SyntaxKind.InstanceofExpression
161 | IsExpression _ -> SyntaxKind.IsExpression
162 | AsExpression _ -> SyntaxKind.AsExpression
163 | NullableAsExpression _ -> SyntaxKind.NullableAsExpression
164 | ConditionalExpression _ -> SyntaxKind.ConditionalExpression
165 | EvalExpression _ -> SyntaxKind.EvalExpression
166 | EmptyExpression _ -> SyntaxKind.EmptyExpression
167 | DefineExpression _ -> SyntaxKind.DefineExpression
168 | HaltCompilerExpression _ -> SyntaxKind.HaltCompilerExpression
169 | IssetExpression _ -> SyntaxKind.IssetExpression
170 | FunctionCallExpression _ -> SyntaxKind.FunctionCallExpression
171 | FunctionCallWithTypeArgumentsExpression _ -> SyntaxKind.FunctionCallWithTypeArgumentsExpression
172 | ParenthesizedExpression _ -> SyntaxKind.ParenthesizedExpression
173 | BracedExpression _ -> SyntaxKind.BracedExpression
174 | EmbeddedBracedExpression _ -> SyntaxKind.EmbeddedBracedExpression
175 | ListExpression _ -> SyntaxKind.ListExpression
176 | CollectionLiteralExpression _ -> SyntaxKind.CollectionLiteralExpression
177 | ObjectCreationExpression _ -> SyntaxKind.ObjectCreationExpression
178 | ConstructorCall _ -> SyntaxKind.ConstructorCall
179 | ArrayCreationExpression _ -> SyntaxKind.ArrayCreationExpression
180 | ArrayIntrinsicExpression _ -> SyntaxKind.ArrayIntrinsicExpression
181 | DarrayIntrinsicExpression _ -> SyntaxKind.DarrayIntrinsicExpression
182 | DictionaryIntrinsicExpression _ -> SyntaxKind.DictionaryIntrinsicExpression
183 | KeysetIntrinsicExpression _ -> SyntaxKind.KeysetIntrinsicExpression
184 | VarrayIntrinsicExpression _ -> SyntaxKind.VarrayIntrinsicExpression
185 | VectorIntrinsicExpression _ -> SyntaxKind.VectorIntrinsicExpression
186 | ElementInitializer _ -> SyntaxKind.ElementInitializer
187 | SubscriptExpression _ -> SyntaxKind.SubscriptExpression
188 | EmbeddedSubscriptExpression _ -> SyntaxKind.EmbeddedSubscriptExpression
189 | AwaitableCreationExpression _ -> SyntaxKind.AwaitableCreationExpression
190 | XHPChildrenDeclaration _ -> SyntaxKind.XHPChildrenDeclaration
191 | XHPChildrenParenthesizedList _ -> SyntaxKind.XHPChildrenParenthesizedList
192 | XHPCategoryDeclaration _ -> SyntaxKind.XHPCategoryDeclaration
193 | XHPEnumType _ -> SyntaxKind.XHPEnumType
194 | XHPRequired _ -> SyntaxKind.XHPRequired
195 | XHPClassAttributeDeclaration _ -> SyntaxKind.XHPClassAttributeDeclaration
196 | XHPClassAttribute _ -> SyntaxKind.XHPClassAttribute
197 | XHPSimpleClassAttribute _ -> SyntaxKind.XHPSimpleClassAttribute
198 | XHPSimpleAttribute _ -> SyntaxKind.XHPSimpleAttribute
199 | XHPSpreadAttribute _ -> SyntaxKind.XHPSpreadAttribute
200 | XHPOpen _ -> SyntaxKind.XHPOpen
201 | XHPExpression _ -> SyntaxKind.XHPExpression
202 | XHPClose _ -> SyntaxKind.XHPClose
203 | TypeConstant _ -> SyntaxKind.TypeConstant
204 | VectorTypeSpecifier _ -> SyntaxKind.VectorTypeSpecifier
205 | KeysetTypeSpecifier _ -> SyntaxKind.KeysetTypeSpecifier
206 | TupleTypeExplicitSpecifier _ -> SyntaxKind.TupleTypeExplicitSpecifier
207 | VarrayTypeSpecifier _ -> SyntaxKind.VarrayTypeSpecifier
208 | VectorArrayTypeSpecifier _ -> SyntaxKind.VectorArrayTypeSpecifier
209 | TypeParameter _ -> SyntaxKind.TypeParameter
210 | TypeConstraint _ -> SyntaxKind.TypeConstraint
211 | DarrayTypeSpecifier _ -> SyntaxKind.DarrayTypeSpecifier
212 | MapArrayTypeSpecifier _ -> SyntaxKind.MapArrayTypeSpecifier
213 | DictionaryTypeSpecifier _ -> SyntaxKind.DictionaryTypeSpecifier
214 | ClosureTypeSpecifier _ -> SyntaxKind.ClosureTypeSpecifier
215 | ClosureParameterTypeSpecifier _ -> SyntaxKind.ClosureParameterTypeSpecifier
216 | ClassnameTypeSpecifier _ -> SyntaxKind.ClassnameTypeSpecifier
217 | FieldSpecifier _ -> SyntaxKind.FieldSpecifier
218 | FieldInitializer _ -> SyntaxKind.FieldInitializer
219 | ShapeTypeSpecifier _ -> SyntaxKind.ShapeTypeSpecifier
220 | ShapeExpression _ -> SyntaxKind.ShapeExpression
221 | TupleExpression _ -> SyntaxKind.TupleExpression
222 | GenericTypeSpecifier _ -> SyntaxKind.GenericTypeSpecifier
223 | NullableTypeSpecifier _ -> SyntaxKind.NullableTypeSpecifier
224 | SoftTypeSpecifier _ -> SyntaxKind.SoftTypeSpecifier
225 | ReifiedTypeArgument _ -> SyntaxKind.ReifiedTypeArgument
226 | TypeArguments _ -> SyntaxKind.TypeArguments
227 | TypeParameters _ -> SyntaxKind.TypeParameters
228 | TupleTypeSpecifier _ -> SyntaxKind.TupleTypeSpecifier
229 | ErrorSyntax _ -> SyntaxKind.ErrorSyntax
230 | ListItem _ -> SyntaxKind.ListItem
233 let kind node =
234 to_kind (syntax node)
236 let has_kind syntax_kind node =
237 kind node = syntax_kind
239 let is_missing node =
240 kind node = SyntaxKind.Missing
242 let is_list node =
243 kind node = SyntaxKind.SyntaxList
245 let is_end_of_file = has_kind SyntaxKind.EndOfFile
246 let is_script = has_kind SyntaxKind.Script
247 let is_qualified_name = has_kind SyntaxKind.QualifiedName
248 let is_simple_type_specifier = has_kind SyntaxKind.SimpleTypeSpecifier
249 let is_literal_expression = has_kind SyntaxKind.LiteralExpression
250 let is_prefixed_string_expression = has_kind SyntaxKind.PrefixedStringExpression
251 let is_variable_expression = has_kind SyntaxKind.VariableExpression
252 let is_pipe_variable_expression = has_kind SyntaxKind.PipeVariableExpression
253 let is_enum_declaration = has_kind SyntaxKind.EnumDeclaration
254 let is_enumerator = has_kind SyntaxKind.Enumerator
255 let is_alias_declaration = has_kind SyntaxKind.AliasDeclaration
256 let is_property_declaration = has_kind SyntaxKind.PropertyDeclaration
257 let is_property_declarator = has_kind SyntaxKind.PropertyDeclarator
258 let is_namespace_declaration = has_kind SyntaxKind.NamespaceDeclaration
259 let is_namespace_body = has_kind SyntaxKind.NamespaceBody
260 let is_namespace_empty_body = has_kind SyntaxKind.NamespaceEmptyBody
261 let is_namespace_use_declaration = has_kind SyntaxKind.NamespaceUseDeclaration
262 let is_namespace_group_use_declaration = has_kind SyntaxKind.NamespaceGroupUseDeclaration
263 let is_namespace_use_clause = has_kind SyntaxKind.NamespaceUseClause
264 let is_function_declaration = has_kind SyntaxKind.FunctionDeclaration
265 let is_function_declaration_header = has_kind SyntaxKind.FunctionDeclarationHeader
266 let is_where_clause = has_kind SyntaxKind.WhereClause
267 let is_where_constraint = has_kind SyntaxKind.WhereConstraint
268 let is_methodish_declaration = has_kind SyntaxKind.MethodishDeclaration
269 let is_classish_declaration = has_kind SyntaxKind.ClassishDeclaration
270 let is_classish_body = has_kind SyntaxKind.ClassishBody
271 let is_trait_use_precedence_item = has_kind SyntaxKind.TraitUsePrecedenceItem
272 let is_trait_use_alias_item = has_kind SyntaxKind.TraitUseAliasItem
273 let is_trait_use_conflict_resolution = has_kind SyntaxKind.TraitUseConflictResolution
274 let is_trait_use = has_kind SyntaxKind.TraitUse
275 let is_require_clause = has_kind SyntaxKind.RequireClause
276 let is_const_declaration = has_kind SyntaxKind.ConstDeclaration
277 let is_constant_declarator = has_kind SyntaxKind.ConstantDeclarator
278 let is_type_const_declaration = has_kind SyntaxKind.TypeConstDeclaration
279 let is_decorated_expression = has_kind SyntaxKind.DecoratedExpression
280 let is_parameter_declaration = has_kind SyntaxKind.ParameterDeclaration
281 let is_variadic_parameter = has_kind SyntaxKind.VariadicParameter
282 let is_attribute_specification = has_kind SyntaxKind.AttributeSpecification
283 let is_inclusion_expression = has_kind SyntaxKind.InclusionExpression
284 let is_inclusion_directive = has_kind SyntaxKind.InclusionDirective
285 let is_compound_statement = has_kind SyntaxKind.CompoundStatement
286 let is_alternate_loop_statement = has_kind SyntaxKind.AlternateLoopStatement
287 let is_expression_statement = has_kind SyntaxKind.ExpressionStatement
288 let is_markup_section = has_kind SyntaxKind.MarkupSection
289 let is_markup_suffix = has_kind SyntaxKind.MarkupSuffix
290 let is_unset_statement = has_kind SyntaxKind.UnsetStatement
291 let is_let_statement = has_kind SyntaxKind.LetStatement
292 let is_using_statement_block_scoped = has_kind SyntaxKind.UsingStatementBlockScoped
293 let is_using_statement_function_scoped = has_kind SyntaxKind.UsingStatementFunctionScoped
294 let is_declare_directive_statement = has_kind SyntaxKind.DeclareDirectiveStatement
295 let is_declare_block_statement = has_kind SyntaxKind.DeclareBlockStatement
296 let is_while_statement = has_kind SyntaxKind.WhileStatement
297 let is_if_statement = has_kind SyntaxKind.IfStatement
298 let is_elseif_clause = has_kind SyntaxKind.ElseifClause
299 let is_else_clause = has_kind SyntaxKind.ElseClause
300 let is_alternate_if_statement = has_kind SyntaxKind.AlternateIfStatement
301 let is_alternate_elseif_clause = has_kind SyntaxKind.AlternateElseifClause
302 let is_alternate_else_clause = has_kind SyntaxKind.AlternateElseClause
303 let is_try_statement = has_kind SyntaxKind.TryStatement
304 let is_catch_clause = has_kind SyntaxKind.CatchClause
305 let is_finally_clause = has_kind SyntaxKind.FinallyClause
306 let is_do_statement = has_kind SyntaxKind.DoStatement
307 let is_for_statement = has_kind SyntaxKind.ForStatement
308 let is_foreach_statement = has_kind SyntaxKind.ForeachStatement
309 let is_switch_statement = has_kind SyntaxKind.SwitchStatement
310 let is_alternate_switch_statement = has_kind SyntaxKind.AlternateSwitchStatement
311 let is_switch_section = has_kind SyntaxKind.SwitchSection
312 let is_switch_fallthrough = has_kind SyntaxKind.SwitchFallthrough
313 let is_case_label = has_kind SyntaxKind.CaseLabel
314 let is_default_label = has_kind SyntaxKind.DefaultLabel
315 let is_return_statement = has_kind SyntaxKind.ReturnStatement
316 let is_goto_label = has_kind SyntaxKind.GotoLabel
317 let is_goto_statement = has_kind SyntaxKind.GotoStatement
318 let is_throw_statement = has_kind SyntaxKind.ThrowStatement
319 let is_break_statement = has_kind SyntaxKind.BreakStatement
320 let is_continue_statement = has_kind SyntaxKind.ContinueStatement
321 let is_function_static_statement = has_kind SyntaxKind.FunctionStaticStatement
322 let is_static_declarator = has_kind SyntaxKind.StaticDeclarator
323 let is_echo_statement = has_kind SyntaxKind.EchoStatement
324 let is_global_statement = has_kind SyntaxKind.GlobalStatement
325 let is_simple_initializer = has_kind SyntaxKind.SimpleInitializer
326 let is_anonymous_class = has_kind SyntaxKind.AnonymousClass
327 let is_anonymous_function = has_kind SyntaxKind.AnonymousFunction
328 let is_php7_anonymous_function = has_kind SyntaxKind.Php7AnonymousFunction
329 let is_anonymous_function_use_clause = has_kind SyntaxKind.AnonymousFunctionUseClause
330 let is_lambda_expression = has_kind SyntaxKind.LambdaExpression
331 let is_lambda_signature = has_kind SyntaxKind.LambdaSignature
332 let is_cast_expression = has_kind SyntaxKind.CastExpression
333 let is_scope_resolution_expression = has_kind SyntaxKind.ScopeResolutionExpression
334 let is_member_selection_expression = has_kind SyntaxKind.MemberSelectionExpression
335 let is_safe_member_selection_expression = has_kind SyntaxKind.SafeMemberSelectionExpression
336 let is_embedded_member_selection_expression = has_kind SyntaxKind.EmbeddedMemberSelectionExpression
337 let is_yield_expression = has_kind SyntaxKind.YieldExpression
338 let is_yield_from_expression = has_kind SyntaxKind.YieldFromExpression
339 let is_prefix_unary_expression = has_kind SyntaxKind.PrefixUnaryExpression
340 let is_postfix_unary_expression = has_kind SyntaxKind.PostfixUnaryExpression
341 let is_binary_expression = has_kind SyntaxKind.BinaryExpression
342 let is_instanceof_expression = has_kind SyntaxKind.InstanceofExpression
343 let is_is_expression = has_kind SyntaxKind.IsExpression
344 let is_as_expression = has_kind SyntaxKind.AsExpression
345 let is_nullable_as_expression = has_kind SyntaxKind.NullableAsExpression
346 let is_conditional_expression = has_kind SyntaxKind.ConditionalExpression
347 let is_eval_expression = has_kind SyntaxKind.EvalExpression
348 let is_empty_expression = has_kind SyntaxKind.EmptyExpression
349 let is_define_expression = has_kind SyntaxKind.DefineExpression
350 let is_halt_compiler_expression = has_kind SyntaxKind.HaltCompilerExpression
351 let is_isset_expression = has_kind SyntaxKind.IssetExpression
352 let is_function_call_expression = has_kind SyntaxKind.FunctionCallExpression
353 let is_function_call_with_type_arguments_expression = has_kind SyntaxKind.FunctionCallWithTypeArgumentsExpression
354 let is_parenthesized_expression = has_kind SyntaxKind.ParenthesizedExpression
355 let is_braced_expression = has_kind SyntaxKind.BracedExpression
356 let is_embedded_braced_expression = has_kind SyntaxKind.EmbeddedBracedExpression
357 let is_list_expression = has_kind SyntaxKind.ListExpression
358 let is_collection_literal_expression = has_kind SyntaxKind.CollectionLiteralExpression
359 let is_object_creation_expression = has_kind SyntaxKind.ObjectCreationExpression
360 let is_constructor_call = has_kind SyntaxKind.ConstructorCall
361 let is_array_creation_expression = has_kind SyntaxKind.ArrayCreationExpression
362 let is_array_intrinsic_expression = has_kind SyntaxKind.ArrayIntrinsicExpression
363 let is_darray_intrinsic_expression = has_kind SyntaxKind.DarrayIntrinsicExpression
364 let is_dictionary_intrinsic_expression = has_kind SyntaxKind.DictionaryIntrinsicExpression
365 let is_keyset_intrinsic_expression = has_kind SyntaxKind.KeysetIntrinsicExpression
366 let is_varray_intrinsic_expression = has_kind SyntaxKind.VarrayIntrinsicExpression
367 let is_vector_intrinsic_expression = has_kind SyntaxKind.VectorIntrinsicExpression
368 let is_element_initializer = has_kind SyntaxKind.ElementInitializer
369 let is_subscript_expression = has_kind SyntaxKind.SubscriptExpression
370 let is_embedded_subscript_expression = has_kind SyntaxKind.EmbeddedSubscriptExpression
371 let is_awaitable_creation_expression = has_kind SyntaxKind.AwaitableCreationExpression
372 let is_xhp_children_declaration = has_kind SyntaxKind.XHPChildrenDeclaration
373 let is_xhp_children_parenthesized_list = has_kind SyntaxKind.XHPChildrenParenthesizedList
374 let is_xhp_category_declaration = has_kind SyntaxKind.XHPCategoryDeclaration
375 let is_xhp_enum_type = has_kind SyntaxKind.XHPEnumType
376 let is_xhp_required = has_kind SyntaxKind.XHPRequired
377 let is_xhp_class_attribute_declaration = has_kind SyntaxKind.XHPClassAttributeDeclaration
378 let is_xhp_class_attribute = has_kind SyntaxKind.XHPClassAttribute
379 let is_xhp_simple_class_attribute = has_kind SyntaxKind.XHPSimpleClassAttribute
380 let is_xhp_simple_attribute = has_kind SyntaxKind.XHPSimpleAttribute
381 let is_xhp_spread_attribute = has_kind SyntaxKind.XHPSpreadAttribute
382 let is_xhp_open = has_kind SyntaxKind.XHPOpen
383 let is_xhp_expression = has_kind SyntaxKind.XHPExpression
384 let is_xhp_close = has_kind SyntaxKind.XHPClose
385 let is_type_constant = has_kind SyntaxKind.TypeConstant
386 let is_vector_type_specifier = has_kind SyntaxKind.VectorTypeSpecifier
387 let is_keyset_type_specifier = has_kind SyntaxKind.KeysetTypeSpecifier
388 let is_tuple_type_explicit_specifier = has_kind SyntaxKind.TupleTypeExplicitSpecifier
389 let is_varray_type_specifier = has_kind SyntaxKind.VarrayTypeSpecifier
390 let is_vector_array_type_specifier = has_kind SyntaxKind.VectorArrayTypeSpecifier
391 let is_type_parameter = has_kind SyntaxKind.TypeParameter
392 let is_type_constraint = has_kind SyntaxKind.TypeConstraint
393 let is_darray_type_specifier = has_kind SyntaxKind.DarrayTypeSpecifier
394 let is_map_array_type_specifier = has_kind SyntaxKind.MapArrayTypeSpecifier
395 let is_dictionary_type_specifier = has_kind SyntaxKind.DictionaryTypeSpecifier
396 let is_closure_type_specifier = has_kind SyntaxKind.ClosureTypeSpecifier
397 let is_closure_parameter_type_specifier = has_kind SyntaxKind.ClosureParameterTypeSpecifier
398 let is_classname_type_specifier = has_kind SyntaxKind.ClassnameTypeSpecifier
399 let is_field_specifier = has_kind SyntaxKind.FieldSpecifier
400 let is_field_initializer = has_kind SyntaxKind.FieldInitializer
401 let is_shape_type_specifier = has_kind SyntaxKind.ShapeTypeSpecifier
402 let is_shape_expression = has_kind SyntaxKind.ShapeExpression
403 let is_tuple_expression = has_kind SyntaxKind.TupleExpression
404 let is_generic_type_specifier = has_kind SyntaxKind.GenericTypeSpecifier
405 let is_nullable_type_specifier = has_kind SyntaxKind.NullableTypeSpecifier
406 let is_soft_type_specifier = has_kind SyntaxKind.SoftTypeSpecifier
407 let is_reified_type_argument = has_kind SyntaxKind.ReifiedTypeArgument
408 let is_type_arguments = has_kind SyntaxKind.TypeArguments
409 let is_type_parameters = has_kind SyntaxKind.TypeParameters
410 let is_tuple_type_specifier = has_kind SyntaxKind.TupleTypeSpecifier
411 let is_error = has_kind SyntaxKind.ErrorSyntax
412 let is_list_item = has_kind SyntaxKind.ListItem
415 let is_loop_statement node =
416 is_for_statement node ||
417 is_foreach_statement node ||
418 is_while_statement node ||
419 is_do_statement node
421 let is_separable_prefix node =
422 match syntax node with
423 | Token t -> begin
424 TokenKind.(match Token.kind t with
425 | PlusPlus | MinusMinus -> false
426 | _ -> true) end
427 | _ -> true
429 let is_specific_token kind node =
430 match syntax node with
431 | Token t -> Token.kind t = kind
432 | _ -> false
434 let is_namespace_prefix node =
435 match syntax node with
436 | QualifiedName e ->
437 begin match List.last (syntax_node_to_list e.qualified_name_parts) with
438 | None -> false
439 | Some p ->
440 begin match syntax p with
441 | ListItem p -> not (is_missing p.list_separator)
442 | _ -> false
445 | _ -> false
447 let has_leading_trivia kind token =
448 List.exists (Token.leading token)
449 ~f:(fun trivia -> Token.Trivia.kind trivia = kind)
451 let is_semicolon = is_specific_token TokenKind.Semicolon
452 let is_name = is_specific_token TokenKind.Name
453 let is_construct = is_specific_token TokenKind.Construct
454 let is_destruct = is_specific_token TokenKind.Destruct
455 let is_static = is_specific_token TokenKind.Static
456 let is_private = is_specific_token TokenKind.Private
457 let is_public = is_specific_token TokenKind.Public
458 let is_protected = is_specific_token TokenKind.Protected
459 let is_abstract = is_specific_token TokenKind.Abstract
460 let is_final = is_specific_token TokenKind.Final
461 let is_async = is_specific_token TokenKind.Async
462 let is_coroutine = is_specific_token TokenKind.Coroutine
463 let is_void = is_specific_token TokenKind.Void
464 let is_left_brace = is_specific_token TokenKind.LeftBrace
465 let is_ellipsis = is_specific_token TokenKind.DotDotDot
466 let is_comma = is_specific_token TokenKind.Comma
467 let is_array = is_specific_token TokenKind.Array
468 let is_var = is_specific_token TokenKind.Var
469 let is_ampersand = is_specific_token TokenKind.Ampersand
470 let is_inout = is_specific_token TokenKind.Inout
472 let fold_over_children f acc syntax =
473 match syntax with
474 | Missing -> acc
475 | Token _ -> acc
476 | SyntaxList items ->
477 List.fold_left ~f ~init:acc items
478 | EndOfFile {
479 end_of_file_token;
480 } ->
481 let acc = f acc end_of_file_token in
483 | Script {
484 script_declarations;
485 } ->
486 let acc = f acc script_declarations in
488 | QualifiedName {
489 qualified_name_parts;
490 } ->
491 let acc = f acc qualified_name_parts in
493 | SimpleTypeSpecifier {
494 simple_type_specifier;
495 } ->
496 let acc = f acc simple_type_specifier in
498 | LiteralExpression {
499 literal_expression;
500 } ->
501 let acc = f acc literal_expression in
503 | PrefixedStringExpression {
504 prefixed_string_name;
505 prefixed_string_str;
506 } ->
507 let acc = f acc prefixed_string_name in
508 let acc = f acc prefixed_string_str in
510 | VariableExpression {
511 variable_expression;
512 } ->
513 let acc = f acc variable_expression in
515 | PipeVariableExpression {
516 pipe_variable_expression;
517 } ->
518 let acc = f acc pipe_variable_expression in
520 | EnumDeclaration {
521 enum_attribute_spec;
522 enum_keyword;
523 enum_name;
524 enum_colon;
525 enum_base;
526 enum_type;
527 enum_left_brace;
528 enum_enumerators;
529 enum_right_brace;
530 } ->
531 let acc = f acc enum_attribute_spec in
532 let acc = f acc enum_keyword in
533 let acc = f acc enum_name in
534 let acc = f acc enum_colon in
535 let acc = f acc enum_base in
536 let acc = f acc enum_type in
537 let acc = f acc enum_left_brace in
538 let acc = f acc enum_enumerators in
539 let acc = f acc enum_right_brace in
541 | Enumerator {
542 enumerator_name;
543 enumerator_equal;
544 enumerator_value;
545 enumerator_semicolon;
546 } ->
547 let acc = f acc enumerator_name in
548 let acc = f acc enumerator_equal in
549 let acc = f acc enumerator_value in
550 let acc = f acc enumerator_semicolon in
552 | AliasDeclaration {
553 alias_attribute_spec;
554 alias_keyword;
555 alias_name;
556 alias_generic_parameter;
557 alias_constraint;
558 alias_equal;
559 alias_type;
560 alias_semicolon;
561 } ->
562 let acc = f acc alias_attribute_spec in
563 let acc = f acc alias_keyword in
564 let acc = f acc alias_name in
565 let acc = f acc alias_generic_parameter in
566 let acc = f acc alias_constraint in
567 let acc = f acc alias_equal in
568 let acc = f acc alias_type in
569 let acc = f acc alias_semicolon in
571 | PropertyDeclaration {
572 property_attribute_spec;
573 property_modifiers;
574 property_type;
575 property_declarators;
576 property_semicolon;
577 } ->
578 let acc = f acc property_attribute_spec in
579 let acc = f acc property_modifiers in
580 let acc = f acc property_type in
581 let acc = f acc property_declarators in
582 let acc = f acc property_semicolon in
584 | PropertyDeclarator {
585 property_name;
586 property_initializer;
587 } ->
588 let acc = f acc property_name in
589 let acc = f acc property_initializer in
591 | NamespaceDeclaration {
592 namespace_keyword;
593 namespace_name;
594 namespace_body;
595 } ->
596 let acc = f acc namespace_keyword in
597 let acc = f acc namespace_name in
598 let acc = f acc namespace_body in
600 | NamespaceBody {
601 namespace_left_brace;
602 namespace_declarations;
603 namespace_right_brace;
604 } ->
605 let acc = f acc namespace_left_brace in
606 let acc = f acc namespace_declarations in
607 let acc = f acc namespace_right_brace in
609 | NamespaceEmptyBody {
610 namespace_semicolon;
611 } ->
612 let acc = f acc namespace_semicolon in
614 | NamespaceUseDeclaration {
615 namespace_use_keyword;
616 namespace_use_kind;
617 namespace_use_clauses;
618 namespace_use_semicolon;
619 } ->
620 let acc = f acc namespace_use_keyword in
621 let acc = f acc namespace_use_kind in
622 let acc = f acc namespace_use_clauses in
623 let acc = f acc namespace_use_semicolon in
625 | NamespaceGroupUseDeclaration {
626 namespace_group_use_keyword;
627 namespace_group_use_kind;
628 namespace_group_use_prefix;
629 namespace_group_use_left_brace;
630 namespace_group_use_clauses;
631 namespace_group_use_right_brace;
632 namespace_group_use_semicolon;
633 } ->
634 let acc = f acc namespace_group_use_keyword in
635 let acc = f acc namespace_group_use_kind in
636 let acc = f acc namespace_group_use_prefix in
637 let acc = f acc namespace_group_use_left_brace in
638 let acc = f acc namespace_group_use_clauses in
639 let acc = f acc namespace_group_use_right_brace in
640 let acc = f acc namespace_group_use_semicolon in
642 | NamespaceUseClause {
643 namespace_use_clause_kind;
644 namespace_use_name;
645 namespace_use_as;
646 namespace_use_alias;
647 } ->
648 let acc = f acc namespace_use_clause_kind in
649 let acc = f acc namespace_use_name in
650 let acc = f acc namespace_use_as in
651 let acc = f acc namespace_use_alias in
653 | FunctionDeclaration {
654 function_attribute_spec;
655 function_declaration_header;
656 function_body;
657 } ->
658 let acc = f acc function_attribute_spec in
659 let acc = f acc function_declaration_header in
660 let acc = f acc function_body in
662 | FunctionDeclarationHeader {
663 function_modifiers;
664 function_keyword;
665 function_ampersand;
666 function_name;
667 function_type_parameter_list;
668 function_left_paren;
669 function_parameter_list;
670 function_right_paren;
671 function_colon;
672 function_type;
673 function_where_clause;
674 } ->
675 let acc = f acc function_modifiers in
676 let acc = f acc function_keyword in
677 let acc = f acc function_ampersand in
678 let acc = f acc function_name in
679 let acc = f acc function_type_parameter_list in
680 let acc = f acc function_left_paren in
681 let acc = f acc function_parameter_list in
682 let acc = f acc function_right_paren in
683 let acc = f acc function_colon in
684 let acc = f acc function_type in
685 let acc = f acc function_where_clause in
687 | WhereClause {
688 where_clause_keyword;
689 where_clause_constraints;
690 } ->
691 let acc = f acc where_clause_keyword in
692 let acc = f acc where_clause_constraints in
694 | WhereConstraint {
695 where_constraint_left_type;
696 where_constraint_operator;
697 where_constraint_right_type;
698 } ->
699 let acc = f acc where_constraint_left_type in
700 let acc = f acc where_constraint_operator in
701 let acc = f acc where_constraint_right_type in
703 | MethodishDeclaration {
704 methodish_attribute;
705 methodish_function_decl_header;
706 methodish_function_body;
707 methodish_semicolon;
708 } ->
709 let acc = f acc methodish_attribute in
710 let acc = f acc methodish_function_decl_header in
711 let acc = f acc methodish_function_body in
712 let acc = f acc methodish_semicolon in
714 | ClassishDeclaration {
715 classish_attribute;
716 classish_modifiers;
717 classish_keyword;
718 classish_name;
719 classish_type_parameters;
720 classish_extends_keyword;
721 classish_extends_list;
722 classish_implements_keyword;
723 classish_implements_list;
724 classish_body;
725 } ->
726 let acc = f acc classish_attribute in
727 let acc = f acc classish_modifiers in
728 let acc = f acc classish_keyword in
729 let acc = f acc classish_name in
730 let acc = f acc classish_type_parameters in
731 let acc = f acc classish_extends_keyword in
732 let acc = f acc classish_extends_list in
733 let acc = f acc classish_implements_keyword in
734 let acc = f acc classish_implements_list in
735 let acc = f acc classish_body in
737 | ClassishBody {
738 classish_body_left_brace;
739 classish_body_elements;
740 classish_body_right_brace;
741 } ->
742 let acc = f acc classish_body_left_brace in
743 let acc = f acc classish_body_elements in
744 let acc = f acc classish_body_right_brace in
746 | TraitUsePrecedenceItem {
747 trait_use_precedence_item_name;
748 trait_use_precedence_item_keyword;
749 trait_use_precedence_item_removed_names;
750 } ->
751 let acc = f acc trait_use_precedence_item_name in
752 let acc = f acc trait_use_precedence_item_keyword in
753 let acc = f acc trait_use_precedence_item_removed_names in
755 | TraitUseAliasItem {
756 trait_use_alias_item_aliasing_name;
757 trait_use_alias_item_keyword;
758 trait_use_alias_item_modifiers;
759 trait_use_alias_item_aliased_name;
760 } ->
761 let acc = f acc trait_use_alias_item_aliasing_name in
762 let acc = f acc trait_use_alias_item_keyword in
763 let acc = f acc trait_use_alias_item_modifiers in
764 let acc = f acc trait_use_alias_item_aliased_name in
766 | TraitUseConflictResolution {
767 trait_use_conflict_resolution_keyword;
768 trait_use_conflict_resolution_names;
769 trait_use_conflict_resolution_left_brace;
770 trait_use_conflict_resolution_clauses;
771 trait_use_conflict_resolution_right_brace;
772 } ->
773 let acc = f acc trait_use_conflict_resolution_keyword in
774 let acc = f acc trait_use_conflict_resolution_names in
775 let acc = f acc trait_use_conflict_resolution_left_brace in
776 let acc = f acc trait_use_conflict_resolution_clauses in
777 let acc = f acc trait_use_conflict_resolution_right_brace in
779 | TraitUse {
780 trait_use_keyword;
781 trait_use_names;
782 trait_use_semicolon;
783 } ->
784 let acc = f acc trait_use_keyword in
785 let acc = f acc trait_use_names in
786 let acc = f acc trait_use_semicolon in
788 | RequireClause {
789 require_keyword;
790 require_kind;
791 require_name;
792 require_semicolon;
793 } ->
794 let acc = f acc require_keyword in
795 let acc = f acc require_kind in
796 let acc = f acc require_name in
797 let acc = f acc require_semicolon in
799 | ConstDeclaration {
800 const_visibility;
801 const_abstract;
802 const_keyword;
803 const_type_specifier;
804 const_declarators;
805 const_semicolon;
806 } ->
807 let acc = f acc const_visibility in
808 let acc = f acc const_abstract in
809 let acc = f acc const_keyword in
810 let acc = f acc const_type_specifier in
811 let acc = f acc const_declarators in
812 let acc = f acc const_semicolon in
814 | ConstantDeclarator {
815 constant_declarator_name;
816 constant_declarator_initializer;
817 } ->
818 let acc = f acc constant_declarator_name in
819 let acc = f acc constant_declarator_initializer in
821 | TypeConstDeclaration {
822 type_const_abstract;
823 type_const_keyword;
824 type_const_type_keyword;
825 type_const_name;
826 type_const_type_parameters;
827 type_const_type_constraint;
828 type_const_equal;
829 type_const_type_specifier;
830 type_const_semicolon;
831 } ->
832 let acc = f acc type_const_abstract in
833 let acc = f acc type_const_keyword in
834 let acc = f acc type_const_type_keyword in
835 let acc = f acc type_const_name in
836 let acc = f acc type_const_type_parameters in
837 let acc = f acc type_const_type_constraint in
838 let acc = f acc type_const_equal in
839 let acc = f acc type_const_type_specifier in
840 let acc = f acc type_const_semicolon in
842 | DecoratedExpression {
843 decorated_expression_decorator;
844 decorated_expression_expression;
845 } ->
846 let acc = f acc decorated_expression_decorator in
847 let acc = f acc decorated_expression_expression in
849 | ParameterDeclaration {
850 parameter_attribute;
851 parameter_visibility;
852 parameter_call_convention;
853 parameter_type;
854 parameter_name;
855 parameter_default_value;
856 } ->
857 let acc = f acc parameter_attribute in
858 let acc = f acc parameter_visibility in
859 let acc = f acc parameter_call_convention in
860 let acc = f acc parameter_type in
861 let acc = f acc parameter_name in
862 let acc = f acc parameter_default_value in
864 | VariadicParameter {
865 variadic_parameter_call_convention;
866 variadic_parameter_type;
867 variadic_parameter_ellipsis;
868 } ->
869 let acc = f acc variadic_parameter_call_convention in
870 let acc = f acc variadic_parameter_type in
871 let acc = f acc variadic_parameter_ellipsis in
873 | AttributeSpecification {
874 attribute_specification_left_double_angle;
875 attribute_specification_attributes;
876 attribute_specification_right_double_angle;
877 } ->
878 let acc = f acc attribute_specification_left_double_angle in
879 let acc = f acc attribute_specification_attributes in
880 let acc = f acc attribute_specification_right_double_angle in
882 | InclusionExpression {
883 inclusion_require;
884 inclusion_filename;
885 } ->
886 let acc = f acc inclusion_require in
887 let acc = f acc inclusion_filename in
889 | InclusionDirective {
890 inclusion_expression;
891 inclusion_semicolon;
892 } ->
893 let acc = f acc inclusion_expression in
894 let acc = f acc inclusion_semicolon in
896 | CompoundStatement {
897 compound_left_brace;
898 compound_statements;
899 compound_right_brace;
900 } ->
901 let acc = f acc compound_left_brace in
902 let acc = f acc compound_statements in
903 let acc = f acc compound_right_brace in
905 | AlternateLoopStatement {
906 alternate_loop_opening_colon;
907 alternate_loop_statements;
908 alternate_loop_closing_keyword;
909 alternate_loop_closing_semicolon;
910 } ->
911 let acc = f acc alternate_loop_opening_colon in
912 let acc = f acc alternate_loop_statements in
913 let acc = f acc alternate_loop_closing_keyword in
914 let acc = f acc alternate_loop_closing_semicolon in
916 | ExpressionStatement {
917 expression_statement_expression;
918 expression_statement_semicolon;
919 } ->
920 let acc = f acc expression_statement_expression in
921 let acc = f acc expression_statement_semicolon in
923 | MarkupSection {
924 markup_prefix;
925 markup_text;
926 markup_suffix;
927 markup_expression;
928 } ->
929 let acc = f acc markup_prefix in
930 let acc = f acc markup_text in
931 let acc = f acc markup_suffix in
932 let acc = f acc markup_expression in
934 | MarkupSuffix {
935 markup_suffix_less_than_question;
936 markup_suffix_name;
937 } ->
938 let acc = f acc markup_suffix_less_than_question in
939 let acc = f acc markup_suffix_name in
941 | UnsetStatement {
942 unset_keyword;
943 unset_left_paren;
944 unset_variables;
945 unset_right_paren;
946 unset_semicolon;
947 } ->
948 let acc = f acc unset_keyword in
949 let acc = f acc unset_left_paren in
950 let acc = f acc unset_variables in
951 let acc = f acc unset_right_paren in
952 let acc = f acc unset_semicolon in
954 | LetStatement {
955 let_statement_keyword;
956 let_statement_name;
957 let_statement_colon;
958 let_statement_type;
959 let_statement_initializer;
960 let_statement_semicolon;
961 } ->
962 let acc = f acc let_statement_keyword in
963 let acc = f acc let_statement_name in
964 let acc = f acc let_statement_colon in
965 let acc = f acc let_statement_type in
966 let acc = f acc let_statement_initializer in
967 let acc = f acc let_statement_semicolon in
969 | UsingStatementBlockScoped {
970 using_block_await_keyword;
971 using_block_using_keyword;
972 using_block_left_paren;
973 using_block_expressions;
974 using_block_right_paren;
975 using_block_body;
976 } ->
977 let acc = f acc using_block_await_keyword in
978 let acc = f acc using_block_using_keyword in
979 let acc = f acc using_block_left_paren in
980 let acc = f acc using_block_expressions in
981 let acc = f acc using_block_right_paren in
982 let acc = f acc using_block_body in
984 | UsingStatementFunctionScoped {
985 using_function_await_keyword;
986 using_function_using_keyword;
987 using_function_expression;
988 using_function_semicolon;
989 } ->
990 let acc = f acc using_function_await_keyword in
991 let acc = f acc using_function_using_keyword in
992 let acc = f acc using_function_expression in
993 let acc = f acc using_function_semicolon in
995 | DeclareDirectiveStatement {
996 declare_directive_keyword;
997 declare_directive_left_paren;
998 declare_directive_expression;
999 declare_directive_right_paren;
1000 declare_directive_semicolon;
1001 } ->
1002 let acc = f acc declare_directive_keyword in
1003 let acc = f acc declare_directive_left_paren in
1004 let acc = f acc declare_directive_expression in
1005 let acc = f acc declare_directive_right_paren in
1006 let acc = f acc declare_directive_semicolon in
1008 | DeclareBlockStatement {
1009 declare_block_keyword;
1010 declare_block_left_paren;
1011 declare_block_expression;
1012 declare_block_right_paren;
1013 declare_block_body;
1014 } ->
1015 let acc = f acc declare_block_keyword in
1016 let acc = f acc declare_block_left_paren in
1017 let acc = f acc declare_block_expression in
1018 let acc = f acc declare_block_right_paren in
1019 let acc = f acc declare_block_body in
1021 | WhileStatement {
1022 while_keyword;
1023 while_left_paren;
1024 while_condition;
1025 while_right_paren;
1026 while_body;
1027 } ->
1028 let acc = f acc while_keyword in
1029 let acc = f acc while_left_paren in
1030 let acc = f acc while_condition in
1031 let acc = f acc while_right_paren in
1032 let acc = f acc while_body in
1034 | IfStatement {
1035 if_keyword;
1036 if_left_paren;
1037 if_condition;
1038 if_right_paren;
1039 if_statement;
1040 if_elseif_clauses;
1041 if_else_clause;
1042 } ->
1043 let acc = f acc if_keyword in
1044 let acc = f acc if_left_paren in
1045 let acc = f acc if_condition in
1046 let acc = f acc if_right_paren in
1047 let acc = f acc if_statement in
1048 let acc = f acc if_elseif_clauses in
1049 let acc = f acc if_else_clause in
1051 | ElseifClause {
1052 elseif_keyword;
1053 elseif_left_paren;
1054 elseif_condition;
1055 elseif_right_paren;
1056 elseif_statement;
1057 } ->
1058 let acc = f acc elseif_keyword in
1059 let acc = f acc elseif_left_paren in
1060 let acc = f acc elseif_condition in
1061 let acc = f acc elseif_right_paren in
1062 let acc = f acc elseif_statement in
1064 | ElseClause {
1065 else_keyword;
1066 else_statement;
1067 } ->
1068 let acc = f acc else_keyword in
1069 let acc = f acc else_statement in
1071 | AlternateIfStatement {
1072 alternate_if_keyword;
1073 alternate_if_left_paren;
1074 alternate_if_condition;
1075 alternate_if_right_paren;
1076 alternate_if_colon;
1077 alternate_if_statement;
1078 alternate_if_elseif_clauses;
1079 alternate_if_else_clause;
1080 alternate_if_endif_keyword;
1081 alternate_if_semicolon;
1082 } ->
1083 let acc = f acc alternate_if_keyword in
1084 let acc = f acc alternate_if_left_paren in
1085 let acc = f acc alternate_if_condition in
1086 let acc = f acc alternate_if_right_paren in
1087 let acc = f acc alternate_if_colon in
1088 let acc = f acc alternate_if_statement in
1089 let acc = f acc alternate_if_elseif_clauses in
1090 let acc = f acc alternate_if_else_clause in
1091 let acc = f acc alternate_if_endif_keyword in
1092 let acc = f acc alternate_if_semicolon in
1094 | AlternateElseifClause {
1095 alternate_elseif_keyword;
1096 alternate_elseif_left_paren;
1097 alternate_elseif_condition;
1098 alternate_elseif_right_paren;
1099 alternate_elseif_colon;
1100 alternate_elseif_statement;
1101 } ->
1102 let acc = f acc alternate_elseif_keyword in
1103 let acc = f acc alternate_elseif_left_paren in
1104 let acc = f acc alternate_elseif_condition in
1105 let acc = f acc alternate_elseif_right_paren in
1106 let acc = f acc alternate_elseif_colon in
1107 let acc = f acc alternate_elseif_statement in
1109 | AlternateElseClause {
1110 alternate_else_keyword;
1111 alternate_else_colon;
1112 alternate_else_statement;
1113 } ->
1114 let acc = f acc alternate_else_keyword in
1115 let acc = f acc alternate_else_colon in
1116 let acc = f acc alternate_else_statement in
1118 | TryStatement {
1119 try_keyword;
1120 try_compound_statement;
1121 try_catch_clauses;
1122 try_finally_clause;
1123 } ->
1124 let acc = f acc try_keyword in
1125 let acc = f acc try_compound_statement in
1126 let acc = f acc try_catch_clauses in
1127 let acc = f acc try_finally_clause in
1129 | CatchClause {
1130 catch_keyword;
1131 catch_left_paren;
1132 catch_type;
1133 catch_variable;
1134 catch_right_paren;
1135 catch_body;
1136 } ->
1137 let acc = f acc catch_keyword in
1138 let acc = f acc catch_left_paren in
1139 let acc = f acc catch_type in
1140 let acc = f acc catch_variable in
1141 let acc = f acc catch_right_paren in
1142 let acc = f acc catch_body in
1144 | FinallyClause {
1145 finally_keyword;
1146 finally_body;
1147 } ->
1148 let acc = f acc finally_keyword in
1149 let acc = f acc finally_body in
1151 | DoStatement {
1152 do_keyword;
1153 do_body;
1154 do_while_keyword;
1155 do_left_paren;
1156 do_condition;
1157 do_right_paren;
1158 do_semicolon;
1159 } ->
1160 let acc = f acc do_keyword in
1161 let acc = f acc do_body in
1162 let acc = f acc do_while_keyword in
1163 let acc = f acc do_left_paren in
1164 let acc = f acc do_condition in
1165 let acc = f acc do_right_paren in
1166 let acc = f acc do_semicolon in
1168 | ForStatement {
1169 for_keyword;
1170 for_left_paren;
1171 for_initializer;
1172 for_first_semicolon;
1173 for_control;
1174 for_second_semicolon;
1175 for_end_of_loop;
1176 for_right_paren;
1177 for_body;
1178 } ->
1179 let acc = f acc for_keyword in
1180 let acc = f acc for_left_paren in
1181 let acc = f acc for_initializer in
1182 let acc = f acc for_first_semicolon in
1183 let acc = f acc for_control in
1184 let acc = f acc for_second_semicolon in
1185 let acc = f acc for_end_of_loop in
1186 let acc = f acc for_right_paren in
1187 let acc = f acc for_body in
1189 | ForeachStatement {
1190 foreach_keyword;
1191 foreach_left_paren;
1192 foreach_collection;
1193 foreach_await_keyword;
1194 foreach_as;
1195 foreach_key;
1196 foreach_arrow;
1197 foreach_value;
1198 foreach_right_paren;
1199 foreach_body;
1200 } ->
1201 let acc = f acc foreach_keyword in
1202 let acc = f acc foreach_left_paren in
1203 let acc = f acc foreach_collection in
1204 let acc = f acc foreach_await_keyword in
1205 let acc = f acc foreach_as in
1206 let acc = f acc foreach_key in
1207 let acc = f acc foreach_arrow in
1208 let acc = f acc foreach_value in
1209 let acc = f acc foreach_right_paren in
1210 let acc = f acc foreach_body in
1212 | SwitchStatement {
1213 switch_keyword;
1214 switch_left_paren;
1215 switch_expression;
1216 switch_right_paren;
1217 switch_left_brace;
1218 switch_sections;
1219 switch_right_brace;
1220 } ->
1221 let acc = f acc switch_keyword in
1222 let acc = f acc switch_left_paren in
1223 let acc = f acc switch_expression in
1224 let acc = f acc switch_right_paren in
1225 let acc = f acc switch_left_brace in
1226 let acc = f acc switch_sections in
1227 let acc = f acc switch_right_brace in
1229 | AlternateSwitchStatement {
1230 alternate_switch_keyword;
1231 alternate_switch_left_paren;
1232 alternate_switch_expression;
1233 alternate_switch_right_paren;
1234 alternate_switch_opening_colon;
1235 alternate_switch_sections;
1236 alternate_switch_closing_endswitch;
1237 alternate_switch_closing_semicolon;
1238 } ->
1239 let acc = f acc alternate_switch_keyword in
1240 let acc = f acc alternate_switch_left_paren in
1241 let acc = f acc alternate_switch_expression in
1242 let acc = f acc alternate_switch_right_paren in
1243 let acc = f acc alternate_switch_opening_colon in
1244 let acc = f acc alternate_switch_sections in
1245 let acc = f acc alternate_switch_closing_endswitch in
1246 let acc = f acc alternate_switch_closing_semicolon in
1248 | SwitchSection {
1249 switch_section_labels;
1250 switch_section_statements;
1251 switch_section_fallthrough;
1252 } ->
1253 let acc = f acc switch_section_labels in
1254 let acc = f acc switch_section_statements in
1255 let acc = f acc switch_section_fallthrough in
1257 | SwitchFallthrough {
1258 fallthrough_keyword;
1259 fallthrough_semicolon;
1260 } ->
1261 let acc = f acc fallthrough_keyword in
1262 let acc = f acc fallthrough_semicolon in
1264 | CaseLabel {
1265 case_keyword;
1266 case_expression;
1267 case_colon;
1268 } ->
1269 let acc = f acc case_keyword in
1270 let acc = f acc case_expression in
1271 let acc = f acc case_colon in
1273 | DefaultLabel {
1274 default_keyword;
1275 default_colon;
1276 } ->
1277 let acc = f acc default_keyword in
1278 let acc = f acc default_colon in
1280 | ReturnStatement {
1281 return_keyword;
1282 return_expression;
1283 return_semicolon;
1284 } ->
1285 let acc = f acc return_keyword in
1286 let acc = f acc return_expression in
1287 let acc = f acc return_semicolon in
1289 | GotoLabel {
1290 goto_label_name;
1291 goto_label_colon;
1292 } ->
1293 let acc = f acc goto_label_name in
1294 let acc = f acc goto_label_colon in
1296 | GotoStatement {
1297 goto_statement_keyword;
1298 goto_statement_label_name;
1299 goto_statement_semicolon;
1300 } ->
1301 let acc = f acc goto_statement_keyword in
1302 let acc = f acc goto_statement_label_name in
1303 let acc = f acc goto_statement_semicolon in
1305 | ThrowStatement {
1306 throw_keyword;
1307 throw_expression;
1308 throw_semicolon;
1309 } ->
1310 let acc = f acc throw_keyword in
1311 let acc = f acc throw_expression in
1312 let acc = f acc throw_semicolon in
1314 | BreakStatement {
1315 break_keyword;
1316 break_level;
1317 break_semicolon;
1318 } ->
1319 let acc = f acc break_keyword in
1320 let acc = f acc break_level in
1321 let acc = f acc break_semicolon in
1323 | ContinueStatement {
1324 continue_keyword;
1325 continue_level;
1326 continue_semicolon;
1327 } ->
1328 let acc = f acc continue_keyword in
1329 let acc = f acc continue_level in
1330 let acc = f acc continue_semicolon in
1332 | FunctionStaticStatement {
1333 static_static_keyword;
1334 static_declarations;
1335 static_semicolon;
1336 } ->
1337 let acc = f acc static_static_keyword in
1338 let acc = f acc static_declarations in
1339 let acc = f acc static_semicolon in
1341 | StaticDeclarator {
1342 static_name;
1343 static_initializer;
1344 } ->
1345 let acc = f acc static_name in
1346 let acc = f acc static_initializer in
1348 | EchoStatement {
1349 echo_keyword;
1350 echo_expressions;
1351 echo_semicolon;
1352 } ->
1353 let acc = f acc echo_keyword in
1354 let acc = f acc echo_expressions in
1355 let acc = f acc echo_semicolon in
1357 | GlobalStatement {
1358 global_keyword;
1359 global_variables;
1360 global_semicolon;
1361 } ->
1362 let acc = f acc global_keyword in
1363 let acc = f acc global_variables in
1364 let acc = f acc global_semicolon in
1366 | SimpleInitializer {
1367 simple_initializer_equal;
1368 simple_initializer_value;
1369 } ->
1370 let acc = f acc simple_initializer_equal in
1371 let acc = f acc simple_initializer_value in
1373 | AnonymousClass {
1374 anonymous_class_class_keyword;
1375 anonymous_class_left_paren;
1376 anonymous_class_argument_list;
1377 anonymous_class_right_paren;
1378 anonymous_class_extends_keyword;
1379 anonymous_class_extends_list;
1380 anonymous_class_implements_keyword;
1381 anonymous_class_implements_list;
1382 anonymous_class_body;
1383 } ->
1384 let acc = f acc anonymous_class_class_keyword in
1385 let acc = f acc anonymous_class_left_paren in
1386 let acc = f acc anonymous_class_argument_list in
1387 let acc = f acc anonymous_class_right_paren in
1388 let acc = f acc anonymous_class_extends_keyword in
1389 let acc = f acc anonymous_class_extends_list in
1390 let acc = f acc anonymous_class_implements_keyword in
1391 let acc = f acc anonymous_class_implements_list in
1392 let acc = f acc anonymous_class_body in
1394 | AnonymousFunction {
1395 anonymous_attribute_spec;
1396 anonymous_static_keyword;
1397 anonymous_async_keyword;
1398 anonymous_coroutine_keyword;
1399 anonymous_function_keyword;
1400 anonymous_ampersand;
1401 anonymous_left_paren;
1402 anonymous_parameters;
1403 anonymous_right_paren;
1404 anonymous_colon;
1405 anonymous_type;
1406 anonymous_use;
1407 anonymous_body;
1408 } ->
1409 let acc = f acc anonymous_attribute_spec in
1410 let acc = f acc anonymous_static_keyword in
1411 let acc = f acc anonymous_async_keyword in
1412 let acc = f acc anonymous_coroutine_keyword in
1413 let acc = f acc anonymous_function_keyword in
1414 let acc = f acc anonymous_ampersand in
1415 let acc = f acc anonymous_left_paren in
1416 let acc = f acc anonymous_parameters in
1417 let acc = f acc anonymous_right_paren in
1418 let acc = f acc anonymous_colon in
1419 let acc = f acc anonymous_type in
1420 let acc = f acc anonymous_use in
1421 let acc = f acc anonymous_body in
1423 | Php7AnonymousFunction {
1424 php7_anonymous_attribute_spec;
1425 php7_anonymous_static_keyword;
1426 php7_anonymous_async_keyword;
1427 php7_anonymous_coroutine_keyword;
1428 php7_anonymous_function_keyword;
1429 php7_anonymous_ampersand;
1430 php7_anonymous_left_paren;
1431 php7_anonymous_parameters;
1432 php7_anonymous_right_paren;
1433 php7_anonymous_use;
1434 php7_anonymous_colon;
1435 php7_anonymous_type;
1436 php7_anonymous_body;
1437 } ->
1438 let acc = f acc php7_anonymous_attribute_spec in
1439 let acc = f acc php7_anonymous_static_keyword in
1440 let acc = f acc php7_anonymous_async_keyword in
1441 let acc = f acc php7_anonymous_coroutine_keyword in
1442 let acc = f acc php7_anonymous_function_keyword in
1443 let acc = f acc php7_anonymous_ampersand in
1444 let acc = f acc php7_anonymous_left_paren in
1445 let acc = f acc php7_anonymous_parameters in
1446 let acc = f acc php7_anonymous_right_paren in
1447 let acc = f acc php7_anonymous_use in
1448 let acc = f acc php7_anonymous_colon in
1449 let acc = f acc php7_anonymous_type in
1450 let acc = f acc php7_anonymous_body in
1452 | AnonymousFunctionUseClause {
1453 anonymous_use_keyword;
1454 anonymous_use_left_paren;
1455 anonymous_use_variables;
1456 anonymous_use_right_paren;
1457 } ->
1458 let acc = f acc anonymous_use_keyword in
1459 let acc = f acc anonymous_use_left_paren in
1460 let acc = f acc anonymous_use_variables in
1461 let acc = f acc anonymous_use_right_paren in
1463 | LambdaExpression {
1464 lambda_attribute_spec;
1465 lambda_async;
1466 lambda_coroutine;
1467 lambda_signature;
1468 lambda_arrow;
1469 lambda_body;
1470 } ->
1471 let acc = f acc lambda_attribute_spec in
1472 let acc = f acc lambda_async in
1473 let acc = f acc lambda_coroutine in
1474 let acc = f acc lambda_signature in
1475 let acc = f acc lambda_arrow in
1476 let acc = f acc lambda_body in
1478 | LambdaSignature {
1479 lambda_left_paren;
1480 lambda_parameters;
1481 lambda_right_paren;
1482 lambda_colon;
1483 lambda_type;
1484 } ->
1485 let acc = f acc lambda_left_paren in
1486 let acc = f acc lambda_parameters in
1487 let acc = f acc lambda_right_paren in
1488 let acc = f acc lambda_colon in
1489 let acc = f acc lambda_type in
1491 | CastExpression {
1492 cast_left_paren;
1493 cast_type;
1494 cast_right_paren;
1495 cast_operand;
1496 } ->
1497 let acc = f acc cast_left_paren in
1498 let acc = f acc cast_type in
1499 let acc = f acc cast_right_paren in
1500 let acc = f acc cast_operand in
1502 | ScopeResolutionExpression {
1503 scope_resolution_qualifier;
1504 scope_resolution_operator;
1505 scope_resolution_name;
1506 } ->
1507 let acc = f acc scope_resolution_qualifier in
1508 let acc = f acc scope_resolution_operator in
1509 let acc = f acc scope_resolution_name in
1511 | MemberSelectionExpression {
1512 member_object;
1513 member_operator;
1514 member_name;
1515 } ->
1516 let acc = f acc member_object in
1517 let acc = f acc member_operator in
1518 let acc = f acc member_name in
1520 | SafeMemberSelectionExpression {
1521 safe_member_object;
1522 safe_member_operator;
1523 safe_member_name;
1524 } ->
1525 let acc = f acc safe_member_object in
1526 let acc = f acc safe_member_operator in
1527 let acc = f acc safe_member_name in
1529 | EmbeddedMemberSelectionExpression {
1530 embedded_member_object;
1531 embedded_member_operator;
1532 embedded_member_name;
1533 } ->
1534 let acc = f acc embedded_member_object in
1535 let acc = f acc embedded_member_operator in
1536 let acc = f acc embedded_member_name in
1538 | YieldExpression {
1539 yield_keyword;
1540 yield_operand;
1541 } ->
1542 let acc = f acc yield_keyword in
1543 let acc = f acc yield_operand in
1545 | YieldFromExpression {
1546 yield_from_yield_keyword;
1547 yield_from_from_keyword;
1548 yield_from_operand;
1549 } ->
1550 let acc = f acc yield_from_yield_keyword in
1551 let acc = f acc yield_from_from_keyword in
1552 let acc = f acc yield_from_operand in
1554 | PrefixUnaryExpression {
1555 prefix_unary_operator;
1556 prefix_unary_operand;
1557 } ->
1558 let acc = f acc prefix_unary_operator in
1559 let acc = f acc prefix_unary_operand in
1561 | PostfixUnaryExpression {
1562 postfix_unary_operand;
1563 postfix_unary_operator;
1564 } ->
1565 let acc = f acc postfix_unary_operand in
1566 let acc = f acc postfix_unary_operator in
1568 | BinaryExpression {
1569 binary_left_operand;
1570 binary_operator;
1571 binary_right_operand;
1572 } ->
1573 let acc = f acc binary_left_operand in
1574 let acc = f acc binary_operator in
1575 let acc = f acc binary_right_operand in
1577 | InstanceofExpression {
1578 instanceof_left_operand;
1579 instanceof_operator;
1580 instanceof_right_operand;
1581 } ->
1582 let acc = f acc instanceof_left_operand in
1583 let acc = f acc instanceof_operator in
1584 let acc = f acc instanceof_right_operand in
1586 | IsExpression {
1587 is_left_operand;
1588 is_operator;
1589 is_right_operand;
1590 } ->
1591 let acc = f acc is_left_operand in
1592 let acc = f acc is_operator in
1593 let acc = f acc is_right_operand in
1595 | AsExpression {
1596 as_left_operand;
1597 as_operator;
1598 as_right_operand;
1599 } ->
1600 let acc = f acc as_left_operand in
1601 let acc = f acc as_operator in
1602 let acc = f acc as_right_operand in
1604 | NullableAsExpression {
1605 nullable_as_left_operand;
1606 nullable_as_operator;
1607 nullable_as_right_operand;
1608 } ->
1609 let acc = f acc nullable_as_left_operand in
1610 let acc = f acc nullable_as_operator in
1611 let acc = f acc nullable_as_right_operand in
1613 | ConditionalExpression {
1614 conditional_test;
1615 conditional_question;
1616 conditional_consequence;
1617 conditional_colon;
1618 conditional_alternative;
1619 } ->
1620 let acc = f acc conditional_test in
1621 let acc = f acc conditional_question in
1622 let acc = f acc conditional_consequence in
1623 let acc = f acc conditional_colon in
1624 let acc = f acc conditional_alternative in
1626 | EvalExpression {
1627 eval_keyword;
1628 eval_left_paren;
1629 eval_argument;
1630 eval_right_paren;
1631 } ->
1632 let acc = f acc eval_keyword in
1633 let acc = f acc eval_left_paren in
1634 let acc = f acc eval_argument in
1635 let acc = f acc eval_right_paren in
1637 | EmptyExpression {
1638 empty_keyword;
1639 empty_left_paren;
1640 empty_argument;
1641 empty_right_paren;
1642 } ->
1643 let acc = f acc empty_keyword in
1644 let acc = f acc empty_left_paren in
1645 let acc = f acc empty_argument in
1646 let acc = f acc empty_right_paren in
1648 | DefineExpression {
1649 define_keyword;
1650 define_left_paren;
1651 define_argument_list;
1652 define_right_paren;
1653 } ->
1654 let acc = f acc define_keyword in
1655 let acc = f acc define_left_paren in
1656 let acc = f acc define_argument_list in
1657 let acc = f acc define_right_paren in
1659 | HaltCompilerExpression {
1660 halt_compiler_keyword;
1661 halt_compiler_left_paren;
1662 halt_compiler_argument_list;
1663 halt_compiler_right_paren;
1664 } ->
1665 let acc = f acc halt_compiler_keyword in
1666 let acc = f acc halt_compiler_left_paren in
1667 let acc = f acc halt_compiler_argument_list in
1668 let acc = f acc halt_compiler_right_paren in
1670 | IssetExpression {
1671 isset_keyword;
1672 isset_left_paren;
1673 isset_argument_list;
1674 isset_right_paren;
1675 } ->
1676 let acc = f acc isset_keyword in
1677 let acc = f acc isset_left_paren in
1678 let acc = f acc isset_argument_list in
1679 let acc = f acc isset_right_paren in
1681 | FunctionCallExpression {
1682 function_call_receiver;
1683 function_call_left_paren;
1684 function_call_argument_list;
1685 function_call_right_paren;
1686 } ->
1687 let acc = f acc function_call_receiver in
1688 let acc = f acc function_call_left_paren in
1689 let acc = f acc function_call_argument_list in
1690 let acc = f acc function_call_right_paren in
1692 | FunctionCallWithTypeArgumentsExpression {
1693 function_call_with_type_arguments_receiver;
1694 function_call_with_type_arguments_type_args;
1695 function_call_with_type_arguments_left_paren;
1696 function_call_with_type_arguments_argument_list;
1697 function_call_with_type_arguments_right_paren;
1698 } ->
1699 let acc = f acc function_call_with_type_arguments_receiver in
1700 let acc = f acc function_call_with_type_arguments_type_args in
1701 let acc = f acc function_call_with_type_arguments_left_paren in
1702 let acc = f acc function_call_with_type_arguments_argument_list in
1703 let acc = f acc function_call_with_type_arguments_right_paren in
1705 | ParenthesizedExpression {
1706 parenthesized_expression_left_paren;
1707 parenthesized_expression_expression;
1708 parenthesized_expression_right_paren;
1709 } ->
1710 let acc = f acc parenthesized_expression_left_paren in
1711 let acc = f acc parenthesized_expression_expression in
1712 let acc = f acc parenthesized_expression_right_paren in
1714 | BracedExpression {
1715 braced_expression_left_brace;
1716 braced_expression_expression;
1717 braced_expression_right_brace;
1718 } ->
1719 let acc = f acc braced_expression_left_brace in
1720 let acc = f acc braced_expression_expression in
1721 let acc = f acc braced_expression_right_brace in
1723 | EmbeddedBracedExpression {
1724 embedded_braced_expression_left_brace;
1725 embedded_braced_expression_expression;
1726 embedded_braced_expression_right_brace;
1727 } ->
1728 let acc = f acc embedded_braced_expression_left_brace in
1729 let acc = f acc embedded_braced_expression_expression in
1730 let acc = f acc embedded_braced_expression_right_brace in
1732 | ListExpression {
1733 list_keyword;
1734 list_left_paren;
1735 list_members;
1736 list_right_paren;
1737 } ->
1738 let acc = f acc list_keyword in
1739 let acc = f acc list_left_paren in
1740 let acc = f acc list_members in
1741 let acc = f acc list_right_paren in
1743 | CollectionLiteralExpression {
1744 collection_literal_name;
1745 collection_literal_left_brace;
1746 collection_literal_initializers;
1747 collection_literal_right_brace;
1748 } ->
1749 let acc = f acc collection_literal_name in
1750 let acc = f acc collection_literal_left_brace in
1751 let acc = f acc collection_literal_initializers in
1752 let acc = f acc collection_literal_right_brace in
1754 | ObjectCreationExpression {
1755 object_creation_new_keyword;
1756 object_creation_object;
1757 } ->
1758 let acc = f acc object_creation_new_keyword in
1759 let acc = f acc object_creation_object in
1761 | ConstructorCall {
1762 constructor_call_type;
1763 constructor_call_left_paren;
1764 constructor_call_argument_list;
1765 constructor_call_right_paren;
1766 } ->
1767 let acc = f acc constructor_call_type in
1768 let acc = f acc constructor_call_left_paren in
1769 let acc = f acc constructor_call_argument_list in
1770 let acc = f acc constructor_call_right_paren in
1772 | ArrayCreationExpression {
1773 array_creation_left_bracket;
1774 array_creation_members;
1775 array_creation_right_bracket;
1776 } ->
1777 let acc = f acc array_creation_left_bracket in
1778 let acc = f acc array_creation_members in
1779 let acc = f acc array_creation_right_bracket in
1781 | ArrayIntrinsicExpression {
1782 array_intrinsic_keyword;
1783 array_intrinsic_left_paren;
1784 array_intrinsic_members;
1785 array_intrinsic_right_paren;
1786 } ->
1787 let acc = f acc array_intrinsic_keyword in
1788 let acc = f acc array_intrinsic_left_paren in
1789 let acc = f acc array_intrinsic_members in
1790 let acc = f acc array_intrinsic_right_paren in
1792 | DarrayIntrinsicExpression {
1793 darray_intrinsic_keyword;
1794 darray_intrinsic_explicit_type;
1795 darray_intrinsic_left_bracket;
1796 darray_intrinsic_members;
1797 darray_intrinsic_right_bracket;
1798 } ->
1799 let acc = f acc darray_intrinsic_keyword in
1800 let acc = f acc darray_intrinsic_explicit_type in
1801 let acc = f acc darray_intrinsic_left_bracket in
1802 let acc = f acc darray_intrinsic_members in
1803 let acc = f acc darray_intrinsic_right_bracket in
1805 | DictionaryIntrinsicExpression {
1806 dictionary_intrinsic_keyword;
1807 dictionary_intrinsic_explicit_type;
1808 dictionary_intrinsic_left_bracket;
1809 dictionary_intrinsic_members;
1810 dictionary_intrinsic_right_bracket;
1811 } ->
1812 let acc = f acc dictionary_intrinsic_keyword in
1813 let acc = f acc dictionary_intrinsic_explicit_type in
1814 let acc = f acc dictionary_intrinsic_left_bracket in
1815 let acc = f acc dictionary_intrinsic_members in
1816 let acc = f acc dictionary_intrinsic_right_bracket in
1818 | KeysetIntrinsicExpression {
1819 keyset_intrinsic_keyword;
1820 keyset_intrinsic_explicit_type;
1821 keyset_intrinsic_left_bracket;
1822 keyset_intrinsic_members;
1823 keyset_intrinsic_right_bracket;
1824 } ->
1825 let acc = f acc keyset_intrinsic_keyword in
1826 let acc = f acc keyset_intrinsic_explicit_type in
1827 let acc = f acc keyset_intrinsic_left_bracket in
1828 let acc = f acc keyset_intrinsic_members in
1829 let acc = f acc keyset_intrinsic_right_bracket in
1831 | VarrayIntrinsicExpression {
1832 varray_intrinsic_keyword;
1833 varray_intrinsic_explicit_type;
1834 varray_intrinsic_left_bracket;
1835 varray_intrinsic_members;
1836 varray_intrinsic_right_bracket;
1837 } ->
1838 let acc = f acc varray_intrinsic_keyword in
1839 let acc = f acc varray_intrinsic_explicit_type in
1840 let acc = f acc varray_intrinsic_left_bracket in
1841 let acc = f acc varray_intrinsic_members in
1842 let acc = f acc varray_intrinsic_right_bracket in
1844 | VectorIntrinsicExpression {
1845 vector_intrinsic_keyword;
1846 vector_intrinsic_explicit_type;
1847 vector_intrinsic_left_bracket;
1848 vector_intrinsic_members;
1849 vector_intrinsic_right_bracket;
1850 } ->
1851 let acc = f acc vector_intrinsic_keyword in
1852 let acc = f acc vector_intrinsic_explicit_type in
1853 let acc = f acc vector_intrinsic_left_bracket in
1854 let acc = f acc vector_intrinsic_members in
1855 let acc = f acc vector_intrinsic_right_bracket in
1857 | ElementInitializer {
1858 element_key;
1859 element_arrow;
1860 element_value;
1861 } ->
1862 let acc = f acc element_key in
1863 let acc = f acc element_arrow in
1864 let acc = f acc element_value in
1866 | SubscriptExpression {
1867 subscript_receiver;
1868 subscript_left_bracket;
1869 subscript_index;
1870 subscript_right_bracket;
1871 } ->
1872 let acc = f acc subscript_receiver in
1873 let acc = f acc subscript_left_bracket in
1874 let acc = f acc subscript_index in
1875 let acc = f acc subscript_right_bracket in
1877 | EmbeddedSubscriptExpression {
1878 embedded_subscript_receiver;
1879 embedded_subscript_left_bracket;
1880 embedded_subscript_index;
1881 embedded_subscript_right_bracket;
1882 } ->
1883 let acc = f acc embedded_subscript_receiver in
1884 let acc = f acc embedded_subscript_left_bracket in
1885 let acc = f acc embedded_subscript_index in
1886 let acc = f acc embedded_subscript_right_bracket in
1888 | AwaitableCreationExpression {
1889 awaitable_attribute_spec;
1890 awaitable_async;
1891 awaitable_coroutine;
1892 awaitable_compound_statement;
1893 } ->
1894 let acc = f acc awaitable_attribute_spec in
1895 let acc = f acc awaitable_async in
1896 let acc = f acc awaitable_coroutine in
1897 let acc = f acc awaitable_compound_statement in
1899 | XHPChildrenDeclaration {
1900 xhp_children_keyword;
1901 xhp_children_expression;
1902 xhp_children_semicolon;
1903 } ->
1904 let acc = f acc xhp_children_keyword in
1905 let acc = f acc xhp_children_expression in
1906 let acc = f acc xhp_children_semicolon in
1908 | XHPChildrenParenthesizedList {
1909 xhp_children_list_left_paren;
1910 xhp_children_list_xhp_children;
1911 xhp_children_list_right_paren;
1912 } ->
1913 let acc = f acc xhp_children_list_left_paren in
1914 let acc = f acc xhp_children_list_xhp_children in
1915 let acc = f acc xhp_children_list_right_paren in
1917 | XHPCategoryDeclaration {
1918 xhp_category_keyword;
1919 xhp_category_categories;
1920 xhp_category_semicolon;
1921 } ->
1922 let acc = f acc xhp_category_keyword in
1923 let acc = f acc xhp_category_categories in
1924 let acc = f acc xhp_category_semicolon in
1926 | XHPEnumType {
1927 xhp_enum_optional;
1928 xhp_enum_keyword;
1929 xhp_enum_left_brace;
1930 xhp_enum_values;
1931 xhp_enum_right_brace;
1932 } ->
1933 let acc = f acc xhp_enum_optional in
1934 let acc = f acc xhp_enum_keyword in
1935 let acc = f acc xhp_enum_left_brace in
1936 let acc = f acc xhp_enum_values in
1937 let acc = f acc xhp_enum_right_brace in
1939 | XHPRequired {
1940 xhp_required_at;
1941 xhp_required_keyword;
1942 } ->
1943 let acc = f acc xhp_required_at in
1944 let acc = f acc xhp_required_keyword in
1946 | XHPClassAttributeDeclaration {
1947 xhp_attribute_keyword;
1948 xhp_attribute_attributes;
1949 xhp_attribute_semicolon;
1950 } ->
1951 let acc = f acc xhp_attribute_keyword in
1952 let acc = f acc xhp_attribute_attributes in
1953 let acc = f acc xhp_attribute_semicolon in
1955 | XHPClassAttribute {
1956 xhp_attribute_decl_type;
1957 xhp_attribute_decl_name;
1958 xhp_attribute_decl_initializer;
1959 xhp_attribute_decl_required;
1960 } ->
1961 let acc = f acc xhp_attribute_decl_type in
1962 let acc = f acc xhp_attribute_decl_name in
1963 let acc = f acc xhp_attribute_decl_initializer in
1964 let acc = f acc xhp_attribute_decl_required in
1966 | XHPSimpleClassAttribute {
1967 xhp_simple_class_attribute_type;
1968 } ->
1969 let acc = f acc xhp_simple_class_attribute_type in
1971 | XHPSimpleAttribute {
1972 xhp_simple_attribute_name;
1973 xhp_simple_attribute_equal;
1974 xhp_simple_attribute_expression;
1975 } ->
1976 let acc = f acc xhp_simple_attribute_name in
1977 let acc = f acc xhp_simple_attribute_equal in
1978 let acc = f acc xhp_simple_attribute_expression in
1980 | XHPSpreadAttribute {
1981 xhp_spread_attribute_left_brace;
1982 xhp_spread_attribute_spread_operator;
1983 xhp_spread_attribute_expression;
1984 xhp_spread_attribute_right_brace;
1985 } ->
1986 let acc = f acc xhp_spread_attribute_left_brace in
1987 let acc = f acc xhp_spread_attribute_spread_operator in
1988 let acc = f acc xhp_spread_attribute_expression in
1989 let acc = f acc xhp_spread_attribute_right_brace in
1991 | XHPOpen {
1992 xhp_open_left_angle;
1993 xhp_open_name;
1994 xhp_open_attributes;
1995 xhp_open_right_angle;
1996 } ->
1997 let acc = f acc xhp_open_left_angle in
1998 let acc = f acc xhp_open_name in
1999 let acc = f acc xhp_open_attributes in
2000 let acc = f acc xhp_open_right_angle in
2002 | XHPExpression {
2003 xhp_open;
2004 xhp_body;
2005 xhp_close;
2006 } ->
2007 let acc = f acc xhp_open in
2008 let acc = f acc xhp_body in
2009 let acc = f acc xhp_close in
2011 | XHPClose {
2012 xhp_close_left_angle;
2013 xhp_close_name;
2014 xhp_close_right_angle;
2015 } ->
2016 let acc = f acc xhp_close_left_angle in
2017 let acc = f acc xhp_close_name in
2018 let acc = f acc xhp_close_right_angle in
2020 | TypeConstant {
2021 type_constant_left_type;
2022 type_constant_separator;
2023 type_constant_right_type;
2024 } ->
2025 let acc = f acc type_constant_left_type in
2026 let acc = f acc type_constant_separator in
2027 let acc = f acc type_constant_right_type in
2029 | VectorTypeSpecifier {
2030 vector_type_keyword;
2031 vector_type_left_angle;
2032 vector_type_type;
2033 vector_type_trailing_comma;
2034 vector_type_right_angle;
2035 } ->
2036 let acc = f acc vector_type_keyword in
2037 let acc = f acc vector_type_left_angle in
2038 let acc = f acc vector_type_type in
2039 let acc = f acc vector_type_trailing_comma in
2040 let acc = f acc vector_type_right_angle in
2042 | KeysetTypeSpecifier {
2043 keyset_type_keyword;
2044 keyset_type_left_angle;
2045 keyset_type_type;
2046 keyset_type_trailing_comma;
2047 keyset_type_right_angle;
2048 } ->
2049 let acc = f acc keyset_type_keyword in
2050 let acc = f acc keyset_type_left_angle in
2051 let acc = f acc keyset_type_type in
2052 let acc = f acc keyset_type_trailing_comma in
2053 let acc = f acc keyset_type_right_angle in
2055 | TupleTypeExplicitSpecifier {
2056 tuple_type_keyword;
2057 tuple_type_left_angle;
2058 tuple_type_types;
2059 tuple_type_right_angle;
2060 } ->
2061 let acc = f acc tuple_type_keyword in
2062 let acc = f acc tuple_type_left_angle in
2063 let acc = f acc tuple_type_types in
2064 let acc = f acc tuple_type_right_angle in
2066 | VarrayTypeSpecifier {
2067 varray_keyword;
2068 varray_left_angle;
2069 varray_type;
2070 varray_trailing_comma;
2071 varray_right_angle;
2072 } ->
2073 let acc = f acc varray_keyword in
2074 let acc = f acc varray_left_angle in
2075 let acc = f acc varray_type in
2076 let acc = f acc varray_trailing_comma in
2077 let acc = f acc varray_right_angle in
2079 | VectorArrayTypeSpecifier {
2080 vector_array_keyword;
2081 vector_array_left_angle;
2082 vector_array_type;
2083 vector_array_right_angle;
2084 } ->
2085 let acc = f acc vector_array_keyword in
2086 let acc = f acc vector_array_left_angle in
2087 let acc = f acc vector_array_type in
2088 let acc = f acc vector_array_right_angle in
2090 | TypeParameter {
2091 type_reified;
2092 type_variance;
2093 type_name;
2094 type_constraints;
2095 } ->
2096 let acc = f acc type_reified in
2097 let acc = f acc type_variance in
2098 let acc = f acc type_name in
2099 let acc = f acc type_constraints in
2101 | TypeConstraint {
2102 constraint_keyword;
2103 constraint_type;
2104 } ->
2105 let acc = f acc constraint_keyword in
2106 let acc = f acc constraint_type in
2108 | DarrayTypeSpecifier {
2109 darray_keyword;
2110 darray_left_angle;
2111 darray_key;
2112 darray_comma;
2113 darray_value;
2114 darray_trailing_comma;
2115 darray_right_angle;
2116 } ->
2117 let acc = f acc darray_keyword in
2118 let acc = f acc darray_left_angle in
2119 let acc = f acc darray_key in
2120 let acc = f acc darray_comma in
2121 let acc = f acc darray_value in
2122 let acc = f acc darray_trailing_comma in
2123 let acc = f acc darray_right_angle in
2125 | MapArrayTypeSpecifier {
2126 map_array_keyword;
2127 map_array_left_angle;
2128 map_array_key;
2129 map_array_comma;
2130 map_array_value;
2131 map_array_right_angle;
2132 } ->
2133 let acc = f acc map_array_keyword in
2134 let acc = f acc map_array_left_angle in
2135 let acc = f acc map_array_key in
2136 let acc = f acc map_array_comma in
2137 let acc = f acc map_array_value in
2138 let acc = f acc map_array_right_angle in
2140 | DictionaryTypeSpecifier {
2141 dictionary_type_keyword;
2142 dictionary_type_left_angle;
2143 dictionary_type_members;
2144 dictionary_type_right_angle;
2145 } ->
2146 let acc = f acc dictionary_type_keyword in
2147 let acc = f acc dictionary_type_left_angle in
2148 let acc = f acc dictionary_type_members in
2149 let acc = f acc dictionary_type_right_angle in
2151 | ClosureTypeSpecifier {
2152 closure_outer_left_paren;
2153 closure_coroutine;
2154 closure_function_keyword;
2155 closure_inner_left_paren;
2156 closure_parameter_list;
2157 closure_inner_right_paren;
2158 closure_colon;
2159 closure_return_type;
2160 closure_outer_right_paren;
2161 } ->
2162 let acc = f acc closure_outer_left_paren in
2163 let acc = f acc closure_coroutine in
2164 let acc = f acc closure_function_keyword in
2165 let acc = f acc closure_inner_left_paren in
2166 let acc = f acc closure_parameter_list in
2167 let acc = f acc closure_inner_right_paren in
2168 let acc = f acc closure_colon in
2169 let acc = f acc closure_return_type in
2170 let acc = f acc closure_outer_right_paren in
2172 | ClosureParameterTypeSpecifier {
2173 closure_parameter_call_convention;
2174 closure_parameter_type;
2175 } ->
2176 let acc = f acc closure_parameter_call_convention in
2177 let acc = f acc closure_parameter_type in
2179 | ClassnameTypeSpecifier {
2180 classname_keyword;
2181 classname_left_angle;
2182 classname_type;
2183 classname_trailing_comma;
2184 classname_right_angle;
2185 } ->
2186 let acc = f acc classname_keyword in
2187 let acc = f acc classname_left_angle in
2188 let acc = f acc classname_type in
2189 let acc = f acc classname_trailing_comma in
2190 let acc = f acc classname_right_angle in
2192 | FieldSpecifier {
2193 field_question;
2194 field_name;
2195 field_arrow;
2196 field_type;
2197 } ->
2198 let acc = f acc field_question in
2199 let acc = f acc field_name in
2200 let acc = f acc field_arrow in
2201 let acc = f acc field_type in
2203 | FieldInitializer {
2204 field_initializer_name;
2205 field_initializer_arrow;
2206 field_initializer_value;
2207 } ->
2208 let acc = f acc field_initializer_name in
2209 let acc = f acc field_initializer_arrow in
2210 let acc = f acc field_initializer_value in
2212 | ShapeTypeSpecifier {
2213 shape_type_keyword;
2214 shape_type_left_paren;
2215 shape_type_fields;
2216 shape_type_ellipsis;
2217 shape_type_right_paren;
2218 } ->
2219 let acc = f acc shape_type_keyword in
2220 let acc = f acc shape_type_left_paren in
2221 let acc = f acc shape_type_fields in
2222 let acc = f acc shape_type_ellipsis in
2223 let acc = f acc shape_type_right_paren in
2225 | ShapeExpression {
2226 shape_expression_keyword;
2227 shape_expression_left_paren;
2228 shape_expression_fields;
2229 shape_expression_right_paren;
2230 } ->
2231 let acc = f acc shape_expression_keyword in
2232 let acc = f acc shape_expression_left_paren in
2233 let acc = f acc shape_expression_fields in
2234 let acc = f acc shape_expression_right_paren in
2236 | TupleExpression {
2237 tuple_expression_keyword;
2238 tuple_expression_left_paren;
2239 tuple_expression_items;
2240 tuple_expression_right_paren;
2241 } ->
2242 let acc = f acc tuple_expression_keyword in
2243 let acc = f acc tuple_expression_left_paren in
2244 let acc = f acc tuple_expression_items in
2245 let acc = f acc tuple_expression_right_paren in
2247 | GenericTypeSpecifier {
2248 generic_class_type;
2249 generic_argument_list;
2250 } ->
2251 let acc = f acc generic_class_type in
2252 let acc = f acc generic_argument_list in
2254 | NullableTypeSpecifier {
2255 nullable_question;
2256 nullable_type;
2257 } ->
2258 let acc = f acc nullable_question in
2259 let acc = f acc nullable_type in
2261 | SoftTypeSpecifier {
2262 soft_at;
2263 soft_type;
2264 } ->
2265 let acc = f acc soft_at in
2266 let acc = f acc soft_type in
2268 | ReifiedTypeArgument {
2269 reified_type_argument_reified;
2270 reified_type_argument_type;
2271 } ->
2272 let acc = f acc reified_type_argument_reified in
2273 let acc = f acc reified_type_argument_type in
2275 | TypeArguments {
2276 type_arguments_left_angle;
2277 type_arguments_types;
2278 type_arguments_right_angle;
2279 } ->
2280 let acc = f acc type_arguments_left_angle in
2281 let acc = f acc type_arguments_types in
2282 let acc = f acc type_arguments_right_angle in
2284 | TypeParameters {
2285 type_parameters_left_angle;
2286 type_parameters_parameters;
2287 type_parameters_right_angle;
2288 } ->
2289 let acc = f acc type_parameters_left_angle in
2290 let acc = f acc type_parameters_parameters in
2291 let acc = f acc type_parameters_right_angle in
2293 | TupleTypeSpecifier {
2294 tuple_left_paren;
2295 tuple_types;
2296 tuple_right_paren;
2297 } ->
2298 let acc = f acc tuple_left_paren in
2299 let acc = f acc tuple_types in
2300 let acc = f acc tuple_right_paren in
2302 | ErrorSyntax {
2303 error_error;
2304 } ->
2305 let acc = f acc error_error in
2307 | ListItem {
2308 list_item;
2309 list_separator;
2310 } ->
2311 let acc = f acc list_item in
2312 let acc = f acc list_separator in
2316 (* The order that the children are returned in should match the order
2317 that they appear in the source text *)
2318 let children_from_syntax s =
2319 match s with
2320 | Missing -> []
2321 | Token _ -> []
2322 | SyntaxList x -> x
2323 | EndOfFile {
2324 end_of_file_token;
2325 } -> [
2326 end_of_file_token;
2328 | Script {
2329 script_declarations;
2330 } -> [
2331 script_declarations;
2333 | QualifiedName {
2334 qualified_name_parts;
2335 } -> [
2336 qualified_name_parts;
2338 | SimpleTypeSpecifier {
2339 simple_type_specifier;
2340 } -> [
2341 simple_type_specifier;
2343 | LiteralExpression {
2344 literal_expression;
2345 } -> [
2346 literal_expression;
2348 | PrefixedStringExpression {
2349 prefixed_string_name;
2350 prefixed_string_str;
2351 } -> [
2352 prefixed_string_name;
2353 prefixed_string_str;
2355 | VariableExpression {
2356 variable_expression;
2357 } -> [
2358 variable_expression;
2360 | PipeVariableExpression {
2361 pipe_variable_expression;
2362 } -> [
2363 pipe_variable_expression;
2365 | EnumDeclaration {
2366 enum_attribute_spec;
2367 enum_keyword;
2368 enum_name;
2369 enum_colon;
2370 enum_base;
2371 enum_type;
2372 enum_left_brace;
2373 enum_enumerators;
2374 enum_right_brace;
2375 } -> [
2376 enum_attribute_spec;
2377 enum_keyword;
2378 enum_name;
2379 enum_colon;
2380 enum_base;
2381 enum_type;
2382 enum_left_brace;
2383 enum_enumerators;
2384 enum_right_brace;
2386 | Enumerator {
2387 enumerator_name;
2388 enumerator_equal;
2389 enumerator_value;
2390 enumerator_semicolon;
2391 } -> [
2392 enumerator_name;
2393 enumerator_equal;
2394 enumerator_value;
2395 enumerator_semicolon;
2397 | AliasDeclaration {
2398 alias_attribute_spec;
2399 alias_keyword;
2400 alias_name;
2401 alias_generic_parameter;
2402 alias_constraint;
2403 alias_equal;
2404 alias_type;
2405 alias_semicolon;
2406 } -> [
2407 alias_attribute_spec;
2408 alias_keyword;
2409 alias_name;
2410 alias_generic_parameter;
2411 alias_constraint;
2412 alias_equal;
2413 alias_type;
2414 alias_semicolon;
2416 | PropertyDeclaration {
2417 property_attribute_spec;
2418 property_modifiers;
2419 property_type;
2420 property_declarators;
2421 property_semicolon;
2422 } -> [
2423 property_attribute_spec;
2424 property_modifiers;
2425 property_type;
2426 property_declarators;
2427 property_semicolon;
2429 | PropertyDeclarator {
2430 property_name;
2431 property_initializer;
2432 } -> [
2433 property_name;
2434 property_initializer;
2436 | NamespaceDeclaration {
2437 namespace_keyword;
2438 namespace_name;
2439 namespace_body;
2440 } -> [
2441 namespace_keyword;
2442 namespace_name;
2443 namespace_body;
2445 | NamespaceBody {
2446 namespace_left_brace;
2447 namespace_declarations;
2448 namespace_right_brace;
2449 } -> [
2450 namespace_left_brace;
2451 namespace_declarations;
2452 namespace_right_brace;
2454 | NamespaceEmptyBody {
2455 namespace_semicolon;
2456 } -> [
2457 namespace_semicolon;
2459 | NamespaceUseDeclaration {
2460 namespace_use_keyword;
2461 namespace_use_kind;
2462 namespace_use_clauses;
2463 namespace_use_semicolon;
2464 } -> [
2465 namespace_use_keyword;
2466 namespace_use_kind;
2467 namespace_use_clauses;
2468 namespace_use_semicolon;
2470 | NamespaceGroupUseDeclaration {
2471 namespace_group_use_keyword;
2472 namespace_group_use_kind;
2473 namespace_group_use_prefix;
2474 namespace_group_use_left_brace;
2475 namespace_group_use_clauses;
2476 namespace_group_use_right_brace;
2477 namespace_group_use_semicolon;
2478 } -> [
2479 namespace_group_use_keyword;
2480 namespace_group_use_kind;
2481 namespace_group_use_prefix;
2482 namespace_group_use_left_brace;
2483 namespace_group_use_clauses;
2484 namespace_group_use_right_brace;
2485 namespace_group_use_semicolon;
2487 | NamespaceUseClause {
2488 namespace_use_clause_kind;
2489 namespace_use_name;
2490 namespace_use_as;
2491 namespace_use_alias;
2492 } -> [
2493 namespace_use_clause_kind;
2494 namespace_use_name;
2495 namespace_use_as;
2496 namespace_use_alias;
2498 | FunctionDeclaration {
2499 function_attribute_spec;
2500 function_declaration_header;
2501 function_body;
2502 } -> [
2503 function_attribute_spec;
2504 function_declaration_header;
2505 function_body;
2507 | FunctionDeclarationHeader {
2508 function_modifiers;
2509 function_keyword;
2510 function_ampersand;
2511 function_name;
2512 function_type_parameter_list;
2513 function_left_paren;
2514 function_parameter_list;
2515 function_right_paren;
2516 function_colon;
2517 function_type;
2518 function_where_clause;
2519 } -> [
2520 function_modifiers;
2521 function_keyword;
2522 function_ampersand;
2523 function_name;
2524 function_type_parameter_list;
2525 function_left_paren;
2526 function_parameter_list;
2527 function_right_paren;
2528 function_colon;
2529 function_type;
2530 function_where_clause;
2532 | WhereClause {
2533 where_clause_keyword;
2534 where_clause_constraints;
2535 } -> [
2536 where_clause_keyword;
2537 where_clause_constraints;
2539 | WhereConstraint {
2540 where_constraint_left_type;
2541 where_constraint_operator;
2542 where_constraint_right_type;
2543 } -> [
2544 where_constraint_left_type;
2545 where_constraint_operator;
2546 where_constraint_right_type;
2548 | MethodishDeclaration {
2549 methodish_attribute;
2550 methodish_function_decl_header;
2551 methodish_function_body;
2552 methodish_semicolon;
2553 } -> [
2554 methodish_attribute;
2555 methodish_function_decl_header;
2556 methodish_function_body;
2557 methodish_semicolon;
2559 | ClassishDeclaration {
2560 classish_attribute;
2561 classish_modifiers;
2562 classish_keyword;
2563 classish_name;
2564 classish_type_parameters;
2565 classish_extends_keyword;
2566 classish_extends_list;
2567 classish_implements_keyword;
2568 classish_implements_list;
2569 classish_body;
2570 } -> [
2571 classish_attribute;
2572 classish_modifiers;
2573 classish_keyword;
2574 classish_name;
2575 classish_type_parameters;
2576 classish_extends_keyword;
2577 classish_extends_list;
2578 classish_implements_keyword;
2579 classish_implements_list;
2580 classish_body;
2582 | ClassishBody {
2583 classish_body_left_brace;
2584 classish_body_elements;
2585 classish_body_right_brace;
2586 } -> [
2587 classish_body_left_brace;
2588 classish_body_elements;
2589 classish_body_right_brace;
2591 | TraitUsePrecedenceItem {
2592 trait_use_precedence_item_name;
2593 trait_use_precedence_item_keyword;
2594 trait_use_precedence_item_removed_names;
2595 } -> [
2596 trait_use_precedence_item_name;
2597 trait_use_precedence_item_keyword;
2598 trait_use_precedence_item_removed_names;
2600 | TraitUseAliasItem {
2601 trait_use_alias_item_aliasing_name;
2602 trait_use_alias_item_keyword;
2603 trait_use_alias_item_modifiers;
2604 trait_use_alias_item_aliased_name;
2605 } -> [
2606 trait_use_alias_item_aliasing_name;
2607 trait_use_alias_item_keyword;
2608 trait_use_alias_item_modifiers;
2609 trait_use_alias_item_aliased_name;
2611 | TraitUseConflictResolution {
2612 trait_use_conflict_resolution_keyword;
2613 trait_use_conflict_resolution_names;
2614 trait_use_conflict_resolution_left_brace;
2615 trait_use_conflict_resolution_clauses;
2616 trait_use_conflict_resolution_right_brace;
2617 } -> [
2618 trait_use_conflict_resolution_keyword;
2619 trait_use_conflict_resolution_names;
2620 trait_use_conflict_resolution_left_brace;
2621 trait_use_conflict_resolution_clauses;
2622 trait_use_conflict_resolution_right_brace;
2624 | TraitUse {
2625 trait_use_keyword;
2626 trait_use_names;
2627 trait_use_semicolon;
2628 } -> [
2629 trait_use_keyword;
2630 trait_use_names;
2631 trait_use_semicolon;
2633 | RequireClause {
2634 require_keyword;
2635 require_kind;
2636 require_name;
2637 require_semicolon;
2638 } -> [
2639 require_keyword;
2640 require_kind;
2641 require_name;
2642 require_semicolon;
2644 | ConstDeclaration {
2645 const_visibility;
2646 const_abstract;
2647 const_keyword;
2648 const_type_specifier;
2649 const_declarators;
2650 const_semicolon;
2651 } -> [
2652 const_visibility;
2653 const_abstract;
2654 const_keyword;
2655 const_type_specifier;
2656 const_declarators;
2657 const_semicolon;
2659 | ConstantDeclarator {
2660 constant_declarator_name;
2661 constant_declarator_initializer;
2662 } -> [
2663 constant_declarator_name;
2664 constant_declarator_initializer;
2666 | TypeConstDeclaration {
2667 type_const_abstract;
2668 type_const_keyword;
2669 type_const_type_keyword;
2670 type_const_name;
2671 type_const_type_parameters;
2672 type_const_type_constraint;
2673 type_const_equal;
2674 type_const_type_specifier;
2675 type_const_semicolon;
2676 } -> [
2677 type_const_abstract;
2678 type_const_keyword;
2679 type_const_type_keyword;
2680 type_const_name;
2681 type_const_type_parameters;
2682 type_const_type_constraint;
2683 type_const_equal;
2684 type_const_type_specifier;
2685 type_const_semicolon;
2687 | DecoratedExpression {
2688 decorated_expression_decorator;
2689 decorated_expression_expression;
2690 } -> [
2691 decorated_expression_decorator;
2692 decorated_expression_expression;
2694 | ParameterDeclaration {
2695 parameter_attribute;
2696 parameter_visibility;
2697 parameter_call_convention;
2698 parameter_type;
2699 parameter_name;
2700 parameter_default_value;
2701 } -> [
2702 parameter_attribute;
2703 parameter_visibility;
2704 parameter_call_convention;
2705 parameter_type;
2706 parameter_name;
2707 parameter_default_value;
2709 | VariadicParameter {
2710 variadic_parameter_call_convention;
2711 variadic_parameter_type;
2712 variadic_parameter_ellipsis;
2713 } -> [
2714 variadic_parameter_call_convention;
2715 variadic_parameter_type;
2716 variadic_parameter_ellipsis;
2718 | AttributeSpecification {
2719 attribute_specification_left_double_angle;
2720 attribute_specification_attributes;
2721 attribute_specification_right_double_angle;
2722 } -> [
2723 attribute_specification_left_double_angle;
2724 attribute_specification_attributes;
2725 attribute_specification_right_double_angle;
2727 | InclusionExpression {
2728 inclusion_require;
2729 inclusion_filename;
2730 } -> [
2731 inclusion_require;
2732 inclusion_filename;
2734 | InclusionDirective {
2735 inclusion_expression;
2736 inclusion_semicolon;
2737 } -> [
2738 inclusion_expression;
2739 inclusion_semicolon;
2741 | CompoundStatement {
2742 compound_left_brace;
2743 compound_statements;
2744 compound_right_brace;
2745 } -> [
2746 compound_left_brace;
2747 compound_statements;
2748 compound_right_brace;
2750 | AlternateLoopStatement {
2751 alternate_loop_opening_colon;
2752 alternate_loop_statements;
2753 alternate_loop_closing_keyword;
2754 alternate_loop_closing_semicolon;
2755 } -> [
2756 alternate_loop_opening_colon;
2757 alternate_loop_statements;
2758 alternate_loop_closing_keyword;
2759 alternate_loop_closing_semicolon;
2761 | ExpressionStatement {
2762 expression_statement_expression;
2763 expression_statement_semicolon;
2764 } -> [
2765 expression_statement_expression;
2766 expression_statement_semicolon;
2768 | MarkupSection {
2769 markup_prefix;
2770 markup_text;
2771 markup_suffix;
2772 markup_expression;
2773 } -> [
2774 markup_prefix;
2775 markup_text;
2776 markup_suffix;
2777 markup_expression;
2779 | MarkupSuffix {
2780 markup_suffix_less_than_question;
2781 markup_suffix_name;
2782 } -> [
2783 markup_suffix_less_than_question;
2784 markup_suffix_name;
2786 | UnsetStatement {
2787 unset_keyword;
2788 unset_left_paren;
2789 unset_variables;
2790 unset_right_paren;
2791 unset_semicolon;
2792 } -> [
2793 unset_keyword;
2794 unset_left_paren;
2795 unset_variables;
2796 unset_right_paren;
2797 unset_semicolon;
2799 | LetStatement {
2800 let_statement_keyword;
2801 let_statement_name;
2802 let_statement_colon;
2803 let_statement_type;
2804 let_statement_initializer;
2805 let_statement_semicolon;
2806 } -> [
2807 let_statement_keyword;
2808 let_statement_name;
2809 let_statement_colon;
2810 let_statement_type;
2811 let_statement_initializer;
2812 let_statement_semicolon;
2814 | UsingStatementBlockScoped {
2815 using_block_await_keyword;
2816 using_block_using_keyword;
2817 using_block_left_paren;
2818 using_block_expressions;
2819 using_block_right_paren;
2820 using_block_body;
2821 } -> [
2822 using_block_await_keyword;
2823 using_block_using_keyword;
2824 using_block_left_paren;
2825 using_block_expressions;
2826 using_block_right_paren;
2827 using_block_body;
2829 | UsingStatementFunctionScoped {
2830 using_function_await_keyword;
2831 using_function_using_keyword;
2832 using_function_expression;
2833 using_function_semicolon;
2834 } -> [
2835 using_function_await_keyword;
2836 using_function_using_keyword;
2837 using_function_expression;
2838 using_function_semicolon;
2840 | DeclareDirectiveStatement {
2841 declare_directive_keyword;
2842 declare_directive_left_paren;
2843 declare_directive_expression;
2844 declare_directive_right_paren;
2845 declare_directive_semicolon;
2846 } -> [
2847 declare_directive_keyword;
2848 declare_directive_left_paren;
2849 declare_directive_expression;
2850 declare_directive_right_paren;
2851 declare_directive_semicolon;
2853 | DeclareBlockStatement {
2854 declare_block_keyword;
2855 declare_block_left_paren;
2856 declare_block_expression;
2857 declare_block_right_paren;
2858 declare_block_body;
2859 } -> [
2860 declare_block_keyword;
2861 declare_block_left_paren;
2862 declare_block_expression;
2863 declare_block_right_paren;
2864 declare_block_body;
2866 | WhileStatement {
2867 while_keyword;
2868 while_left_paren;
2869 while_condition;
2870 while_right_paren;
2871 while_body;
2872 } -> [
2873 while_keyword;
2874 while_left_paren;
2875 while_condition;
2876 while_right_paren;
2877 while_body;
2879 | IfStatement {
2880 if_keyword;
2881 if_left_paren;
2882 if_condition;
2883 if_right_paren;
2884 if_statement;
2885 if_elseif_clauses;
2886 if_else_clause;
2887 } -> [
2888 if_keyword;
2889 if_left_paren;
2890 if_condition;
2891 if_right_paren;
2892 if_statement;
2893 if_elseif_clauses;
2894 if_else_clause;
2896 | ElseifClause {
2897 elseif_keyword;
2898 elseif_left_paren;
2899 elseif_condition;
2900 elseif_right_paren;
2901 elseif_statement;
2902 } -> [
2903 elseif_keyword;
2904 elseif_left_paren;
2905 elseif_condition;
2906 elseif_right_paren;
2907 elseif_statement;
2909 | ElseClause {
2910 else_keyword;
2911 else_statement;
2912 } -> [
2913 else_keyword;
2914 else_statement;
2916 | AlternateIfStatement {
2917 alternate_if_keyword;
2918 alternate_if_left_paren;
2919 alternate_if_condition;
2920 alternate_if_right_paren;
2921 alternate_if_colon;
2922 alternate_if_statement;
2923 alternate_if_elseif_clauses;
2924 alternate_if_else_clause;
2925 alternate_if_endif_keyword;
2926 alternate_if_semicolon;
2927 } -> [
2928 alternate_if_keyword;
2929 alternate_if_left_paren;
2930 alternate_if_condition;
2931 alternate_if_right_paren;
2932 alternate_if_colon;
2933 alternate_if_statement;
2934 alternate_if_elseif_clauses;
2935 alternate_if_else_clause;
2936 alternate_if_endif_keyword;
2937 alternate_if_semicolon;
2939 | AlternateElseifClause {
2940 alternate_elseif_keyword;
2941 alternate_elseif_left_paren;
2942 alternate_elseif_condition;
2943 alternate_elseif_right_paren;
2944 alternate_elseif_colon;
2945 alternate_elseif_statement;
2946 } -> [
2947 alternate_elseif_keyword;
2948 alternate_elseif_left_paren;
2949 alternate_elseif_condition;
2950 alternate_elseif_right_paren;
2951 alternate_elseif_colon;
2952 alternate_elseif_statement;
2954 | AlternateElseClause {
2955 alternate_else_keyword;
2956 alternate_else_colon;
2957 alternate_else_statement;
2958 } -> [
2959 alternate_else_keyword;
2960 alternate_else_colon;
2961 alternate_else_statement;
2963 | TryStatement {
2964 try_keyword;
2965 try_compound_statement;
2966 try_catch_clauses;
2967 try_finally_clause;
2968 } -> [
2969 try_keyword;
2970 try_compound_statement;
2971 try_catch_clauses;
2972 try_finally_clause;
2974 | CatchClause {
2975 catch_keyword;
2976 catch_left_paren;
2977 catch_type;
2978 catch_variable;
2979 catch_right_paren;
2980 catch_body;
2981 } -> [
2982 catch_keyword;
2983 catch_left_paren;
2984 catch_type;
2985 catch_variable;
2986 catch_right_paren;
2987 catch_body;
2989 | FinallyClause {
2990 finally_keyword;
2991 finally_body;
2992 } -> [
2993 finally_keyword;
2994 finally_body;
2996 | DoStatement {
2997 do_keyword;
2998 do_body;
2999 do_while_keyword;
3000 do_left_paren;
3001 do_condition;
3002 do_right_paren;
3003 do_semicolon;
3004 } -> [
3005 do_keyword;
3006 do_body;
3007 do_while_keyword;
3008 do_left_paren;
3009 do_condition;
3010 do_right_paren;
3011 do_semicolon;
3013 | ForStatement {
3014 for_keyword;
3015 for_left_paren;
3016 for_initializer;
3017 for_first_semicolon;
3018 for_control;
3019 for_second_semicolon;
3020 for_end_of_loop;
3021 for_right_paren;
3022 for_body;
3023 } -> [
3024 for_keyword;
3025 for_left_paren;
3026 for_initializer;
3027 for_first_semicolon;
3028 for_control;
3029 for_second_semicolon;
3030 for_end_of_loop;
3031 for_right_paren;
3032 for_body;
3034 | ForeachStatement {
3035 foreach_keyword;
3036 foreach_left_paren;
3037 foreach_collection;
3038 foreach_await_keyword;
3039 foreach_as;
3040 foreach_key;
3041 foreach_arrow;
3042 foreach_value;
3043 foreach_right_paren;
3044 foreach_body;
3045 } -> [
3046 foreach_keyword;
3047 foreach_left_paren;
3048 foreach_collection;
3049 foreach_await_keyword;
3050 foreach_as;
3051 foreach_key;
3052 foreach_arrow;
3053 foreach_value;
3054 foreach_right_paren;
3055 foreach_body;
3057 | SwitchStatement {
3058 switch_keyword;
3059 switch_left_paren;
3060 switch_expression;
3061 switch_right_paren;
3062 switch_left_brace;
3063 switch_sections;
3064 switch_right_brace;
3065 } -> [
3066 switch_keyword;
3067 switch_left_paren;
3068 switch_expression;
3069 switch_right_paren;
3070 switch_left_brace;
3071 switch_sections;
3072 switch_right_brace;
3074 | AlternateSwitchStatement {
3075 alternate_switch_keyword;
3076 alternate_switch_left_paren;
3077 alternate_switch_expression;
3078 alternate_switch_right_paren;
3079 alternate_switch_opening_colon;
3080 alternate_switch_sections;
3081 alternate_switch_closing_endswitch;
3082 alternate_switch_closing_semicolon;
3083 } -> [
3084 alternate_switch_keyword;
3085 alternate_switch_left_paren;
3086 alternate_switch_expression;
3087 alternate_switch_right_paren;
3088 alternate_switch_opening_colon;
3089 alternate_switch_sections;
3090 alternate_switch_closing_endswitch;
3091 alternate_switch_closing_semicolon;
3093 | SwitchSection {
3094 switch_section_labels;
3095 switch_section_statements;
3096 switch_section_fallthrough;
3097 } -> [
3098 switch_section_labels;
3099 switch_section_statements;
3100 switch_section_fallthrough;
3102 | SwitchFallthrough {
3103 fallthrough_keyword;
3104 fallthrough_semicolon;
3105 } -> [
3106 fallthrough_keyword;
3107 fallthrough_semicolon;
3109 | CaseLabel {
3110 case_keyword;
3111 case_expression;
3112 case_colon;
3113 } -> [
3114 case_keyword;
3115 case_expression;
3116 case_colon;
3118 | DefaultLabel {
3119 default_keyword;
3120 default_colon;
3121 } -> [
3122 default_keyword;
3123 default_colon;
3125 | ReturnStatement {
3126 return_keyword;
3127 return_expression;
3128 return_semicolon;
3129 } -> [
3130 return_keyword;
3131 return_expression;
3132 return_semicolon;
3134 | GotoLabel {
3135 goto_label_name;
3136 goto_label_colon;
3137 } -> [
3138 goto_label_name;
3139 goto_label_colon;
3141 | GotoStatement {
3142 goto_statement_keyword;
3143 goto_statement_label_name;
3144 goto_statement_semicolon;
3145 } -> [
3146 goto_statement_keyword;
3147 goto_statement_label_name;
3148 goto_statement_semicolon;
3150 | ThrowStatement {
3151 throw_keyword;
3152 throw_expression;
3153 throw_semicolon;
3154 } -> [
3155 throw_keyword;
3156 throw_expression;
3157 throw_semicolon;
3159 | BreakStatement {
3160 break_keyword;
3161 break_level;
3162 break_semicolon;
3163 } -> [
3164 break_keyword;
3165 break_level;
3166 break_semicolon;
3168 | ContinueStatement {
3169 continue_keyword;
3170 continue_level;
3171 continue_semicolon;
3172 } -> [
3173 continue_keyword;
3174 continue_level;
3175 continue_semicolon;
3177 | FunctionStaticStatement {
3178 static_static_keyword;
3179 static_declarations;
3180 static_semicolon;
3181 } -> [
3182 static_static_keyword;
3183 static_declarations;
3184 static_semicolon;
3186 | StaticDeclarator {
3187 static_name;
3188 static_initializer;
3189 } -> [
3190 static_name;
3191 static_initializer;
3193 | EchoStatement {
3194 echo_keyword;
3195 echo_expressions;
3196 echo_semicolon;
3197 } -> [
3198 echo_keyword;
3199 echo_expressions;
3200 echo_semicolon;
3202 | GlobalStatement {
3203 global_keyword;
3204 global_variables;
3205 global_semicolon;
3206 } -> [
3207 global_keyword;
3208 global_variables;
3209 global_semicolon;
3211 | SimpleInitializer {
3212 simple_initializer_equal;
3213 simple_initializer_value;
3214 } -> [
3215 simple_initializer_equal;
3216 simple_initializer_value;
3218 | AnonymousClass {
3219 anonymous_class_class_keyword;
3220 anonymous_class_left_paren;
3221 anonymous_class_argument_list;
3222 anonymous_class_right_paren;
3223 anonymous_class_extends_keyword;
3224 anonymous_class_extends_list;
3225 anonymous_class_implements_keyword;
3226 anonymous_class_implements_list;
3227 anonymous_class_body;
3228 } -> [
3229 anonymous_class_class_keyword;
3230 anonymous_class_left_paren;
3231 anonymous_class_argument_list;
3232 anonymous_class_right_paren;
3233 anonymous_class_extends_keyword;
3234 anonymous_class_extends_list;
3235 anonymous_class_implements_keyword;
3236 anonymous_class_implements_list;
3237 anonymous_class_body;
3239 | AnonymousFunction {
3240 anonymous_attribute_spec;
3241 anonymous_static_keyword;
3242 anonymous_async_keyword;
3243 anonymous_coroutine_keyword;
3244 anonymous_function_keyword;
3245 anonymous_ampersand;
3246 anonymous_left_paren;
3247 anonymous_parameters;
3248 anonymous_right_paren;
3249 anonymous_colon;
3250 anonymous_type;
3251 anonymous_use;
3252 anonymous_body;
3253 } -> [
3254 anonymous_attribute_spec;
3255 anonymous_static_keyword;
3256 anonymous_async_keyword;
3257 anonymous_coroutine_keyword;
3258 anonymous_function_keyword;
3259 anonymous_ampersand;
3260 anonymous_left_paren;
3261 anonymous_parameters;
3262 anonymous_right_paren;
3263 anonymous_colon;
3264 anonymous_type;
3265 anonymous_use;
3266 anonymous_body;
3268 | Php7AnonymousFunction {
3269 php7_anonymous_attribute_spec;
3270 php7_anonymous_static_keyword;
3271 php7_anonymous_async_keyword;
3272 php7_anonymous_coroutine_keyword;
3273 php7_anonymous_function_keyword;
3274 php7_anonymous_ampersand;
3275 php7_anonymous_left_paren;
3276 php7_anonymous_parameters;
3277 php7_anonymous_right_paren;
3278 php7_anonymous_use;
3279 php7_anonymous_colon;
3280 php7_anonymous_type;
3281 php7_anonymous_body;
3282 } -> [
3283 php7_anonymous_attribute_spec;
3284 php7_anonymous_static_keyword;
3285 php7_anonymous_async_keyword;
3286 php7_anonymous_coroutine_keyword;
3287 php7_anonymous_function_keyword;
3288 php7_anonymous_ampersand;
3289 php7_anonymous_left_paren;
3290 php7_anonymous_parameters;
3291 php7_anonymous_right_paren;
3292 php7_anonymous_use;
3293 php7_anonymous_colon;
3294 php7_anonymous_type;
3295 php7_anonymous_body;
3297 | AnonymousFunctionUseClause {
3298 anonymous_use_keyword;
3299 anonymous_use_left_paren;
3300 anonymous_use_variables;
3301 anonymous_use_right_paren;
3302 } -> [
3303 anonymous_use_keyword;
3304 anonymous_use_left_paren;
3305 anonymous_use_variables;
3306 anonymous_use_right_paren;
3308 | LambdaExpression {
3309 lambda_attribute_spec;
3310 lambda_async;
3311 lambda_coroutine;
3312 lambda_signature;
3313 lambda_arrow;
3314 lambda_body;
3315 } -> [
3316 lambda_attribute_spec;
3317 lambda_async;
3318 lambda_coroutine;
3319 lambda_signature;
3320 lambda_arrow;
3321 lambda_body;
3323 | LambdaSignature {
3324 lambda_left_paren;
3325 lambda_parameters;
3326 lambda_right_paren;
3327 lambda_colon;
3328 lambda_type;
3329 } -> [
3330 lambda_left_paren;
3331 lambda_parameters;
3332 lambda_right_paren;
3333 lambda_colon;
3334 lambda_type;
3336 | CastExpression {
3337 cast_left_paren;
3338 cast_type;
3339 cast_right_paren;
3340 cast_operand;
3341 } -> [
3342 cast_left_paren;
3343 cast_type;
3344 cast_right_paren;
3345 cast_operand;
3347 | ScopeResolutionExpression {
3348 scope_resolution_qualifier;
3349 scope_resolution_operator;
3350 scope_resolution_name;
3351 } -> [
3352 scope_resolution_qualifier;
3353 scope_resolution_operator;
3354 scope_resolution_name;
3356 | MemberSelectionExpression {
3357 member_object;
3358 member_operator;
3359 member_name;
3360 } -> [
3361 member_object;
3362 member_operator;
3363 member_name;
3365 | SafeMemberSelectionExpression {
3366 safe_member_object;
3367 safe_member_operator;
3368 safe_member_name;
3369 } -> [
3370 safe_member_object;
3371 safe_member_operator;
3372 safe_member_name;
3374 | EmbeddedMemberSelectionExpression {
3375 embedded_member_object;
3376 embedded_member_operator;
3377 embedded_member_name;
3378 } -> [
3379 embedded_member_object;
3380 embedded_member_operator;
3381 embedded_member_name;
3383 | YieldExpression {
3384 yield_keyword;
3385 yield_operand;
3386 } -> [
3387 yield_keyword;
3388 yield_operand;
3390 | YieldFromExpression {
3391 yield_from_yield_keyword;
3392 yield_from_from_keyword;
3393 yield_from_operand;
3394 } -> [
3395 yield_from_yield_keyword;
3396 yield_from_from_keyword;
3397 yield_from_operand;
3399 | PrefixUnaryExpression {
3400 prefix_unary_operator;
3401 prefix_unary_operand;
3402 } -> [
3403 prefix_unary_operator;
3404 prefix_unary_operand;
3406 | PostfixUnaryExpression {
3407 postfix_unary_operand;
3408 postfix_unary_operator;
3409 } -> [
3410 postfix_unary_operand;
3411 postfix_unary_operator;
3413 | BinaryExpression {
3414 binary_left_operand;
3415 binary_operator;
3416 binary_right_operand;
3417 } -> [
3418 binary_left_operand;
3419 binary_operator;
3420 binary_right_operand;
3422 | InstanceofExpression {
3423 instanceof_left_operand;
3424 instanceof_operator;
3425 instanceof_right_operand;
3426 } -> [
3427 instanceof_left_operand;
3428 instanceof_operator;
3429 instanceof_right_operand;
3431 | IsExpression {
3432 is_left_operand;
3433 is_operator;
3434 is_right_operand;
3435 } -> [
3436 is_left_operand;
3437 is_operator;
3438 is_right_operand;
3440 | AsExpression {
3441 as_left_operand;
3442 as_operator;
3443 as_right_operand;
3444 } -> [
3445 as_left_operand;
3446 as_operator;
3447 as_right_operand;
3449 | NullableAsExpression {
3450 nullable_as_left_operand;
3451 nullable_as_operator;
3452 nullable_as_right_operand;
3453 } -> [
3454 nullable_as_left_operand;
3455 nullable_as_operator;
3456 nullable_as_right_operand;
3458 | ConditionalExpression {
3459 conditional_test;
3460 conditional_question;
3461 conditional_consequence;
3462 conditional_colon;
3463 conditional_alternative;
3464 } -> [
3465 conditional_test;
3466 conditional_question;
3467 conditional_consequence;
3468 conditional_colon;
3469 conditional_alternative;
3471 | EvalExpression {
3472 eval_keyword;
3473 eval_left_paren;
3474 eval_argument;
3475 eval_right_paren;
3476 } -> [
3477 eval_keyword;
3478 eval_left_paren;
3479 eval_argument;
3480 eval_right_paren;
3482 | EmptyExpression {
3483 empty_keyword;
3484 empty_left_paren;
3485 empty_argument;
3486 empty_right_paren;
3487 } -> [
3488 empty_keyword;
3489 empty_left_paren;
3490 empty_argument;
3491 empty_right_paren;
3493 | DefineExpression {
3494 define_keyword;
3495 define_left_paren;
3496 define_argument_list;
3497 define_right_paren;
3498 } -> [
3499 define_keyword;
3500 define_left_paren;
3501 define_argument_list;
3502 define_right_paren;
3504 | HaltCompilerExpression {
3505 halt_compiler_keyword;
3506 halt_compiler_left_paren;
3507 halt_compiler_argument_list;
3508 halt_compiler_right_paren;
3509 } -> [
3510 halt_compiler_keyword;
3511 halt_compiler_left_paren;
3512 halt_compiler_argument_list;
3513 halt_compiler_right_paren;
3515 | IssetExpression {
3516 isset_keyword;
3517 isset_left_paren;
3518 isset_argument_list;
3519 isset_right_paren;
3520 } -> [
3521 isset_keyword;
3522 isset_left_paren;
3523 isset_argument_list;
3524 isset_right_paren;
3526 | FunctionCallExpression {
3527 function_call_receiver;
3528 function_call_left_paren;
3529 function_call_argument_list;
3530 function_call_right_paren;
3531 } -> [
3532 function_call_receiver;
3533 function_call_left_paren;
3534 function_call_argument_list;
3535 function_call_right_paren;
3537 | FunctionCallWithTypeArgumentsExpression {
3538 function_call_with_type_arguments_receiver;
3539 function_call_with_type_arguments_type_args;
3540 function_call_with_type_arguments_left_paren;
3541 function_call_with_type_arguments_argument_list;
3542 function_call_with_type_arguments_right_paren;
3543 } -> [
3544 function_call_with_type_arguments_receiver;
3545 function_call_with_type_arguments_type_args;
3546 function_call_with_type_arguments_left_paren;
3547 function_call_with_type_arguments_argument_list;
3548 function_call_with_type_arguments_right_paren;
3550 | ParenthesizedExpression {
3551 parenthesized_expression_left_paren;
3552 parenthesized_expression_expression;
3553 parenthesized_expression_right_paren;
3554 } -> [
3555 parenthesized_expression_left_paren;
3556 parenthesized_expression_expression;
3557 parenthesized_expression_right_paren;
3559 | BracedExpression {
3560 braced_expression_left_brace;
3561 braced_expression_expression;
3562 braced_expression_right_brace;
3563 } -> [
3564 braced_expression_left_brace;
3565 braced_expression_expression;
3566 braced_expression_right_brace;
3568 | EmbeddedBracedExpression {
3569 embedded_braced_expression_left_brace;
3570 embedded_braced_expression_expression;
3571 embedded_braced_expression_right_brace;
3572 } -> [
3573 embedded_braced_expression_left_brace;
3574 embedded_braced_expression_expression;
3575 embedded_braced_expression_right_brace;
3577 | ListExpression {
3578 list_keyword;
3579 list_left_paren;
3580 list_members;
3581 list_right_paren;
3582 } -> [
3583 list_keyword;
3584 list_left_paren;
3585 list_members;
3586 list_right_paren;
3588 | CollectionLiteralExpression {
3589 collection_literal_name;
3590 collection_literal_left_brace;
3591 collection_literal_initializers;
3592 collection_literal_right_brace;
3593 } -> [
3594 collection_literal_name;
3595 collection_literal_left_brace;
3596 collection_literal_initializers;
3597 collection_literal_right_brace;
3599 | ObjectCreationExpression {
3600 object_creation_new_keyword;
3601 object_creation_object;
3602 } -> [
3603 object_creation_new_keyword;
3604 object_creation_object;
3606 | ConstructorCall {
3607 constructor_call_type;
3608 constructor_call_left_paren;
3609 constructor_call_argument_list;
3610 constructor_call_right_paren;
3611 } -> [
3612 constructor_call_type;
3613 constructor_call_left_paren;
3614 constructor_call_argument_list;
3615 constructor_call_right_paren;
3617 | ArrayCreationExpression {
3618 array_creation_left_bracket;
3619 array_creation_members;
3620 array_creation_right_bracket;
3621 } -> [
3622 array_creation_left_bracket;
3623 array_creation_members;
3624 array_creation_right_bracket;
3626 | ArrayIntrinsicExpression {
3627 array_intrinsic_keyword;
3628 array_intrinsic_left_paren;
3629 array_intrinsic_members;
3630 array_intrinsic_right_paren;
3631 } -> [
3632 array_intrinsic_keyword;
3633 array_intrinsic_left_paren;
3634 array_intrinsic_members;
3635 array_intrinsic_right_paren;
3637 | DarrayIntrinsicExpression {
3638 darray_intrinsic_keyword;
3639 darray_intrinsic_explicit_type;
3640 darray_intrinsic_left_bracket;
3641 darray_intrinsic_members;
3642 darray_intrinsic_right_bracket;
3643 } -> [
3644 darray_intrinsic_keyword;
3645 darray_intrinsic_explicit_type;
3646 darray_intrinsic_left_bracket;
3647 darray_intrinsic_members;
3648 darray_intrinsic_right_bracket;
3650 | DictionaryIntrinsicExpression {
3651 dictionary_intrinsic_keyword;
3652 dictionary_intrinsic_explicit_type;
3653 dictionary_intrinsic_left_bracket;
3654 dictionary_intrinsic_members;
3655 dictionary_intrinsic_right_bracket;
3656 } -> [
3657 dictionary_intrinsic_keyword;
3658 dictionary_intrinsic_explicit_type;
3659 dictionary_intrinsic_left_bracket;
3660 dictionary_intrinsic_members;
3661 dictionary_intrinsic_right_bracket;
3663 | KeysetIntrinsicExpression {
3664 keyset_intrinsic_keyword;
3665 keyset_intrinsic_explicit_type;
3666 keyset_intrinsic_left_bracket;
3667 keyset_intrinsic_members;
3668 keyset_intrinsic_right_bracket;
3669 } -> [
3670 keyset_intrinsic_keyword;
3671 keyset_intrinsic_explicit_type;
3672 keyset_intrinsic_left_bracket;
3673 keyset_intrinsic_members;
3674 keyset_intrinsic_right_bracket;
3676 | VarrayIntrinsicExpression {
3677 varray_intrinsic_keyword;
3678 varray_intrinsic_explicit_type;
3679 varray_intrinsic_left_bracket;
3680 varray_intrinsic_members;
3681 varray_intrinsic_right_bracket;
3682 } -> [
3683 varray_intrinsic_keyword;
3684 varray_intrinsic_explicit_type;
3685 varray_intrinsic_left_bracket;
3686 varray_intrinsic_members;
3687 varray_intrinsic_right_bracket;
3689 | VectorIntrinsicExpression {
3690 vector_intrinsic_keyword;
3691 vector_intrinsic_explicit_type;
3692 vector_intrinsic_left_bracket;
3693 vector_intrinsic_members;
3694 vector_intrinsic_right_bracket;
3695 } -> [
3696 vector_intrinsic_keyword;
3697 vector_intrinsic_explicit_type;
3698 vector_intrinsic_left_bracket;
3699 vector_intrinsic_members;
3700 vector_intrinsic_right_bracket;
3702 | ElementInitializer {
3703 element_key;
3704 element_arrow;
3705 element_value;
3706 } -> [
3707 element_key;
3708 element_arrow;
3709 element_value;
3711 | SubscriptExpression {
3712 subscript_receiver;
3713 subscript_left_bracket;
3714 subscript_index;
3715 subscript_right_bracket;
3716 } -> [
3717 subscript_receiver;
3718 subscript_left_bracket;
3719 subscript_index;
3720 subscript_right_bracket;
3722 | EmbeddedSubscriptExpression {
3723 embedded_subscript_receiver;
3724 embedded_subscript_left_bracket;
3725 embedded_subscript_index;
3726 embedded_subscript_right_bracket;
3727 } -> [
3728 embedded_subscript_receiver;
3729 embedded_subscript_left_bracket;
3730 embedded_subscript_index;
3731 embedded_subscript_right_bracket;
3733 | AwaitableCreationExpression {
3734 awaitable_attribute_spec;
3735 awaitable_async;
3736 awaitable_coroutine;
3737 awaitable_compound_statement;
3738 } -> [
3739 awaitable_attribute_spec;
3740 awaitable_async;
3741 awaitable_coroutine;
3742 awaitable_compound_statement;
3744 | XHPChildrenDeclaration {
3745 xhp_children_keyword;
3746 xhp_children_expression;
3747 xhp_children_semicolon;
3748 } -> [
3749 xhp_children_keyword;
3750 xhp_children_expression;
3751 xhp_children_semicolon;
3753 | XHPChildrenParenthesizedList {
3754 xhp_children_list_left_paren;
3755 xhp_children_list_xhp_children;
3756 xhp_children_list_right_paren;
3757 } -> [
3758 xhp_children_list_left_paren;
3759 xhp_children_list_xhp_children;
3760 xhp_children_list_right_paren;
3762 | XHPCategoryDeclaration {
3763 xhp_category_keyword;
3764 xhp_category_categories;
3765 xhp_category_semicolon;
3766 } -> [
3767 xhp_category_keyword;
3768 xhp_category_categories;
3769 xhp_category_semicolon;
3771 | XHPEnumType {
3772 xhp_enum_optional;
3773 xhp_enum_keyword;
3774 xhp_enum_left_brace;
3775 xhp_enum_values;
3776 xhp_enum_right_brace;
3777 } -> [
3778 xhp_enum_optional;
3779 xhp_enum_keyword;
3780 xhp_enum_left_brace;
3781 xhp_enum_values;
3782 xhp_enum_right_brace;
3784 | XHPRequired {
3785 xhp_required_at;
3786 xhp_required_keyword;
3787 } -> [
3788 xhp_required_at;
3789 xhp_required_keyword;
3791 | XHPClassAttributeDeclaration {
3792 xhp_attribute_keyword;
3793 xhp_attribute_attributes;
3794 xhp_attribute_semicolon;
3795 } -> [
3796 xhp_attribute_keyword;
3797 xhp_attribute_attributes;
3798 xhp_attribute_semicolon;
3800 | XHPClassAttribute {
3801 xhp_attribute_decl_type;
3802 xhp_attribute_decl_name;
3803 xhp_attribute_decl_initializer;
3804 xhp_attribute_decl_required;
3805 } -> [
3806 xhp_attribute_decl_type;
3807 xhp_attribute_decl_name;
3808 xhp_attribute_decl_initializer;
3809 xhp_attribute_decl_required;
3811 | XHPSimpleClassAttribute {
3812 xhp_simple_class_attribute_type;
3813 } -> [
3814 xhp_simple_class_attribute_type;
3816 | XHPSimpleAttribute {
3817 xhp_simple_attribute_name;
3818 xhp_simple_attribute_equal;
3819 xhp_simple_attribute_expression;
3820 } -> [
3821 xhp_simple_attribute_name;
3822 xhp_simple_attribute_equal;
3823 xhp_simple_attribute_expression;
3825 | XHPSpreadAttribute {
3826 xhp_spread_attribute_left_brace;
3827 xhp_spread_attribute_spread_operator;
3828 xhp_spread_attribute_expression;
3829 xhp_spread_attribute_right_brace;
3830 } -> [
3831 xhp_spread_attribute_left_brace;
3832 xhp_spread_attribute_spread_operator;
3833 xhp_spread_attribute_expression;
3834 xhp_spread_attribute_right_brace;
3836 | XHPOpen {
3837 xhp_open_left_angle;
3838 xhp_open_name;
3839 xhp_open_attributes;
3840 xhp_open_right_angle;
3841 } -> [
3842 xhp_open_left_angle;
3843 xhp_open_name;
3844 xhp_open_attributes;
3845 xhp_open_right_angle;
3847 | XHPExpression {
3848 xhp_open;
3849 xhp_body;
3850 xhp_close;
3851 } -> [
3852 xhp_open;
3853 xhp_body;
3854 xhp_close;
3856 | XHPClose {
3857 xhp_close_left_angle;
3858 xhp_close_name;
3859 xhp_close_right_angle;
3860 } -> [
3861 xhp_close_left_angle;
3862 xhp_close_name;
3863 xhp_close_right_angle;
3865 | TypeConstant {
3866 type_constant_left_type;
3867 type_constant_separator;
3868 type_constant_right_type;
3869 } -> [
3870 type_constant_left_type;
3871 type_constant_separator;
3872 type_constant_right_type;
3874 | VectorTypeSpecifier {
3875 vector_type_keyword;
3876 vector_type_left_angle;
3877 vector_type_type;
3878 vector_type_trailing_comma;
3879 vector_type_right_angle;
3880 } -> [
3881 vector_type_keyword;
3882 vector_type_left_angle;
3883 vector_type_type;
3884 vector_type_trailing_comma;
3885 vector_type_right_angle;
3887 | KeysetTypeSpecifier {
3888 keyset_type_keyword;
3889 keyset_type_left_angle;
3890 keyset_type_type;
3891 keyset_type_trailing_comma;
3892 keyset_type_right_angle;
3893 } -> [
3894 keyset_type_keyword;
3895 keyset_type_left_angle;
3896 keyset_type_type;
3897 keyset_type_trailing_comma;
3898 keyset_type_right_angle;
3900 | TupleTypeExplicitSpecifier {
3901 tuple_type_keyword;
3902 tuple_type_left_angle;
3903 tuple_type_types;
3904 tuple_type_right_angle;
3905 } -> [
3906 tuple_type_keyword;
3907 tuple_type_left_angle;
3908 tuple_type_types;
3909 tuple_type_right_angle;
3911 | VarrayTypeSpecifier {
3912 varray_keyword;
3913 varray_left_angle;
3914 varray_type;
3915 varray_trailing_comma;
3916 varray_right_angle;
3917 } -> [
3918 varray_keyword;
3919 varray_left_angle;
3920 varray_type;
3921 varray_trailing_comma;
3922 varray_right_angle;
3924 | VectorArrayTypeSpecifier {
3925 vector_array_keyword;
3926 vector_array_left_angle;
3927 vector_array_type;
3928 vector_array_right_angle;
3929 } -> [
3930 vector_array_keyword;
3931 vector_array_left_angle;
3932 vector_array_type;
3933 vector_array_right_angle;
3935 | TypeParameter {
3936 type_reified;
3937 type_variance;
3938 type_name;
3939 type_constraints;
3940 } -> [
3941 type_reified;
3942 type_variance;
3943 type_name;
3944 type_constraints;
3946 | TypeConstraint {
3947 constraint_keyword;
3948 constraint_type;
3949 } -> [
3950 constraint_keyword;
3951 constraint_type;
3953 | DarrayTypeSpecifier {
3954 darray_keyword;
3955 darray_left_angle;
3956 darray_key;
3957 darray_comma;
3958 darray_value;
3959 darray_trailing_comma;
3960 darray_right_angle;
3961 } -> [
3962 darray_keyword;
3963 darray_left_angle;
3964 darray_key;
3965 darray_comma;
3966 darray_value;
3967 darray_trailing_comma;
3968 darray_right_angle;
3970 | MapArrayTypeSpecifier {
3971 map_array_keyword;
3972 map_array_left_angle;
3973 map_array_key;
3974 map_array_comma;
3975 map_array_value;
3976 map_array_right_angle;
3977 } -> [
3978 map_array_keyword;
3979 map_array_left_angle;
3980 map_array_key;
3981 map_array_comma;
3982 map_array_value;
3983 map_array_right_angle;
3985 | DictionaryTypeSpecifier {
3986 dictionary_type_keyword;
3987 dictionary_type_left_angle;
3988 dictionary_type_members;
3989 dictionary_type_right_angle;
3990 } -> [
3991 dictionary_type_keyword;
3992 dictionary_type_left_angle;
3993 dictionary_type_members;
3994 dictionary_type_right_angle;
3996 | ClosureTypeSpecifier {
3997 closure_outer_left_paren;
3998 closure_coroutine;
3999 closure_function_keyword;
4000 closure_inner_left_paren;
4001 closure_parameter_list;
4002 closure_inner_right_paren;
4003 closure_colon;
4004 closure_return_type;
4005 closure_outer_right_paren;
4006 } -> [
4007 closure_outer_left_paren;
4008 closure_coroutine;
4009 closure_function_keyword;
4010 closure_inner_left_paren;
4011 closure_parameter_list;
4012 closure_inner_right_paren;
4013 closure_colon;
4014 closure_return_type;
4015 closure_outer_right_paren;
4017 | ClosureParameterTypeSpecifier {
4018 closure_parameter_call_convention;
4019 closure_parameter_type;
4020 } -> [
4021 closure_parameter_call_convention;
4022 closure_parameter_type;
4024 | ClassnameTypeSpecifier {
4025 classname_keyword;
4026 classname_left_angle;
4027 classname_type;
4028 classname_trailing_comma;
4029 classname_right_angle;
4030 } -> [
4031 classname_keyword;
4032 classname_left_angle;
4033 classname_type;
4034 classname_trailing_comma;
4035 classname_right_angle;
4037 | FieldSpecifier {
4038 field_question;
4039 field_name;
4040 field_arrow;
4041 field_type;
4042 } -> [
4043 field_question;
4044 field_name;
4045 field_arrow;
4046 field_type;
4048 | FieldInitializer {
4049 field_initializer_name;
4050 field_initializer_arrow;
4051 field_initializer_value;
4052 } -> [
4053 field_initializer_name;
4054 field_initializer_arrow;
4055 field_initializer_value;
4057 | ShapeTypeSpecifier {
4058 shape_type_keyword;
4059 shape_type_left_paren;
4060 shape_type_fields;
4061 shape_type_ellipsis;
4062 shape_type_right_paren;
4063 } -> [
4064 shape_type_keyword;
4065 shape_type_left_paren;
4066 shape_type_fields;
4067 shape_type_ellipsis;
4068 shape_type_right_paren;
4070 | ShapeExpression {
4071 shape_expression_keyword;
4072 shape_expression_left_paren;
4073 shape_expression_fields;
4074 shape_expression_right_paren;
4075 } -> [
4076 shape_expression_keyword;
4077 shape_expression_left_paren;
4078 shape_expression_fields;
4079 shape_expression_right_paren;
4081 | TupleExpression {
4082 tuple_expression_keyword;
4083 tuple_expression_left_paren;
4084 tuple_expression_items;
4085 tuple_expression_right_paren;
4086 } -> [
4087 tuple_expression_keyword;
4088 tuple_expression_left_paren;
4089 tuple_expression_items;
4090 tuple_expression_right_paren;
4092 | GenericTypeSpecifier {
4093 generic_class_type;
4094 generic_argument_list;
4095 } -> [
4096 generic_class_type;
4097 generic_argument_list;
4099 | NullableTypeSpecifier {
4100 nullable_question;
4101 nullable_type;
4102 } -> [
4103 nullable_question;
4104 nullable_type;
4106 | SoftTypeSpecifier {
4107 soft_at;
4108 soft_type;
4109 } -> [
4110 soft_at;
4111 soft_type;
4113 | ReifiedTypeArgument {
4114 reified_type_argument_reified;
4115 reified_type_argument_type;
4116 } -> [
4117 reified_type_argument_reified;
4118 reified_type_argument_type;
4120 | TypeArguments {
4121 type_arguments_left_angle;
4122 type_arguments_types;
4123 type_arguments_right_angle;
4124 } -> [
4125 type_arguments_left_angle;
4126 type_arguments_types;
4127 type_arguments_right_angle;
4129 | TypeParameters {
4130 type_parameters_left_angle;
4131 type_parameters_parameters;
4132 type_parameters_right_angle;
4133 } -> [
4134 type_parameters_left_angle;
4135 type_parameters_parameters;
4136 type_parameters_right_angle;
4138 | TupleTypeSpecifier {
4139 tuple_left_paren;
4140 tuple_types;
4141 tuple_right_paren;
4142 } -> [
4143 tuple_left_paren;
4144 tuple_types;
4145 tuple_right_paren;
4147 | ErrorSyntax {
4148 error_error;
4149 } -> [
4150 error_error;
4152 | ListItem {
4153 list_item;
4154 list_separator;
4155 } -> [
4156 list_item;
4157 list_separator;
4161 let children node =
4162 children_from_syntax node.syntax
4164 let children_names node =
4165 match node.syntax with
4166 | Missing -> []
4167 | Token _ -> []
4168 | SyntaxList _ -> []
4169 | EndOfFile {
4170 end_of_file_token;
4171 } -> [
4172 "end_of_file_token";
4174 | Script {
4175 script_declarations;
4176 } -> [
4177 "script_declarations";
4179 | QualifiedName {
4180 qualified_name_parts;
4181 } -> [
4182 "qualified_name_parts";
4184 | SimpleTypeSpecifier {
4185 simple_type_specifier;
4186 } -> [
4187 "simple_type_specifier";
4189 | LiteralExpression {
4190 literal_expression;
4191 } -> [
4192 "literal_expression";
4194 | PrefixedStringExpression {
4195 prefixed_string_name;
4196 prefixed_string_str;
4197 } -> [
4198 "prefixed_string_name";
4199 "prefixed_string_str";
4201 | VariableExpression {
4202 variable_expression;
4203 } -> [
4204 "variable_expression";
4206 | PipeVariableExpression {
4207 pipe_variable_expression;
4208 } -> [
4209 "pipe_variable_expression";
4211 | EnumDeclaration {
4212 enum_attribute_spec;
4213 enum_keyword;
4214 enum_name;
4215 enum_colon;
4216 enum_base;
4217 enum_type;
4218 enum_left_brace;
4219 enum_enumerators;
4220 enum_right_brace;
4221 } -> [
4222 "enum_attribute_spec";
4223 "enum_keyword";
4224 "enum_name";
4225 "enum_colon";
4226 "enum_base";
4227 "enum_type";
4228 "enum_left_brace";
4229 "enum_enumerators";
4230 "enum_right_brace";
4232 | Enumerator {
4233 enumerator_name;
4234 enumerator_equal;
4235 enumerator_value;
4236 enumerator_semicolon;
4237 } -> [
4238 "enumerator_name";
4239 "enumerator_equal";
4240 "enumerator_value";
4241 "enumerator_semicolon";
4243 | AliasDeclaration {
4244 alias_attribute_spec;
4245 alias_keyword;
4246 alias_name;
4247 alias_generic_parameter;
4248 alias_constraint;
4249 alias_equal;
4250 alias_type;
4251 alias_semicolon;
4252 } -> [
4253 "alias_attribute_spec";
4254 "alias_keyword";
4255 "alias_name";
4256 "alias_generic_parameter";
4257 "alias_constraint";
4258 "alias_equal";
4259 "alias_type";
4260 "alias_semicolon";
4262 | PropertyDeclaration {
4263 property_attribute_spec;
4264 property_modifiers;
4265 property_type;
4266 property_declarators;
4267 property_semicolon;
4268 } -> [
4269 "property_attribute_spec";
4270 "property_modifiers";
4271 "property_type";
4272 "property_declarators";
4273 "property_semicolon";
4275 | PropertyDeclarator {
4276 property_name;
4277 property_initializer;
4278 } -> [
4279 "property_name";
4280 "property_initializer";
4282 | NamespaceDeclaration {
4283 namespace_keyword;
4284 namespace_name;
4285 namespace_body;
4286 } -> [
4287 "namespace_keyword";
4288 "namespace_name";
4289 "namespace_body";
4291 | NamespaceBody {
4292 namespace_left_brace;
4293 namespace_declarations;
4294 namespace_right_brace;
4295 } -> [
4296 "namespace_left_brace";
4297 "namespace_declarations";
4298 "namespace_right_brace";
4300 | NamespaceEmptyBody {
4301 namespace_semicolon;
4302 } -> [
4303 "namespace_semicolon";
4305 | NamespaceUseDeclaration {
4306 namespace_use_keyword;
4307 namespace_use_kind;
4308 namespace_use_clauses;
4309 namespace_use_semicolon;
4310 } -> [
4311 "namespace_use_keyword";
4312 "namespace_use_kind";
4313 "namespace_use_clauses";
4314 "namespace_use_semicolon";
4316 | NamespaceGroupUseDeclaration {
4317 namespace_group_use_keyword;
4318 namespace_group_use_kind;
4319 namespace_group_use_prefix;
4320 namespace_group_use_left_brace;
4321 namespace_group_use_clauses;
4322 namespace_group_use_right_brace;
4323 namespace_group_use_semicolon;
4324 } -> [
4325 "namespace_group_use_keyword";
4326 "namespace_group_use_kind";
4327 "namespace_group_use_prefix";
4328 "namespace_group_use_left_brace";
4329 "namespace_group_use_clauses";
4330 "namespace_group_use_right_brace";
4331 "namespace_group_use_semicolon";
4333 | NamespaceUseClause {
4334 namespace_use_clause_kind;
4335 namespace_use_name;
4336 namespace_use_as;
4337 namespace_use_alias;
4338 } -> [
4339 "namespace_use_clause_kind";
4340 "namespace_use_name";
4341 "namespace_use_as";
4342 "namespace_use_alias";
4344 | FunctionDeclaration {
4345 function_attribute_spec;
4346 function_declaration_header;
4347 function_body;
4348 } -> [
4349 "function_attribute_spec";
4350 "function_declaration_header";
4351 "function_body";
4353 | FunctionDeclarationHeader {
4354 function_modifiers;
4355 function_keyword;
4356 function_ampersand;
4357 function_name;
4358 function_type_parameter_list;
4359 function_left_paren;
4360 function_parameter_list;
4361 function_right_paren;
4362 function_colon;
4363 function_type;
4364 function_where_clause;
4365 } -> [
4366 "function_modifiers";
4367 "function_keyword";
4368 "function_ampersand";
4369 "function_name";
4370 "function_type_parameter_list";
4371 "function_left_paren";
4372 "function_parameter_list";
4373 "function_right_paren";
4374 "function_colon";
4375 "function_type";
4376 "function_where_clause";
4378 | WhereClause {
4379 where_clause_keyword;
4380 where_clause_constraints;
4381 } -> [
4382 "where_clause_keyword";
4383 "where_clause_constraints";
4385 | WhereConstraint {
4386 where_constraint_left_type;
4387 where_constraint_operator;
4388 where_constraint_right_type;
4389 } -> [
4390 "where_constraint_left_type";
4391 "where_constraint_operator";
4392 "where_constraint_right_type";
4394 | MethodishDeclaration {
4395 methodish_attribute;
4396 methodish_function_decl_header;
4397 methodish_function_body;
4398 methodish_semicolon;
4399 } -> [
4400 "methodish_attribute";
4401 "methodish_function_decl_header";
4402 "methodish_function_body";
4403 "methodish_semicolon";
4405 | ClassishDeclaration {
4406 classish_attribute;
4407 classish_modifiers;
4408 classish_keyword;
4409 classish_name;
4410 classish_type_parameters;
4411 classish_extends_keyword;
4412 classish_extends_list;
4413 classish_implements_keyword;
4414 classish_implements_list;
4415 classish_body;
4416 } -> [
4417 "classish_attribute";
4418 "classish_modifiers";
4419 "classish_keyword";
4420 "classish_name";
4421 "classish_type_parameters";
4422 "classish_extends_keyword";
4423 "classish_extends_list";
4424 "classish_implements_keyword";
4425 "classish_implements_list";
4426 "classish_body";
4428 | ClassishBody {
4429 classish_body_left_brace;
4430 classish_body_elements;
4431 classish_body_right_brace;
4432 } -> [
4433 "classish_body_left_brace";
4434 "classish_body_elements";
4435 "classish_body_right_brace";
4437 | TraitUsePrecedenceItem {
4438 trait_use_precedence_item_name;
4439 trait_use_precedence_item_keyword;
4440 trait_use_precedence_item_removed_names;
4441 } -> [
4442 "trait_use_precedence_item_name";
4443 "trait_use_precedence_item_keyword";
4444 "trait_use_precedence_item_removed_names";
4446 | TraitUseAliasItem {
4447 trait_use_alias_item_aliasing_name;
4448 trait_use_alias_item_keyword;
4449 trait_use_alias_item_modifiers;
4450 trait_use_alias_item_aliased_name;
4451 } -> [
4452 "trait_use_alias_item_aliasing_name";
4453 "trait_use_alias_item_keyword";
4454 "trait_use_alias_item_modifiers";
4455 "trait_use_alias_item_aliased_name";
4457 | TraitUseConflictResolution {
4458 trait_use_conflict_resolution_keyword;
4459 trait_use_conflict_resolution_names;
4460 trait_use_conflict_resolution_left_brace;
4461 trait_use_conflict_resolution_clauses;
4462 trait_use_conflict_resolution_right_brace;
4463 } -> [
4464 "trait_use_conflict_resolution_keyword";
4465 "trait_use_conflict_resolution_names";
4466 "trait_use_conflict_resolution_left_brace";
4467 "trait_use_conflict_resolution_clauses";
4468 "trait_use_conflict_resolution_right_brace";
4470 | TraitUse {
4471 trait_use_keyword;
4472 trait_use_names;
4473 trait_use_semicolon;
4474 } -> [
4475 "trait_use_keyword";
4476 "trait_use_names";
4477 "trait_use_semicolon";
4479 | RequireClause {
4480 require_keyword;
4481 require_kind;
4482 require_name;
4483 require_semicolon;
4484 } -> [
4485 "require_keyword";
4486 "require_kind";
4487 "require_name";
4488 "require_semicolon";
4490 | ConstDeclaration {
4491 const_visibility;
4492 const_abstract;
4493 const_keyword;
4494 const_type_specifier;
4495 const_declarators;
4496 const_semicolon;
4497 } -> [
4498 "const_visibility";
4499 "const_abstract";
4500 "const_keyword";
4501 "const_type_specifier";
4502 "const_declarators";
4503 "const_semicolon";
4505 | ConstantDeclarator {
4506 constant_declarator_name;
4507 constant_declarator_initializer;
4508 } -> [
4509 "constant_declarator_name";
4510 "constant_declarator_initializer";
4512 | TypeConstDeclaration {
4513 type_const_abstract;
4514 type_const_keyword;
4515 type_const_type_keyword;
4516 type_const_name;
4517 type_const_type_parameters;
4518 type_const_type_constraint;
4519 type_const_equal;
4520 type_const_type_specifier;
4521 type_const_semicolon;
4522 } -> [
4523 "type_const_abstract";
4524 "type_const_keyword";
4525 "type_const_type_keyword";
4526 "type_const_name";
4527 "type_const_type_parameters";
4528 "type_const_type_constraint";
4529 "type_const_equal";
4530 "type_const_type_specifier";
4531 "type_const_semicolon";
4533 | DecoratedExpression {
4534 decorated_expression_decorator;
4535 decorated_expression_expression;
4536 } -> [
4537 "decorated_expression_decorator";
4538 "decorated_expression_expression";
4540 | ParameterDeclaration {
4541 parameter_attribute;
4542 parameter_visibility;
4543 parameter_call_convention;
4544 parameter_type;
4545 parameter_name;
4546 parameter_default_value;
4547 } -> [
4548 "parameter_attribute";
4549 "parameter_visibility";
4550 "parameter_call_convention";
4551 "parameter_type";
4552 "parameter_name";
4553 "parameter_default_value";
4555 | VariadicParameter {
4556 variadic_parameter_call_convention;
4557 variadic_parameter_type;
4558 variadic_parameter_ellipsis;
4559 } -> [
4560 "variadic_parameter_call_convention";
4561 "variadic_parameter_type";
4562 "variadic_parameter_ellipsis";
4564 | AttributeSpecification {
4565 attribute_specification_left_double_angle;
4566 attribute_specification_attributes;
4567 attribute_specification_right_double_angle;
4568 } -> [
4569 "attribute_specification_left_double_angle";
4570 "attribute_specification_attributes";
4571 "attribute_specification_right_double_angle";
4573 | InclusionExpression {
4574 inclusion_require;
4575 inclusion_filename;
4576 } -> [
4577 "inclusion_require";
4578 "inclusion_filename";
4580 | InclusionDirective {
4581 inclusion_expression;
4582 inclusion_semicolon;
4583 } -> [
4584 "inclusion_expression";
4585 "inclusion_semicolon";
4587 | CompoundStatement {
4588 compound_left_brace;
4589 compound_statements;
4590 compound_right_brace;
4591 } -> [
4592 "compound_left_brace";
4593 "compound_statements";
4594 "compound_right_brace";
4596 | AlternateLoopStatement {
4597 alternate_loop_opening_colon;
4598 alternate_loop_statements;
4599 alternate_loop_closing_keyword;
4600 alternate_loop_closing_semicolon;
4601 } -> [
4602 "alternate_loop_opening_colon";
4603 "alternate_loop_statements";
4604 "alternate_loop_closing_keyword";
4605 "alternate_loop_closing_semicolon";
4607 | ExpressionStatement {
4608 expression_statement_expression;
4609 expression_statement_semicolon;
4610 } -> [
4611 "expression_statement_expression";
4612 "expression_statement_semicolon";
4614 | MarkupSection {
4615 markup_prefix;
4616 markup_text;
4617 markup_suffix;
4618 markup_expression;
4619 } -> [
4620 "markup_prefix";
4621 "markup_text";
4622 "markup_suffix";
4623 "markup_expression";
4625 | MarkupSuffix {
4626 markup_suffix_less_than_question;
4627 markup_suffix_name;
4628 } -> [
4629 "markup_suffix_less_than_question";
4630 "markup_suffix_name";
4632 | UnsetStatement {
4633 unset_keyword;
4634 unset_left_paren;
4635 unset_variables;
4636 unset_right_paren;
4637 unset_semicolon;
4638 } -> [
4639 "unset_keyword";
4640 "unset_left_paren";
4641 "unset_variables";
4642 "unset_right_paren";
4643 "unset_semicolon";
4645 | LetStatement {
4646 let_statement_keyword;
4647 let_statement_name;
4648 let_statement_colon;
4649 let_statement_type;
4650 let_statement_initializer;
4651 let_statement_semicolon;
4652 } -> [
4653 "let_statement_keyword";
4654 "let_statement_name";
4655 "let_statement_colon";
4656 "let_statement_type";
4657 "let_statement_initializer";
4658 "let_statement_semicolon";
4660 | UsingStatementBlockScoped {
4661 using_block_await_keyword;
4662 using_block_using_keyword;
4663 using_block_left_paren;
4664 using_block_expressions;
4665 using_block_right_paren;
4666 using_block_body;
4667 } -> [
4668 "using_block_await_keyword";
4669 "using_block_using_keyword";
4670 "using_block_left_paren";
4671 "using_block_expressions";
4672 "using_block_right_paren";
4673 "using_block_body";
4675 | UsingStatementFunctionScoped {
4676 using_function_await_keyword;
4677 using_function_using_keyword;
4678 using_function_expression;
4679 using_function_semicolon;
4680 } -> [
4681 "using_function_await_keyword";
4682 "using_function_using_keyword";
4683 "using_function_expression";
4684 "using_function_semicolon";
4686 | DeclareDirectiveStatement {
4687 declare_directive_keyword;
4688 declare_directive_left_paren;
4689 declare_directive_expression;
4690 declare_directive_right_paren;
4691 declare_directive_semicolon;
4692 } -> [
4693 "declare_directive_keyword";
4694 "declare_directive_left_paren";
4695 "declare_directive_expression";
4696 "declare_directive_right_paren";
4697 "declare_directive_semicolon";
4699 | DeclareBlockStatement {
4700 declare_block_keyword;
4701 declare_block_left_paren;
4702 declare_block_expression;
4703 declare_block_right_paren;
4704 declare_block_body;
4705 } -> [
4706 "declare_block_keyword";
4707 "declare_block_left_paren";
4708 "declare_block_expression";
4709 "declare_block_right_paren";
4710 "declare_block_body";
4712 | WhileStatement {
4713 while_keyword;
4714 while_left_paren;
4715 while_condition;
4716 while_right_paren;
4717 while_body;
4718 } -> [
4719 "while_keyword";
4720 "while_left_paren";
4721 "while_condition";
4722 "while_right_paren";
4723 "while_body";
4725 | IfStatement {
4726 if_keyword;
4727 if_left_paren;
4728 if_condition;
4729 if_right_paren;
4730 if_statement;
4731 if_elseif_clauses;
4732 if_else_clause;
4733 } -> [
4734 "if_keyword";
4735 "if_left_paren";
4736 "if_condition";
4737 "if_right_paren";
4738 "if_statement";
4739 "if_elseif_clauses";
4740 "if_else_clause";
4742 | ElseifClause {
4743 elseif_keyword;
4744 elseif_left_paren;
4745 elseif_condition;
4746 elseif_right_paren;
4747 elseif_statement;
4748 } -> [
4749 "elseif_keyword";
4750 "elseif_left_paren";
4751 "elseif_condition";
4752 "elseif_right_paren";
4753 "elseif_statement";
4755 | ElseClause {
4756 else_keyword;
4757 else_statement;
4758 } -> [
4759 "else_keyword";
4760 "else_statement";
4762 | AlternateIfStatement {
4763 alternate_if_keyword;
4764 alternate_if_left_paren;
4765 alternate_if_condition;
4766 alternate_if_right_paren;
4767 alternate_if_colon;
4768 alternate_if_statement;
4769 alternate_if_elseif_clauses;
4770 alternate_if_else_clause;
4771 alternate_if_endif_keyword;
4772 alternate_if_semicolon;
4773 } -> [
4774 "alternate_if_keyword";
4775 "alternate_if_left_paren";
4776 "alternate_if_condition";
4777 "alternate_if_right_paren";
4778 "alternate_if_colon";
4779 "alternate_if_statement";
4780 "alternate_if_elseif_clauses";
4781 "alternate_if_else_clause";
4782 "alternate_if_endif_keyword";
4783 "alternate_if_semicolon";
4785 | AlternateElseifClause {
4786 alternate_elseif_keyword;
4787 alternate_elseif_left_paren;
4788 alternate_elseif_condition;
4789 alternate_elseif_right_paren;
4790 alternate_elseif_colon;
4791 alternate_elseif_statement;
4792 } -> [
4793 "alternate_elseif_keyword";
4794 "alternate_elseif_left_paren";
4795 "alternate_elseif_condition";
4796 "alternate_elseif_right_paren";
4797 "alternate_elseif_colon";
4798 "alternate_elseif_statement";
4800 | AlternateElseClause {
4801 alternate_else_keyword;
4802 alternate_else_colon;
4803 alternate_else_statement;
4804 } -> [
4805 "alternate_else_keyword";
4806 "alternate_else_colon";
4807 "alternate_else_statement";
4809 | TryStatement {
4810 try_keyword;
4811 try_compound_statement;
4812 try_catch_clauses;
4813 try_finally_clause;
4814 } -> [
4815 "try_keyword";
4816 "try_compound_statement";
4817 "try_catch_clauses";
4818 "try_finally_clause";
4820 | CatchClause {
4821 catch_keyword;
4822 catch_left_paren;
4823 catch_type;
4824 catch_variable;
4825 catch_right_paren;
4826 catch_body;
4827 } -> [
4828 "catch_keyword";
4829 "catch_left_paren";
4830 "catch_type";
4831 "catch_variable";
4832 "catch_right_paren";
4833 "catch_body";
4835 | FinallyClause {
4836 finally_keyword;
4837 finally_body;
4838 } -> [
4839 "finally_keyword";
4840 "finally_body";
4842 | DoStatement {
4843 do_keyword;
4844 do_body;
4845 do_while_keyword;
4846 do_left_paren;
4847 do_condition;
4848 do_right_paren;
4849 do_semicolon;
4850 } -> [
4851 "do_keyword";
4852 "do_body";
4853 "do_while_keyword";
4854 "do_left_paren";
4855 "do_condition";
4856 "do_right_paren";
4857 "do_semicolon";
4859 | ForStatement {
4860 for_keyword;
4861 for_left_paren;
4862 for_initializer;
4863 for_first_semicolon;
4864 for_control;
4865 for_second_semicolon;
4866 for_end_of_loop;
4867 for_right_paren;
4868 for_body;
4869 } -> [
4870 "for_keyword";
4871 "for_left_paren";
4872 "for_initializer";
4873 "for_first_semicolon";
4874 "for_control";
4875 "for_second_semicolon";
4876 "for_end_of_loop";
4877 "for_right_paren";
4878 "for_body";
4880 | ForeachStatement {
4881 foreach_keyword;
4882 foreach_left_paren;
4883 foreach_collection;
4884 foreach_await_keyword;
4885 foreach_as;
4886 foreach_key;
4887 foreach_arrow;
4888 foreach_value;
4889 foreach_right_paren;
4890 foreach_body;
4891 } -> [
4892 "foreach_keyword";
4893 "foreach_left_paren";
4894 "foreach_collection";
4895 "foreach_await_keyword";
4896 "foreach_as";
4897 "foreach_key";
4898 "foreach_arrow";
4899 "foreach_value";
4900 "foreach_right_paren";
4901 "foreach_body";
4903 | SwitchStatement {
4904 switch_keyword;
4905 switch_left_paren;
4906 switch_expression;
4907 switch_right_paren;
4908 switch_left_brace;
4909 switch_sections;
4910 switch_right_brace;
4911 } -> [
4912 "switch_keyword";
4913 "switch_left_paren";
4914 "switch_expression";
4915 "switch_right_paren";
4916 "switch_left_brace";
4917 "switch_sections";
4918 "switch_right_brace";
4920 | AlternateSwitchStatement {
4921 alternate_switch_keyword;
4922 alternate_switch_left_paren;
4923 alternate_switch_expression;
4924 alternate_switch_right_paren;
4925 alternate_switch_opening_colon;
4926 alternate_switch_sections;
4927 alternate_switch_closing_endswitch;
4928 alternate_switch_closing_semicolon;
4929 } -> [
4930 "alternate_switch_keyword";
4931 "alternate_switch_left_paren";
4932 "alternate_switch_expression";
4933 "alternate_switch_right_paren";
4934 "alternate_switch_opening_colon";
4935 "alternate_switch_sections";
4936 "alternate_switch_closing_endswitch";
4937 "alternate_switch_closing_semicolon";
4939 | SwitchSection {
4940 switch_section_labels;
4941 switch_section_statements;
4942 switch_section_fallthrough;
4943 } -> [
4944 "switch_section_labels";
4945 "switch_section_statements";
4946 "switch_section_fallthrough";
4948 | SwitchFallthrough {
4949 fallthrough_keyword;
4950 fallthrough_semicolon;
4951 } -> [
4952 "fallthrough_keyword";
4953 "fallthrough_semicolon";
4955 | CaseLabel {
4956 case_keyword;
4957 case_expression;
4958 case_colon;
4959 } -> [
4960 "case_keyword";
4961 "case_expression";
4962 "case_colon";
4964 | DefaultLabel {
4965 default_keyword;
4966 default_colon;
4967 } -> [
4968 "default_keyword";
4969 "default_colon";
4971 | ReturnStatement {
4972 return_keyword;
4973 return_expression;
4974 return_semicolon;
4975 } -> [
4976 "return_keyword";
4977 "return_expression";
4978 "return_semicolon";
4980 | GotoLabel {
4981 goto_label_name;
4982 goto_label_colon;
4983 } -> [
4984 "goto_label_name";
4985 "goto_label_colon";
4987 | GotoStatement {
4988 goto_statement_keyword;
4989 goto_statement_label_name;
4990 goto_statement_semicolon;
4991 } -> [
4992 "goto_statement_keyword";
4993 "goto_statement_label_name";
4994 "goto_statement_semicolon";
4996 | ThrowStatement {
4997 throw_keyword;
4998 throw_expression;
4999 throw_semicolon;
5000 } -> [
5001 "throw_keyword";
5002 "throw_expression";
5003 "throw_semicolon";
5005 | BreakStatement {
5006 break_keyword;
5007 break_level;
5008 break_semicolon;
5009 } -> [
5010 "break_keyword";
5011 "break_level";
5012 "break_semicolon";
5014 | ContinueStatement {
5015 continue_keyword;
5016 continue_level;
5017 continue_semicolon;
5018 } -> [
5019 "continue_keyword";
5020 "continue_level";
5021 "continue_semicolon";
5023 | FunctionStaticStatement {
5024 static_static_keyword;
5025 static_declarations;
5026 static_semicolon;
5027 } -> [
5028 "static_static_keyword";
5029 "static_declarations";
5030 "static_semicolon";
5032 | StaticDeclarator {
5033 static_name;
5034 static_initializer;
5035 } -> [
5036 "static_name";
5037 "static_initializer";
5039 | EchoStatement {
5040 echo_keyword;
5041 echo_expressions;
5042 echo_semicolon;
5043 } -> [
5044 "echo_keyword";
5045 "echo_expressions";
5046 "echo_semicolon";
5048 | GlobalStatement {
5049 global_keyword;
5050 global_variables;
5051 global_semicolon;
5052 } -> [
5053 "global_keyword";
5054 "global_variables";
5055 "global_semicolon";
5057 | SimpleInitializer {
5058 simple_initializer_equal;
5059 simple_initializer_value;
5060 } -> [
5061 "simple_initializer_equal";
5062 "simple_initializer_value";
5064 | AnonymousClass {
5065 anonymous_class_class_keyword;
5066 anonymous_class_left_paren;
5067 anonymous_class_argument_list;
5068 anonymous_class_right_paren;
5069 anonymous_class_extends_keyword;
5070 anonymous_class_extends_list;
5071 anonymous_class_implements_keyword;
5072 anonymous_class_implements_list;
5073 anonymous_class_body;
5074 } -> [
5075 "anonymous_class_class_keyword";
5076 "anonymous_class_left_paren";
5077 "anonymous_class_argument_list";
5078 "anonymous_class_right_paren";
5079 "anonymous_class_extends_keyword";
5080 "anonymous_class_extends_list";
5081 "anonymous_class_implements_keyword";
5082 "anonymous_class_implements_list";
5083 "anonymous_class_body";
5085 | AnonymousFunction {
5086 anonymous_attribute_spec;
5087 anonymous_static_keyword;
5088 anonymous_async_keyword;
5089 anonymous_coroutine_keyword;
5090 anonymous_function_keyword;
5091 anonymous_ampersand;
5092 anonymous_left_paren;
5093 anonymous_parameters;
5094 anonymous_right_paren;
5095 anonymous_colon;
5096 anonymous_type;
5097 anonymous_use;
5098 anonymous_body;
5099 } -> [
5100 "anonymous_attribute_spec";
5101 "anonymous_static_keyword";
5102 "anonymous_async_keyword";
5103 "anonymous_coroutine_keyword";
5104 "anonymous_function_keyword";
5105 "anonymous_ampersand";
5106 "anonymous_left_paren";
5107 "anonymous_parameters";
5108 "anonymous_right_paren";
5109 "anonymous_colon";
5110 "anonymous_type";
5111 "anonymous_use";
5112 "anonymous_body";
5114 | Php7AnonymousFunction {
5115 php7_anonymous_attribute_spec;
5116 php7_anonymous_static_keyword;
5117 php7_anonymous_async_keyword;
5118 php7_anonymous_coroutine_keyword;
5119 php7_anonymous_function_keyword;
5120 php7_anonymous_ampersand;
5121 php7_anonymous_left_paren;
5122 php7_anonymous_parameters;
5123 php7_anonymous_right_paren;
5124 php7_anonymous_use;
5125 php7_anonymous_colon;
5126 php7_anonymous_type;
5127 php7_anonymous_body;
5128 } -> [
5129 "php7_anonymous_attribute_spec";
5130 "php7_anonymous_static_keyword";
5131 "php7_anonymous_async_keyword";
5132 "php7_anonymous_coroutine_keyword";
5133 "php7_anonymous_function_keyword";
5134 "php7_anonymous_ampersand";
5135 "php7_anonymous_left_paren";
5136 "php7_anonymous_parameters";
5137 "php7_anonymous_right_paren";
5138 "php7_anonymous_use";
5139 "php7_anonymous_colon";
5140 "php7_anonymous_type";
5141 "php7_anonymous_body";
5143 | AnonymousFunctionUseClause {
5144 anonymous_use_keyword;
5145 anonymous_use_left_paren;
5146 anonymous_use_variables;
5147 anonymous_use_right_paren;
5148 } -> [
5149 "anonymous_use_keyword";
5150 "anonymous_use_left_paren";
5151 "anonymous_use_variables";
5152 "anonymous_use_right_paren";
5154 | LambdaExpression {
5155 lambda_attribute_spec;
5156 lambda_async;
5157 lambda_coroutine;
5158 lambda_signature;
5159 lambda_arrow;
5160 lambda_body;
5161 } -> [
5162 "lambda_attribute_spec";
5163 "lambda_async";
5164 "lambda_coroutine";
5165 "lambda_signature";
5166 "lambda_arrow";
5167 "lambda_body";
5169 | LambdaSignature {
5170 lambda_left_paren;
5171 lambda_parameters;
5172 lambda_right_paren;
5173 lambda_colon;
5174 lambda_type;
5175 } -> [
5176 "lambda_left_paren";
5177 "lambda_parameters";
5178 "lambda_right_paren";
5179 "lambda_colon";
5180 "lambda_type";
5182 | CastExpression {
5183 cast_left_paren;
5184 cast_type;
5185 cast_right_paren;
5186 cast_operand;
5187 } -> [
5188 "cast_left_paren";
5189 "cast_type";
5190 "cast_right_paren";
5191 "cast_operand";
5193 | ScopeResolutionExpression {
5194 scope_resolution_qualifier;
5195 scope_resolution_operator;
5196 scope_resolution_name;
5197 } -> [
5198 "scope_resolution_qualifier";
5199 "scope_resolution_operator";
5200 "scope_resolution_name";
5202 | MemberSelectionExpression {
5203 member_object;
5204 member_operator;
5205 member_name;
5206 } -> [
5207 "member_object";
5208 "member_operator";
5209 "member_name";
5211 | SafeMemberSelectionExpression {
5212 safe_member_object;
5213 safe_member_operator;
5214 safe_member_name;
5215 } -> [
5216 "safe_member_object";
5217 "safe_member_operator";
5218 "safe_member_name";
5220 | EmbeddedMemberSelectionExpression {
5221 embedded_member_object;
5222 embedded_member_operator;
5223 embedded_member_name;
5224 } -> [
5225 "embedded_member_object";
5226 "embedded_member_operator";
5227 "embedded_member_name";
5229 | YieldExpression {
5230 yield_keyword;
5231 yield_operand;
5232 } -> [
5233 "yield_keyword";
5234 "yield_operand";
5236 | YieldFromExpression {
5237 yield_from_yield_keyword;
5238 yield_from_from_keyword;
5239 yield_from_operand;
5240 } -> [
5241 "yield_from_yield_keyword";
5242 "yield_from_from_keyword";
5243 "yield_from_operand";
5245 | PrefixUnaryExpression {
5246 prefix_unary_operator;
5247 prefix_unary_operand;
5248 } -> [
5249 "prefix_unary_operator";
5250 "prefix_unary_operand";
5252 | PostfixUnaryExpression {
5253 postfix_unary_operand;
5254 postfix_unary_operator;
5255 } -> [
5256 "postfix_unary_operand";
5257 "postfix_unary_operator";
5259 | BinaryExpression {
5260 binary_left_operand;
5261 binary_operator;
5262 binary_right_operand;
5263 } -> [
5264 "binary_left_operand";
5265 "binary_operator";
5266 "binary_right_operand";
5268 | InstanceofExpression {
5269 instanceof_left_operand;
5270 instanceof_operator;
5271 instanceof_right_operand;
5272 } -> [
5273 "instanceof_left_operand";
5274 "instanceof_operator";
5275 "instanceof_right_operand";
5277 | IsExpression {
5278 is_left_operand;
5279 is_operator;
5280 is_right_operand;
5281 } -> [
5282 "is_left_operand";
5283 "is_operator";
5284 "is_right_operand";
5286 | AsExpression {
5287 as_left_operand;
5288 as_operator;
5289 as_right_operand;
5290 } -> [
5291 "as_left_operand";
5292 "as_operator";
5293 "as_right_operand";
5295 | NullableAsExpression {
5296 nullable_as_left_operand;
5297 nullable_as_operator;
5298 nullable_as_right_operand;
5299 } -> [
5300 "nullable_as_left_operand";
5301 "nullable_as_operator";
5302 "nullable_as_right_operand";
5304 | ConditionalExpression {
5305 conditional_test;
5306 conditional_question;
5307 conditional_consequence;
5308 conditional_colon;
5309 conditional_alternative;
5310 } -> [
5311 "conditional_test";
5312 "conditional_question";
5313 "conditional_consequence";
5314 "conditional_colon";
5315 "conditional_alternative";
5317 | EvalExpression {
5318 eval_keyword;
5319 eval_left_paren;
5320 eval_argument;
5321 eval_right_paren;
5322 } -> [
5323 "eval_keyword";
5324 "eval_left_paren";
5325 "eval_argument";
5326 "eval_right_paren";
5328 | EmptyExpression {
5329 empty_keyword;
5330 empty_left_paren;
5331 empty_argument;
5332 empty_right_paren;
5333 } -> [
5334 "empty_keyword";
5335 "empty_left_paren";
5336 "empty_argument";
5337 "empty_right_paren";
5339 | DefineExpression {
5340 define_keyword;
5341 define_left_paren;
5342 define_argument_list;
5343 define_right_paren;
5344 } -> [
5345 "define_keyword";
5346 "define_left_paren";
5347 "define_argument_list";
5348 "define_right_paren";
5350 | HaltCompilerExpression {
5351 halt_compiler_keyword;
5352 halt_compiler_left_paren;
5353 halt_compiler_argument_list;
5354 halt_compiler_right_paren;
5355 } -> [
5356 "halt_compiler_keyword";
5357 "halt_compiler_left_paren";
5358 "halt_compiler_argument_list";
5359 "halt_compiler_right_paren";
5361 | IssetExpression {
5362 isset_keyword;
5363 isset_left_paren;
5364 isset_argument_list;
5365 isset_right_paren;
5366 } -> [
5367 "isset_keyword";
5368 "isset_left_paren";
5369 "isset_argument_list";
5370 "isset_right_paren";
5372 | FunctionCallExpression {
5373 function_call_receiver;
5374 function_call_left_paren;
5375 function_call_argument_list;
5376 function_call_right_paren;
5377 } -> [
5378 "function_call_receiver";
5379 "function_call_left_paren";
5380 "function_call_argument_list";
5381 "function_call_right_paren";
5383 | FunctionCallWithTypeArgumentsExpression {
5384 function_call_with_type_arguments_receiver;
5385 function_call_with_type_arguments_type_args;
5386 function_call_with_type_arguments_left_paren;
5387 function_call_with_type_arguments_argument_list;
5388 function_call_with_type_arguments_right_paren;
5389 } -> [
5390 "function_call_with_type_arguments_receiver";
5391 "function_call_with_type_arguments_type_args";
5392 "function_call_with_type_arguments_left_paren";
5393 "function_call_with_type_arguments_argument_list";
5394 "function_call_with_type_arguments_right_paren";
5396 | ParenthesizedExpression {
5397 parenthesized_expression_left_paren;
5398 parenthesized_expression_expression;
5399 parenthesized_expression_right_paren;
5400 } -> [
5401 "parenthesized_expression_left_paren";
5402 "parenthesized_expression_expression";
5403 "parenthesized_expression_right_paren";
5405 | BracedExpression {
5406 braced_expression_left_brace;
5407 braced_expression_expression;
5408 braced_expression_right_brace;
5409 } -> [
5410 "braced_expression_left_brace";
5411 "braced_expression_expression";
5412 "braced_expression_right_brace";
5414 | EmbeddedBracedExpression {
5415 embedded_braced_expression_left_brace;
5416 embedded_braced_expression_expression;
5417 embedded_braced_expression_right_brace;
5418 } -> [
5419 "embedded_braced_expression_left_brace";
5420 "embedded_braced_expression_expression";
5421 "embedded_braced_expression_right_brace";
5423 | ListExpression {
5424 list_keyword;
5425 list_left_paren;
5426 list_members;
5427 list_right_paren;
5428 } -> [
5429 "list_keyword";
5430 "list_left_paren";
5431 "list_members";
5432 "list_right_paren";
5434 | CollectionLiteralExpression {
5435 collection_literal_name;
5436 collection_literal_left_brace;
5437 collection_literal_initializers;
5438 collection_literal_right_brace;
5439 } -> [
5440 "collection_literal_name";
5441 "collection_literal_left_brace";
5442 "collection_literal_initializers";
5443 "collection_literal_right_brace";
5445 | ObjectCreationExpression {
5446 object_creation_new_keyword;
5447 object_creation_object;
5448 } -> [
5449 "object_creation_new_keyword";
5450 "object_creation_object";
5452 | ConstructorCall {
5453 constructor_call_type;
5454 constructor_call_left_paren;
5455 constructor_call_argument_list;
5456 constructor_call_right_paren;
5457 } -> [
5458 "constructor_call_type";
5459 "constructor_call_left_paren";
5460 "constructor_call_argument_list";
5461 "constructor_call_right_paren";
5463 | ArrayCreationExpression {
5464 array_creation_left_bracket;
5465 array_creation_members;
5466 array_creation_right_bracket;
5467 } -> [
5468 "array_creation_left_bracket";
5469 "array_creation_members";
5470 "array_creation_right_bracket";
5472 | ArrayIntrinsicExpression {
5473 array_intrinsic_keyword;
5474 array_intrinsic_left_paren;
5475 array_intrinsic_members;
5476 array_intrinsic_right_paren;
5477 } -> [
5478 "array_intrinsic_keyword";
5479 "array_intrinsic_left_paren";
5480 "array_intrinsic_members";
5481 "array_intrinsic_right_paren";
5483 | DarrayIntrinsicExpression {
5484 darray_intrinsic_keyword;
5485 darray_intrinsic_explicit_type;
5486 darray_intrinsic_left_bracket;
5487 darray_intrinsic_members;
5488 darray_intrinsic_right_bracket;
5489 } -> [
5490 "darray_intrinsic_keyword";
5491 "darray_intrinsic_explicit_type";
5492 "darray_intrinsic_left_bracket";
5493 "darray_intrinsic_members";
5494 "darray_intrinsic_right_bracket";
5496 | DictionaryIntrinsicExpression {
5497 dictionary_intrinsic_keyword;
5498 dictionary_intrinsic_explicit_type;
5499 dictionary_intrinsic_left_bracket;
5500 dictionary_intrinsic_members;
5501 dictionary_intrinsic_right_bracket;
5502 } -> [
5503 "dictionary_intrinsic_keyword";
5504 "dictionary_intrinsic_explicit_type";
5505 "dictionary_intrinsic_left_bracket";
5506 "dictionary_intrinsic_members";
5507 "dictionary_intrinsic_right_bracket";
5509 | KeysetIntrinsicExpression {
5510 keyset_intrinsic_keyword;
5511 keyset_intrinsic_explicit_type;
5512 keyset_intrinsic_left_bracket;
5513 keyset_intrinsic_members;
5514 keyset_intrinsic_right_bracket;
5515 } -> [
5516 "keyset_intrinsic_keyword";
5517 "keyset_intrinsic_explicit_type";
5518 "keyset_intrinsic_left_bracket";
5519 "keyset_intrinsic_members";
5520 "keyset_intrinsic_right_bracket";
5522 | VarrayIntrinsicExpression {
5523 varray_intrinsic_keyword;
5524 varray_intrinsic_explicit_type;
5525 varray_intrinsic_left_bracket;
5526 varray_intrinsic_members;
5527 varray_intrinsic_right_bracket;
5528 } -> [
5529 "varray_intrinsic_keyword";
5530 "varray_intrinsic_explicit_type";
5531 "varray_intrinsic_left_bracket";
5532 "varray_intrinsic_members";
5533 "varray_intrinsic_right_bracket";
5535 | VectorIntrinsicExpression {
5536 vector_intrinsic_keyword;
5537 vector_intrinsic_explicit_type;
5538 vector_intrinsic_left_bracket;
5539 vector_intrinsic_members;
5540 vector_intrinsic_right_bracket;
5541 } -> [
5542 "vector_intrinsic_keyword";
5543 "vector_intrinsic_explicit_type";
5544 "vector_intrinsic_left_bracket";
5545 "vector_intrinsic_members";
5546 "vector_intrinsic_right_bracket";
5548 | ElementInitializer {
5549 element_key;
5550 element_arrow;
5551 element_value;
5552 } -> [
5553 "element_key";
5554 "element_arrow";
5555 "element_value";
5557 | SubscriptExpression {
5558 subscript_receiver;
5559 subscript_left_bracket;
5560 subscript_index;
5561 subscript_right_bracket;
5562 } -> [
5563 "subscript_receiver";
5564 "subscript_left_bracket";
5565 "subscript_index";
5566 "subscript_right_bracket";
5568 | EmbeddedSubscriptExpression {
5569 embedded_subscript_receiver;
5570 embedded_subscript_left_bracket;
5571 embedded_subscript_index;
5572 embedded_subscript_right_bracket;
5573 } -> [
5574 "embedded_subscript_receiver";
5575 "embedded_subscript_left_bracket";
5576 "embedded_subscript_index";
5577 "embedded_subscript_right_bracket";
5579 | AwaitableCreationExpression {
5580 awaitable_attribute_spec;
5581 awaitable_async;
5582 awaitable_coroutine;
5583 awaitable_compound_statement;
5584 } -> [
5585 "awaitable_attribute_spec";
5586 "awaitable_async";
5587 "awaitable_coroutine";
5588 "awaitable_compound_statement";
5590 | XHPChildrenDeclaration {
5591 xhp_children_keyword;
5592 xhp_children_expression;
5593 xhp_children_semicolon;
5594 } -> [
5595 "xhp_children_keyword";
5596 "xhp_children_expression";
5597 "xhp_children_semicolon";
5599 | XHPChildrenParenthesizedList {
5600 xhp_children_list_left_paren;
5601 xhp_children_list_xhp_children;
5602 xhp_children_list_right_paren;
5603 } -> [
5604 "xhp_children_list_left_paren";
5605 "xhp_children_list_xhp_children";
5606 "xhp_children_list_right_paren";
5608 | XHPCategoryDeclaration {
5609 xhp_category_keyword;
5610 xhp_category_categories;
5611 xhp_category_semicolon;
5612 } -> [
5613 "xhp_category_keyword";
5614 "xhp_category_categories";
5615 "xhp_category_semicolon";
5617 | XHPEnumType {
5618 xhp_enum_optional;
5619 xhp_enum_keyword;
5620 xhp_enum_left_brace;
5621 xhp_enum_values;
5622 xhp_enum_right_brace;
5623 } -> [
5624 "xhp_enum_optional";
5625 "xhp_enum_keyword";
5626 "xhp_enum_left_brace";
5627 "xhp_enum_values";
5628 "xhp_enum_right_brace";
5630 | XHPRequired {
5631 xhp_required_at;
5632 xhp_required_keyword;
5633 } -> [
5634 "xhp_required_at";
5635 "xhp_required_keyword";
5637 | XHPClassAttributeDeclaration {
5638 xhp_attribute_keyword;
5639 xhp_attribute_attributes;
5640 xhp_attribute_semicolon;
5641 } -> [
5642 "xhp_attribute_keyword";
5643 "xhp_attribute_attributes";
5644 "xhp_attribute_semicolon";
5646 | XHPClassAttribute {
5647 xhp_attribute_decl_type;
5648 xhp_attribute_decl_name;
5649 xhp_attribute_decl_initializer;
5650 xhp_attribute_decl_required;
5651 } -> [
5652 "xhp_attribute_decl_type";
5653 "xhp_attribute_decl_name";
5654 "xhp_attribute_decl_initializer";
5655 "xhp_attribute_decl_required";
5657 | XHPSimpleClassAttribute {
5658 xhp_simple_class_attribute_type;
5659 } -> [
5660 "xhp_simple_class_attribute_type";
5662 | XHPSimpleAttribute {
5663 xhp_simple_attribute_name;
5664 xhp_simple_attribute_equal;
5665 xhp_simple_attribute_expression;
5666 } -> [
5667 "xhp_simple_attribute_name";
5668 "xhp_simple_attribute_equal";
5669 "xhp_simple_attribute_expression";
5671 | XHPSpreadAttribute {
5672 xhp_spread_attribute_left_brace;
5673 xhp_spread_attribute_spread_operator;
5674 xhp_spread_attribute_expression;
5675 xhp_spread_attribute_right_brace;
5676 } -> [
5677 "xhp_spread_attribute_left_brace";
5678 "xhp_spread_attribute_spread_operator";
5679 "xhp_spread_attribute_expression";
5680 "xhp_spread_attribute_right_brace";
5682 | XHPOpen {
5683 xhp_open_left_angle;
5684 xhp_open_name;
5685 xhp_open_attributes;
5686 xhp_open_right_angle;
5687 } -> [
5688 "xhp_open_left_angle";
5689 "xhp_open_name";
5690 "xhp_open_attributes";
5691 "xhp_open_right_angle";
5693 | XHPExpression {
5694 xhp_open;
5695 xhp_body;
5696 xhp_close;
5697 } -> [
5698 "xhp_open";
5699 "xhp_body";
5700 "xhp_close";
5702 | XHPClose {
5703 xhp_close_left_angle;
5704 xhp_close_name;
5705 xhp_close_right_angle;
5706 } -> [
5707 "xhp_close_left_angle";
5708 "xhp_close_name";
5709 "xhp_close_right_angle";
5711 | TypeConstant {
5712 type_constant_left_type;
5713 type_constant_separator;
5714 type_constant_right_type;
5715 } -> [
5716 "type_constant_left_type";
5717 "type_constant_separator";
5718 "type_constant_right_type";
5720 | VectorTypeSpecifier {
5721 vector_type_keyword;
5722 vector_type_left_angle;
5723 vector_type_type;
5724 vector_type_trailing_comma;
5725 vector_type_right_angle;
5726 } -> [
5727 "vector_type_keyword";
5728 "vector_type_left_angle";
5729 "vector_type_type";
5730 "vector_type_trailing_comma";
5731 "vector_type_right_angle";
5733 | KeysetTypeSpecifier {
5734 keyset_type_keyword;
5735 keyset_type_left_angle;
5736 keyset_type_type;
5737 keyset_type_trailing_comma;
5738 keyset_type_right_angle;
5739 } -> [
5740 "keyset_type_keyword";
5741 "keyset_type_left_angle";
5742 "keyset_type_type";
5743 "keyset_type_trailing_comma";
5744 "keyset_type_right_angle";
5746 | TupleTypeExplicitSpecifier {
5747 tuple_type_keyword;
5748 tuple_type_left_angle;
5749 tuple_type_types;
5750 tuple_type_right_angle;
5751 } -> [
5752 "tuple_type_keyword";
5753 "tuple_type_left_angle";
5754 "tuple_type_types";
5755 "tuple_type_right_angle";
5757 | VarrayTypeSpecifier {
5758 varray_keyword;
5759 varray_left_angle;
5760 varray_type;
5761 varray_trailing_comma;
5762 varray_right_angle;
5763 } -> [
5764 "varray_keyword";
5765 "varray_left_angle";
5766 "varray_type";
5767 "varray_trailing_comma";
5768 "varray_right_angle";
5770 | VectorArrayTypeSpecifier {
5771 vector_array_keyword;
5772 vector_array_left_angle;
5773 vector_array_type;
5774 vector_array_right_angle;
5775 } -> [
5776 "vector_array_keyword";
5777 "vector_array_left_angle";
5778 "vector_array_type";
5779 "vector_array_right_angle";
5781 | TypeParameter {
5782 type_reified;
5783 type_variance;
5784 type_name;
5785 type_constraints;
5786 } -> [
5787 "type_reified";
5788 "type_variance";
5789 "type_name";
5790 "type_constraints";
5792 | TypeConstraint {
5793 constraint_keyword;
5794 constraint_type;
5795 } -> [
5796 "constraint_keyword";
5797 "constraint_type";
5799 | DarrayTypeSpecifier {
5800 darray_keyword;
5801 darray_left_angle;
5802 darray_key;
5803 darray_comma;
5804 darray_value;
5805 darray_trailing_comma;
5806 darray_right_angle;
5807 } -> [
5808 "darray_keyword";
5809 "darray_left_angle";
5810 "darray_key";
5811 "darray_comma";
5812 "darray_value";
5813 "darray_trailing_comma";
5814 "darray_right_angle";
5816 | MapArrayTypeSpecifier {
5817 map_array_keyword;
5818 map_array_left_angle;
5819 map_array_key;
5820 map_array_comma;
5821 map_array_value;
5822 map_array_right_angle;
5823 } -> [
5824 "map_array_keyword";
5825 "map_array_left_angle";
5826 "map_array_key";
5827 "map_array_comma";
5828 "map_array_value";
5829 "map_array_right_angle";
5831 | DictionaryTypeSpecifier {
5832 dictionary_type_keyword;
5833 dictionary_type_left_angle;
5834 dictionary_type_members;
5835 dictionary_type_right_angle;
5836 } -> [
5837 "dictionary_type_keyword";
5838 "dictionary_type_left_angle";
5839 "dictionary_type_members";
5840 "dictionary_type_right_angle";
5842 | ClosureTypeSpecifier {
5843 closure_outer_left_paren;
5844 closure_coroutine;
5845 closure_function_keyword;
5846 closure_inner_left_paren;
5847 closure_parameter_list;
5848 closure_inner_right_paren;
5849 closure_colon;
5850 closure_return_type;
5851 closure_outer_right_paren;
5852 } -> [
5853 "closure_outer_left_paren";
5854 "closure_coroutine";
5855 "closure_function_keyword";
5856 "closure_inner_left_paren";
5857 "closure_parameter_list";
5858 "closure_inner_right_paren";
5859 "closure_colon";
5860 "closure_return_type";
5861 "closure_outer_right_paren";
5863 | ClosureParameterTypeSpecifier {
5864 closure_parameter_call_convention;
5865 closure_parameter_type;
5866 } -> [
5867 "closure_parameter_call_convention";
5868 "closure_parameter_type";
5870 | ClassnameTypeSpecifier {
5871 classname_keyword;
5872 classname_left_angle;
5873 classname_type;
5874 classname_trailing_comma;
5875 classname_right_angle;
5876 } -> [
5877 "classname_keyword";
5878 "classname_left_angle";
5879 "classname_type";
5880 "classname_trailing_comma";
5881 "classname_right_angle";
5883 | FieldSpecifier {
5884 field_question;
5885 field_name;
5886 field_arrow;
5887 field_type;
5888 } -> [
5889 "field_question";
5890 "field_name";
5891 "field_arrow";
5892 "field_type";
5894 | FieldInitializer {
5895 field_initializer_name;
5896 field_initializer_arrow;
5897 field_initializer_value;
5898 } -> [
5899 "field_initializer_name";
5900 "field_initializer_arrow";
5901 "field_initializer_value";
5903 | ShapeTypeSpecifier {
5904 shape_type_keyword;
5905 shape_type_left_paren;
5906 shape_type_fields;
5907 shape_type_ellipsis;
5908 shape_type_right_paren;
5909 } -> [
5910 "shape_type_keyword";
5911 "shape_type_left_paren";
5912 "shape_type_fields";
5913 "shape_type_ellipsis";
5914 "shape_type_right_paren";
5916 | ShapeExpression {
5917 shape_expression_keyword;
5918 shape_expression_left_paren;
5919 shape_expression_fields;
5920 shape_expression_right_paren;
5921 } -> [
5922 "shape_expression_keyword";
5923 "shape_expression_left_paren";
5924 "shape_expression_fields";
5925 "shape_expression_right_paren";
5927 | TupleExpression {
5928 tuple_expression_keyword;
5929 tuple_expression_left_paren;
5930 tuple_expression_items;
5931 tuple_expression_right_paren;
5932 } -> [
5933 "tuple_expression_keyword";
5934 "tuple_expression_left_paren";
5935 "tuple_expression_items";
5936 "tuple_expression_right_paren";
5938 | GenericTypeSpecifier {
5939 generic_class_type;
5940 generic_argument_list;
5941 } -> [
5942 "generic_class_type";
5943 "generic_argument_list";
5945 | NullableTypeSpecifier {
5946 nullable_question;
5947 nullable_type;
5948 } -> [
5949 "nullable_question";
5950 "nullable_type";
5952 | SoftTypeSpecifier {
5953 soft_at;
5954 soft_type;
5955 } -> [
5956 "soft_at";
5957 "soft_type";
5959 | ReifiedTypeArgument {
5960 reified_type_argument_reified;
5961 reified_type_argument_type;
5962 } -> [
5963 "reified_type_argument_reified";
5964 "reified_type_argument_type";
5966 | TypeArguments {
5967 type_arguments_left_angle;
5968 type_arguments_types;
5969 type_arguments_right_angle;
5970 } -> [
5971 "type_arguments_left_angle";
5972 "type_arguments_types";
5973 "type_arguments_right_angle";
5975 | TypeParameters {
5976 type_parameters_left_angle;
5977 type_parameters_parameters;
5978 type_parameters_right_angle;
5979 } -> [
5980 "type_parameters_left_angle";
5981 "type_parameters_parameters";
5982 "type_parameters_right_angle";
5984 | TupleTypeSpecifier {
5985 tuple_left_paren;
5986 tuple_types;
5987 tuple_right_paren;
5988 } -> [
5989 "tuple_left_paren";
5990 "tuple_types";
5991 "tuple_right_paren";
5993 | ErrorSyntax {
5994 error_error;
5995 } -> [
5996 "error_error";
5998 | ListItem {
5999 list_item;
6000 list_separator;
6001 } -> [
6002 "list_item";
6003 "list_separator";
6007 let rec to_json ?(with_value = false) node =
6008 let open Hh_json in
6009 let ch = match node.syntax with
6010 | Token t -> [ "token", Token.to_json t ]
6011 | SyntaxList x -> [ ("elements",
6012 JSON_Array (List.map ~f:(to_json ~with_value) x)) ]
6013 | _ ->
6014 let rec aux acc c n =
6015 match c, n with
6016 | ([], []) -> acc
6017 | ((hc :: tc), (hn :: tn)) ->
6018 aux ((hn, (to_json ~with_value) hc) :: acc) tc tn
6019 | _ -> failwith "mismatch between children and names" in
6020 List.rev (aux [] (children node) (children_names node)) in
6021 let k = ("kind", JSON_String (SyntaxKind.to_string (kind node))) in
6022 let v = if with_value then
6023 ("value", SyntaxValue.to_json node.value) :: ch
6024 else ch in
6025 JSON_Object (k :: v)
6027 let binary_operator_kind b =
6028 match syntax b with
6029 | Token token ->
6030 let kind = Token.kind token in
6031 if Operator.is_trailing_operator_token kind then
6032 Some (Operator.trailing_from_token kind)
6033 else
6034 None
6035 | _ -> None
6037 let get_token node =
6038 match (syntax node) with
6039 | Token token -> Some token
6040 | _ -> None
6042 let leading_token node =
6043 let rec aux nodes =
6044 match nodes with
6045 | [] -> None
6046 | h :: t ->
6047 let token = get_token h in
6048 if token = None then
6049 let result = aux (children h) in
6050 if result = None then aux t else result
6051 else
6052 token in
6053 aux [node]
6055 let trailing_token node =
6056 let rec aux nodes =
6057 match nodes with
6058 | [] -> None
6059 | h :: t ->
6060 let token = get_token h in
6061 if token = None then
6062 let result = aux (List.rev (children h)) in
6063 if result = None then aux t else result
6064 else
6065 token in
6066 aux [node]
6068 let syntax_from_children kind ts =
6069 match kind, ts with
6070 | (SyntaxKind.EndOfFile, [
6071 end_of_file_token;
6072 ]) ->
6073 EndOfFile {
6074 end_of_file_token;
6076 | (SyntaxKind.Script, [
6077 script_declarations;
6078 ]) ->
6079 Script {
6080 script_declarations;
6082 | (SyntaxKind.QualifiedName, [
6083 qualified_name_parts;
6084 ]) ->
6085 QualifiedName {
6086 qualified_name_parts;
6088 | (SyntaxKind.SimpleTypeSpecifier, [
6089 simple_type_specifier;
6090 ]) ->
6091 SimpleTypeSpecifier {
6092 simple_type_specifier;
6094 | (SyntaxKind.LiteralExpression, [
6095 literal_expression;
6096 ]) ->
6097 LiteralExpression {
6098 literal_expression;
6100 | (SyntaxKind.PrefixedStringExpression, [
6101 prefixed_string_name;
6102 prefixed_string_str;
6103 ]) ->
6104 PrefixedStringExpression {
6105 prefixed_string_name;
6106 prefixed_string_str;
6108 | (SyntaxKind.VariableExpression, [
6109 variable_expression;
6110 ]) ->
6111 VariableExpression {
6112 variable_expression;
6114 | (SyntaxKind.PipeVariableExpression, [
6115 pipe_variable_expression;
6116 ]) ->
6117 PipeVariableExpression {
6118 pipe_variable_expression;
6120 | (SyntaxKind.EnumDeclaration, [
6121 enum_attribute_spec;
6122 enum_keyword;
6123 enum_name;
6124 enum_colon;
6125 enum_base;
6126 enum_type;
6127 enum_left_brace;
6128 enum_enumerators;
6129 enum_right_brace;
6130 ]) ->
6131 EnumDeclaration {
6132 enum_attribute_spec;
6133 enum_keyword;
6134 enum_name;
6135 enum_colon;
6136 enum_base;
6137 enum_type;
6138 enum_left_brace;
6139 enum_enumerators;
6140 enum_right_brace;
6142 | (SyntaxKind.Enumerator, [
6143 enumerator_name;
6144 enumerator_equal;
6145 enumerator_value;
6146 enumerator_semicolon;
6147 ]) ->
6148 Enumerator {
6149 enumerator_name;
6150 enumerator_equal;
6151 enumerator_value;
6152 enumerator_semicolon;
6154 | (SyntaxKind.AliasDeclaration, [
6155 alias_attribute_spec;
6156 alias_keyword;
6157 alias_name;
6158 alias_generic_parameter;
6159 alias_constraint;
6160 alias_equal;
6161 alias_type;
6162 alias_semicolon;
6163 ]) ->
6164 AliasDeclaration {
6165 alias_attribute_spec;
6166 alias_keyword;
6167 alias_name;
6168 alias_generic_parameter;
6169 alias_constraint;
6170 alias_equal;
6171 alias_type;
6172 alias_semicolon;
6174 | (SyntaxKind.PropertyDeclaration, [
6175 property_attribute_spec;
6176 property_modifiers;
6177 property_type;
6178 property_declarators;
6179 property_semicolon;
6180 ]) ->
6181 PropertyDeclaration {
6182 property_attribute_spec;
6183 property_modifiers;
6184 property_type;
6185 property_declarators;
6186 property_semicolon;
6188 | (SyntaxKind.PropertyDeclarator, [
6189 property_name;
6190 property_initializer;
6191 ]) ->
6192 PropertyDeclarator {
6193 property_name;
6194 property_initializer;
6196 | (SyntaxKind.NamespaceDeclaration, [
6197 namespace_keyword;
6198 namespace_name;
6199 namespace_body;
6200 ]) ->
6201 NamespaceDeclaration {
6202 namespace_keyword;
6203 namespace_name;
6204 namespace_body;
6206 | (SyntaxKind.NamespaceBody, [
6207 namespace_left_brace;
6208 namespace_declarations;
6209 namespace_right_brace;
6210 ]) ->
6211 NamespaceBody {
6212 namespace_left_brace;
6213 namespace_declarations;
6214 namespace_right_brace;
6216 | (SyntaxKind.NamespaceEmptyBody, [
6217 namespace_semicolon;
6218 ]) ->
6219 NamespaceEmptyBody {
6220 namespace_semicolon;
6222 | (SyntaxKind.NamespaceUseDeclaration, [
6223 namespace_use_keyword;
6224 namespace_use_kind;
6225 namespace_use_clauses;
6226 namespace_use_semicolon;
6227 ]) ->
6228 NamespaceUseDeclaration {
6229 namespace_use_keyword;
6230 namespace_use_kind;
6231 namespace_use_clauses;
6232 namespace_use_semicolon;
6234 | (SyntaxKind.NamespaceGroupUseDeclaration, [
6235 namespace_group_use_keyword;
6236 namespace_group_use_kind;
6237 namespace_group_use_prefix;
6238 namespace_group_use_left_brace;
6239 namespace_group_use_clauses;
6240 namespace_group_use_right_brace;
6241 namespace_group_use_semicolon;
6242 ]) ->
6243 NamespaceGroupUseDeclaration {
6244 namespace_group_use_keyword;
6245 namespace_group_use_kind;
6246 namespace_group_use_prefix;
6247 namespace_group_use_left_brace;
6248 namespace_group_use_clauses;
6249 namespace_group_use_right_brace;
6250 namespace_group_use_semicolon;
6252 | (SyntaxKind.NamespaceUseClause, [
6253 namespace_use_clause_kind;
6254 namespace_use_name;
6255 namespace_use_as;
6256 namespace_use_alias;
6257 ]) ->
6258 NamespaceUseClause {
6259 namespace_use_clause_kind;
6260 namespace_use_name;
6261 namespace_use_as;
6262 namespace_use_alias;
6264 | (SyntaxKind.FunctionDeclaration, [
6265 function_attribute_spec;
6266 function_declaration_header;
6267 function_body;
6268 ]) ->
6269 FunctionDeclaration {
6270 function_attribute_spec;
6271 function_declaration_header;
6272 function_body;
6274 | (SyntaxKind.FunctionDeclarationHeader, [
6275 function_modifiers;
6276 function_keyword;
6277 function_ampersand;
6278 function_name;
6279 function_type_parameter_list;
6280 function_left_paren;
6281 function_parameter_list;
6282 function_right_paren;
6283 function_colon;
6284 function_type;
6285 function_where_clause;
6286 ]) ->
6287 FunctionDeclarationHeader {
6288 function_modifiers;
6289 function_keyword;
6290 function_ampersand;
6291 function_name;
6292 function_type_parameter_list;
6293 function_left_paren;
6294 function_parameter_list;
6295 function_right_paren;
6296 function_colon;
6297 function_type;
6298 function_where_clause;
6300 | (SyntaxKind.WhereClause, [
6301 where_clause_keyword;
6302 where_clause_constraints;
6303 ]) ->
6304 WhereClause {
6305 where_clause_keyword;
6306 where_clause_constraints;
6308 | (SyntaxKind.WhereConstraint, [
6309 where_constraint_left_type;
6310 where_constraint_operator;
6311 where_constraint_right_type;
6312 ]) ->
6313 WhereConstraint {
6314 where_constraint_left_type;
6315 where_constraint_operator;
6316 where_constraint_right_type;
6318 | (SyntaxKind.MethodishDeclaration, [
6319 methodish_attribute;
6320 methodish_function_decl_header;
6321 methodish_function_body;
6322 methodish_semicolon;
6323 ]) ->
6324 MethodishDeclaration {
6325 methodish_attribute;
6326 methodish_function_decl_header;
6327 methodish_function_body;
6328 methodish_semicolon;
6330 | (SyntaxKind.ClassishDeclaration, [
6331 classish_attribute;
6332 classish_modifiers;
6333 classish_keyword;
6334 classish_name;
6335 classish_type_parameters;
6336 classish_extends_keyword;
6337 classish_extends_list;
6338 classish_implements_keyword;
6339 classish_implements_list;
6340 classish_body;
6341 ]) ->
6342 ClassishDeclaration {
6343 classish_attribute;
6344 classish_modifiers;
6345 classish_keyword;
6346 classish_name;
6347 classish_type_parameters;
6348 classish_extends_keyword;
6349 classish_extends_list;
6350 classish_implements_keyword;
6351 classish_implements_list;
6352 classish_body;
6354 | (SyntaxKind.ClassishBody, [
6355 classish_body_left_brace;
6356 classish_body_elements;
6357 classish_body_right_brace;
6358 ]) ->
6359 ClassishBody {
6360 classish_body_left_brace;
6361 classish_body_elements;
6362 classish_body_right_brace;
6364 | (SyntaxKind.TraitUsePrecedenceItem, [
6365 trait_use_precedence_item_name;
6366 trait_use_precedence_item_keyword;
6367 trait_use_precedence_item_removed_names;
6368 ]) ->
6369 TraitUsePrecedenceItem {
6370 trait_use_precedence_item_name;
6371 trait_use_precedence_item_keyword;
6372 trait_use_precedence_item_removed_names;
6374 | (SyntaxKind.TraitUseAliasItem, [
6375 trait_use_alias_item_aliasing_name;
6376 trait_use_alias_item_keyword;
6377 trait_use_alias_item_modifiers;
6378 trait_use_alias_item_aliased_name;
6379 ]) ->
6380 TraitUseAliasItem {
6381 trait_use_alias_item_aliasing_name;
6382 trait_use_alias_item_keyword;
6383 trait_use_alias_item_modifiers;
6384 trait_use_alias_item_aliased_name;
6386 | (SyntaxKind.TraitUseConflictResolution, [
6387 trait_use_conflict_resolution_keyword;
6388 trait_use_conflict_resolution_names;
6389 trait_use_conflict_resolution_left_brace;
6390 trait_use_conflict_resolution_clauses;
6391 trait_use_conflict_resolution_right_brace;
6392 ]) ->
6393 TraitUseConflictResolution {
6394 trait_use_conflict_resolution_keyword;
6395 trait_use_conflict_resolution_names;
6396 trait_use_conflict_resolution_left_brace;
6397 trait_use_conflict_resolution_clauses;
6398 trait_use_conflict_resolution_right_brace;
6400 | (SyntaxKind.TraitUse, [
6401 trait_use_keyword;
6402 trait_use_names;
6403 trait_use_semicolon;
6404 ]) ->
6405 TraitUse {
6406 trait_use_keyword;
6407 trait_use_names;
6408 trait_use_semicolon;
6410 | (SyntaxKind.RequireClause, [
6411 require_keyword;
6412 require_kind;
6413 require_name;
6414 require_semicolon;
6415 ]) ->
6416 RequireClause {
6417 require_keyword;
6418 require_kind;
6419 require_name;
6420 require_semicolon;
6422 | (SyntaxKind.ConstDeclaration, [
6423 const_visibility;
6424 const_abstract;
6425 const_keyword;
6426 const_type_specifier;
6427 const_declarators;
6428 const_semicolon;
6429 ]) ->
6430 ConstDeclaration {
6431 const_visibility;
6432 const_abstract;
6433 const_keyword;
6434 const_type_specifier;
6435 const_declarators;
6436 const_semicolon;
6438 | (SyntaxKind.ConstantDeclarator, [
6439 constant_declarator_name;
6440 constant_declarator_initializer;
6441 ]) ->
6442 ConstantDeclarator {
6443 constant_declarator_name;
6444 constant_declarator_initializer;
6446 | (SyntaxKind.TypeConstDeclaration, [
6447 type_const_abstract;
6448 type_const_keyword;
6449 type_const_type_keyword;
6450 type_const_name;
6451 type_const_type_parameters;
6452 type_const_type_constraint;
6453 type_const_equal;
6454 type_const_type_specifier;
6455 type_const_semicolon;
6456 ]) ->
6457 TypeConstDeclaration {
6458 type_const_abstract;
6459 type_const_keyword;
6460 type_const_type_keyword;
6461 type_const_name;
6462 type_const_type_parameters;
6463 type_const_type_constraint;
6464 type_const_equal;
6465 type_const_type_specifier;
6466 type_const_semicolon;
6468 | (SyntaxKind.DecoratedExpression, [
6469 decorated_expression_decorator;
6470 decorated_expression_expression;
6471 ]) ->
6472 DecoratedExpression {
6473 decorated_expression_decorator;
6474 decorated_expression_expression;
6476 | (SyntaxKind.ParameterDeclaration, [
6477 parameter_attribute;
6478 parameter_visibility;
6479 parameter_call_convention;
6480 parameter_type;
6481 parameter_name;
6482 parameter_default_value;
6483 ]) ->
6484 ParameterDeclaration {
6485 parameter_attribute;
6486 parameter_visibility;
6487 parameter_call_convention;
6488 parameter_type;
6489 parameter_name;
6490 parameter_default_value;
6492 | (SyntaxKind.VariadicParameter, [
6493 variadic_parameter_call_convention;
6494 variadic_parameter_type;
6495 variadic_parameter_ellipsis;
6496 ]) ->
6497 VariadicParameter {
6498 variadic_parameter_call_convention;
6499 variadic_parameter_type;
6500 variadic_parameter_ellipsis;
6502 | (SyntaxKind.AttributeSpecification, [
6503 attribute_specification_left_double_angle;
6504 attribute_specification_attributes;
6505 attribute_specification_right_double_angle;
6506 ]) ->
6507 AttributeSpecification {
6508 attribute_specification_left_double_angle;
6509 attribute_specification_attributes;
6510 attribute_specification_right_double_angle;
6512 | (SyntaxKind.InclusionExpression, [
6513 inclusion_require;
6514 inclusion_filename;
6515 ]) ->
6516 InclusionExpression {
6517 inclusion_require;
6518 inclusion_filename;
6520 | (SyntaxKind.InclusionDirective, [
6521 inclusion_expression;
6522 inclusion_semicolon;
6523 ]) ->
6524 InclusionDirective {
6525 inclusion_expression;
6526 inclusion_semicolon;
6528 | (SyntaxKind.CompoundStatement, [
6529 compound_left_brace;
6530 compound_statements;
6531 compound_right_brace;
6532 ]) ->
6533 CompoundStatement {
6534 compound_left_brace;
6535 compound_statements;
6536 compound_right_brace;
6538 | (SyntaxKind.AlternateLoopStatement, [
6539 alternate_loop_opening_colon;
6540 alternate_loop_statements;
6541 alternate_loop_closing_keyword;
6542 alternate_loop_closing_semicolon;
6543 ]) ->
6544 AlternateLoopStatement {
6545 alternate_loop_opening_colon;
6546 alternate_loop_statements;
6547 alternate_loop_closing_keyword;
6548 alternate_loop_closing_semicolon;
6550 | (SyntaxKind.ExpressionStatement, [
6551 expression_statement_expression;
6552 expression_statement_semicolon;
6553 ]) ->
6554 ExpressionStatement {
6555 expression_statement_expression;
6556 expression_statement_semicolon;
6558 | (SyntaxKind.MarkupSection, [
6559 markup_prefix;
6560 markup_text;
6561 markup_suffix;
6562 markup_expression;
6563 ]) ->
6564 MarkupSection {
6565 markup_prefix;
6566 markup_text;
6567 markup_suffix;
6568 markup_expression;
6570 | (SyntaxKind.MarkupSuffix, [
6571 markup_suffix_less_than_question;
6572 markup_suffix_name;
6573 ]) ->
6574 MarkupSuffix {
6575 markup_suffix_less_than_question;
6576 markup_suffix_name;
6578 | (SyntaxKind.UnsetStatement, [
6579 unset_keyword;
6580 unset_left_paren;
6581 unset_variables;
6582 unset_right_paren;
6583 unset_semicolon;
6584 ]) ->
6585 UnsetStatement {
6586 unset_keyword;
6587 unset_left_paren;
6588 unset_variables;
6589 unset_right_paren;
6590 unset_semicolon;
6592 | (SyntaxKind.LetStatement, [
6593 let_statement_keyword;
6594 let_statement_name;
6595 let_statement_colon;
6596 let_statement_type;
6597 let_statement_initializer;
6598 let_statement_semicolon;
6599 ]) ->
6600 LetStatement {
6601 let_statement_keyword;
6602 let_statement_name;
6603 let_statement_colon;
6604 let_statement_type;
6605 let_statement_initializer;
6606 let_statement_semicolon;
6608 | (SyntaxKind.UsingStatementBlockScoped, [
6609 using_block_await_keyword;
6610 using_block_using_keyword;
6611 using_block_left_paren;
6612 using_block_expressions;
6613 using_block_right_paren;
6614 using_block_body;
6615 ]) ->
6616 UsingStatementBlockScoped {
6617 using_block_await_keyword;
6618 using_block_using_keyword;
6619 using_block_left_paren;
6620 using_block_expressions;
6621 using_block_right_paren;
6622 using_block_body;
6624 | (SyntaxKind.UsingStatementFunctionScoped, [
6625 using_function_await_keyword;
6626 using_function_using_keyword;
6627 using_function_expression;
6628 using_function_semicolon;
6629 ]) ->
6630 UsingStatementFunctionScoped {
6631 using_function_await_keyword;
6632 using_function_using_keyword;
6633 using_function_expression;
6634 using_function_semicolon;
6636 | (SyntaxKind.DeclareDirectiveStatement, [
6637 declare_directive_keyword;
6638 declare_directive_left_paren;
6639 declare_directive_expression;
6640 declare_directive_right_paren;
6641 declare_directive_semicolon;
6642 ]) ->
6643 DeclareDirectiveStatement {
6644 declare_directive_keyword;
6645 declare_directive_left_paren;
6646 declare_directive_expression;
6647 declare_directive_right_paren;
6648 declare_directive_semicolon;
6650 | (SyntaxKind.DeclareBlockStatement, [
6651 declare_block_keyword;
6652 declare_block_left_paren;
6653 declare_block_expression;
6654 declare_block_right_paren;
6655 declare_block_body;
6656 ]) ->
6657 DeclareBlockStatement {
6658 declare_block_keyword;
6659 declare_block_left_paren;
6660 declare_block_expression;
6661 declare_block_right_paren;
6662 declare_block_body;
6664 | (SyntaxKind.WhileStatement, [
6665 while_keyword;
6666 while_left_paren;
6667 while_condition;
6668 while_right_paren;
6669 while_body;
6670 ]) ->
6671 WhileStatement {
6672 while_keyword;
6673 while_left_paren;
6674 while_condition;
6675 while_right_paren;
6676 while_body;
6678 | (SyntaxKind.IfStatement, [
6679 if_keyword;
6680 if_left_paren;
6681 if_condition;
6682 if_right_paren;
6683 if_statement;
6684 if_elseif_clauses;
6685 if_else_clause;
6686 ]) ->
6687 IfStatement {
6688 if_keyword;
6689 if_left_paren;
6690 if_condition;
6691 if_right_paren;
6692 if_statement;
6693 if_elseif_clauses;
6694 if_else_clause;
6696 | (SyntaxKind.ElseifClause, [
6697 elseif_keyword;
6698 elseif_left_paren;
6699 elseif_condition;
6700 elseif_right_paren;
6701 elseif_statement;
6702 ]) ->
6703 ElseifClause {
6704 elseif_keyword;
6705 elseif_left_paren;
6706 elseif_condition;
6707 elseif_right_paren;
6708 elseif_statement;
6710 | (SyntaxKind.ElseClause, [
6711 else_keyword;
6712 else_statement;
6713 ]) ->
6714 ElseClause {
6715 else_keyword;
6716 else_statement;
6718 | (SyntaxKind.AlternateIfStatement, [
6719 alternate_if_keyword;
6720 alternate_if_left_paren;
6721 alternate_if_condition;
6722 alternate_if_right_paren;
6723 alternate_if_colon;
6724 alternate_if_statement;
6725 alternate_if_elseif_clauses;
6726 alternate_if_else_clause;
6727 alternate_if_endif_keyword;
6728 alternate_if_semicolon;
6729 ]) ->
6730 AlternateIfStatement {
6731 alternate_if_keyword;
6732 alternate_if_left_paren;
6733 alternate_if_condition;
6734 alternate_if_right_paren;
6735 alternate_if_colon;
6736 alternate_if_statement;
6737 alternate_if_elseif_clauses;
6738 alternate_if_else_clause;
6739 alternate_if_endif_keyword;
6740 alternate_if_semicolon;
6742 | (SyntaxKind.AlternateElseifClause, [
6743 alternate_elseif_keyword;
6744 alternate_elseif_left_paren;
6745 alternate_elseif_condition;
6746 alternate_elseif_right_paren;
6747 alternate_elseif_colon;
6748 alternate_elseif_statement;
6749 ]) ->
6750 AlternateElseifClause {
6751 alternate_elseif_keyword;
6752 alternate_elseif_left_paren;
6753 alternate_elseif_condition;
6754 alternate_elseif_right_paren;
6755 alternate_elseif_colon;
6756 alternate_elseif_statement;
6758 | (SyntaxKind.AlternateElseClause, [
6759 alternate_else_keyword;
6760 alternate_else_colon;
6761 alternate_else_statement;
6762 ]) ->
6763 AlternateElseClause {
6764 alternate_else_keyword;
6765 alternate_else_colon;
6766 alternate_else_statement;
6768 | (SyntaxKind.TryStatement, [
6769 try_keyword;
6770 try_compound_statement;
6771 try_catch_clauses;
6772 try_finally_clause;
6773 ]) ->
6774 TryStatement {
6775 try_keyword;
6776 try_compound_statement;
6777 try_catch_clauses;
6778 try_finally_clause;
6780 | (SyntaxKind.CatchClause, [
6781 catch_keyword;
6782 catch_left_paren;
6783 catch_type;
6784 catch_variable;
6785 catch_right_paren;
6786 catch_body;
6787 ]) ->
6788 CatchClause {
6789 catch_keyword;
6790 catch_left_paren;
6791 catch_type;
6792 catch_variable;
6793 catch_right_paren;
6794 catch_body;
6796 | (SyntaxKind.FinallyClause, [
6797 finally_keyword;
6798 finally_body;
6799 ]) ->
6800 FinallyClause {
6801 finally_keyword;
6802 finally_body;
6804 | (SyntaxKind.DoStatement, [
6805 do_keyword;
6806 do_body;
6807 do_while_keyword;
6808 do_left_paren;
6809 do_condition;
6810 do_right_paren;
6811 do_semicolon;
6812 ]) ->
6813 DoStatement {
6814 do_keyword;
6815 do_body;
6816 do_while_keyword;
6817 do_left_paren;
6818 do_condition;
6819 do_right_paren;
6820 do_semicolon;
6822 | (SyntaxKind.ForStatement, [
6823 for_keyword;
6824 for_left_paren;
6825 for_initializer;
6826 for_first_semicolon;
6827 for_control;
6828 for_second_semicolon;
6829 for_end_of_loop;
6830 for_right_paren;
6831 for_body;
6832 ]) ->
6833 ForStatement {
6834 for_keyword;
6835 for_left_paren;
6836 for_initializer;
6837 for_first_semicolon;
6838 for_control;
6839 for_second_semicolon;
6840 for_end_of_loop;
6841 for_right_paren;
6842 for_body;
6844 | (SyntaxKind.ForeachStatement, [
6845 foreach_keyword;
6846 foreach_left_paren;
6847 foreach_collection;
6848 foreach_await_keyword;
6849 foreach_as;
6850 foreach_key;
6851 foreach_arrow;
6852 foreach_value;
6853 foreach_right_paren;
6854 foreach_body;
6855 ]) ->
6856 ForeachStatement {
6857 foreach_keyword;
6858 foreach_left_paren;
6859 foreach_collection;
6860 foreach_await_keyword;
6861 foreach_as;
6862 foreach_key;
6863 foreach_arrow;
6864 foreach_value;
6865 foreach_right_paren;
6866 foreach_body;
6868 | (SyntaxKind.SwitchStatement, [
6869 switch_keyword;
6870 switch_left_paren;
6871 switch_expression;
6872 switch_right_paren;
6873 switch_left_brace;
6874 switch_sections;
6875 switch_right_brace;
6876 ]) ->
6877 SwitchStatement {
6878 switch_keyword;
6879 switch_left_paren;
6880 switch_expression;
6881 switch_right_paren;
6882 switch_left_brace;
6883 switch_sections;
6884 switch_right_brace;
6886 | (SyntaxKind.AlternateSwitchStatement, [
6887 alternate_switch_keyword;
6888 alternate_switch_left_paren;
6889 alternate_switch_expression;
6890 alternate_switch_right_paren;
6891 alternate_switch_opening_colon;
6892 alternate_switch_sections;
6893 alternate_switch_closing_endswitch;
6894 alternate_switch_closing_semicolon;
6895 ]) ->
6896 AlternateSwitchStatement {
6897 alternate_switch_keyword;
6898 alternate_switch_left_paren;
6899 alternate_switch_expression;
6900 alternate_switch_right_paren;
6901 alternate_switch_opening_colon;
6902 alternate_switch_sections;
6903 alternate_switch_closing_endswitch;
6904 alternate_switch_closing_semicolon;
6906 | (SyntaxKind.SwitchSection, [
6907 switch_section_labels;
6908 switch_section_statements;
6909 switch_section_fallthrough;
6910 ]) ->
6911 SwitchSection {
6912 switch_section_labels;
6913 switch_section_statements;
6914 switch_section_fallthrough;
6916 | (SyntaxKind.SwitchFallthrough, [
6917 fallthrough_keyword;
6918 fallthrough_semicolon;
6919 ]) ->
6920 SwitchFallthrough {
6921 fallthrough_keyword;
6922 fallthrough_semicolon;
6924 | (SyntaxKind.CaseLabel, [
6925 case_keyword;
6926 case_expression;
6927 case_colon;
6928 ]) ->
6929 CaseLabel {
6930 case_keyword;
6931 case_expression;
6932 case_colon;
6934 | (SyntaxKind.DefaultLabel, [
6935 default_keyword;
6936 default_colon;
6937 ]) ->
6938 DefaultLabel {
6939 default_keyword;
6940 default_colon;
6942 | (SyntaxKind.ReturnStatement, [
6943 return_keyword;
6944 return_expression;
6945 return_semicolon;
6946 ]) ->
6947 ReturnStatement {
6948 return_keyword;
6949 return_expression;
6950 return_semicolon;
6952 | (SyntaxKind.GotoLabel, [
6953 goto_label_name;
6954 goto_label_colon;
6955 ]) ->
6956 GotoLabel {
6957 goto_label_name;
6958 goto_label_colon;
6960 | (SyntaxKind.GotoStatement, [
6961 goto_statement_keyword;
6962 goto_statement_label_name;
6963 goto_statement_semicolon;
6964 ]) ->
6965 GotoStatement {
6966 goto_statement_keyword;
6967 goto_statement_label_name;
6968 goto_statement_semicolon;
6970 | (SyntaxKind.ThrowStatement, [
6971 throw_keyword;
6972 throw_expression;
6973 throw_semicolon;
6974 ]) ->
6975 ThrowStatement {
6976 throw_keyword;
6977 throw_expression;
6978 throw_semicolon;
6980 | (SyntaxKind.BreakStatement, [
6981 break_keyword;
6982 break_level;
6983 break_semicolon;
6984 ]) ->
6985 BreakStatement {
6986 break_keyword;
6987 break_level;
6988 break_semicolon;
6990 | (SyntaxKind.ContinueStatement, [
6991 continue_keyword;
6992 continue_level;
6993 continue_semicolon;
6994 ]) ->
6995 ContinueStatement {
6996 continue_keyword;
6997 continue_level;
6998 continue_semicolon;
7000 | (SyntaxKind.FunctionStaticStatement, [
7001 static_static_keyword;
7002 static_declarations;
7003 static_semicolon;
7004 ]) ->
7005 FunctionStaticStatement {
7006 static_static_keyword;
7007 static_declarations;
7008 static_semicolon;
7010 | (SyntaxKind.StaticDeclarator, [
7011 static_name;
7012 static_initializer;
7013 ]) ->
7014 StaticDeclarator {
7015 static_name;
7016 static_initializer;
7018 | (SyntaxKind.EchoStatement, [
7019 echo_keyword;
7020 echo_expressions;
7021 echo_semicolon;
7022 ]) ->
7023 EchoStatement {
7024 echo_keyword;
7025 echo_expressions;
7026 echo_semicolon;
7028 | (SyntaxKind.GlobalStatement, [
7029 global_keyword;
7030 global_variables;
7031 global_semicolon;
7032 ]) ->
7033 GlobalStatement {
7034 global_keyword;
7035 global_variables;
7036 global_semicolon;
7038 | (SyntaxKind.SimpleInitializer, [
7039 simple_initializer_equal;
7040 simple_initializer_value;
7041 ]) ->
7042 SimpleInitializer {
7043 simple_initializer_equal;
7044 simple_initializer_value;
7046 | (SyntaxKind.AnonymousClass, [
7047 anonymous_class_class_keyword;
7048 anonymous_class_left_paren;
7049 anonymous_class_argument_list;
7050 anonymous_class_right_paren;
7051 anonymous_class_extends_keyword;
7052 anonymous_class_extends_list;
7053 anonymous_class_implements_keyword;
7054 anonymous_class_implements_list;
7055 anonymous_class_body;
7056 ]) ->
7057 AnonymousClass {
7058 anonymous_class_class_keyword;
7059 anonymous_class_left_paren;
7060 anonymous_class_argument_list;
7061 anonymous_class_right_paren;
7062 anonymous_class_extends_keyword;
7063 anonymous_class_extends_list;
7064 anonymous_class_implements_keyword;
7065 anonymous_class_implements_list;
7066 anonymous_class_body;
7068 | (SyntaxKind.AnonymousFunction, [
7069 anonymous_attribute_spec;
7070 anonymous_static_keyword;
7071 anonymous_async_keyword;
7072 anonymous_coroutine_keyword;
7073 anonymous_function_keyword;
7074 anonymous_ampersand;
7075 anonymous_left_paren;
7076 anonymous_parameters;
7077 anonymous_right_paren;
7078 anonymous_colon;
7079 anonymous_type;
7080 anonymous_use;
7081 anonymous_body;
7082 ]) ->
7083 AnonymousFunction {
7084 anonymous_attribute_spec;
7085 anonymous_static_keyword;
7086 anonymous_async_keyword;
7087 anonymous_coroutine_keyword;
7088 anonymous_function_keyword;
7089 anonymous_ampersand;
7090 anonymous_left_paren;
7091 anonymous_parameters;
7092 anonymous_right_paren;
7093 anonymous_colon;
7094 anonymous_type;
7095 anonymous_use;
7096 anonymous_body;
7098 | (SyntaxKind.Php7AnonymousFunction, [
7099 php7_anonymous_attribute_spec;
7100 php7_anonymous_static_keyword;
7101 php7_anonymous_async_keyword;
7102 php7_anonymous_coroutine_keyword;
7103 php7_anonymous_function_keyword;
7104 php7_anonymous_ampersand;
7105 php7_anonymous_left_paren;
7106 php7_anonymous_parameters;
7107 php7_anonymous_right_paren;
7108 php7_anonymous_use;
7109 php7_anonymous_colon;
7110 php7_anonymous_type;
7111 php7_anonymous_body;
7112 ]) ->
7113 Php7AnonymousFunction {
7114 php7_anonymous_attribute_spec;
7115 php7_anonymous_static_keyword;
7116 php7_anonymous_async_keyword;
7117 php7_anonymous_coroutine_keyword;
7118 php7_anonymous_function_keyword;
7119 php7_anonymous_ampersand;
7120 php7_anonymous_left_paren;
7121 php7_anonymous_parameters;
7122 php7_anonymous_right_paren;
7123 php7_anonymous_use;
7124 php7_anonymous_colon;
7125 php7_anonymous_type;
7126 php7_anonymous_body;
7128 | (SyntaxKind.AnonymousFunctionUseClause, [
7129 anonymous_use_keyword;
7130 anonymous_use_left_paren;
7131 anonymous_use_variables;
7132 anonymous_use_right_paren;
7133 ]) ->
7134 AnonymousFunctionUseClause {
7135 anonymous_use_keyword;
7136 anonymous_use_left_paren;
7137 anonymous_use_variables;
7138 anonymous_use_right_paren;
7140 | (SyntaxKind.LambdaExpression, [
7141 lambda_attribute_spec;
7142 lambda_async;
7143 lambda_coroutine;
7144 lambda_signature;
7145 lambda_arrow;
7146 lambda_body;
7147 ]) ->
7148 LambdaExpression {
7149 lambda_attribute_spec;
7150 lambda_async;
7151 lambda_coroutine;
7152 lambda_signature;
7153 lambda_arrow;
7154 lambda_body;
7156 | (SyntaxKind.LambdaSignature, [
7157 lambda_left_paren;
7158 lambda_parameters;
7159 lambda_right_paren;
7160 lambda_colon;
7161 lambda_type;
7162 ]) ->
7163 LambdaSignature {
7164 lambda_left_paren;
7165 lambda_parameters;
7166 lambda_right_paren;
7167 lambda_colon;
7168 lambda_type;
7170 | (SyntaxKind.CastExpression, [
7171 cast_left_paren;
7172 cast_type;
7173 cast_right_paren;
7174 cast_operand;
7175 ]) ->
7176 CastExpression {
7177 cast_left_paren;
7178 cast_type;
7179 cast_right_paren;
7180 cast_operand;
7182 | (SyntaxKind.ScopeResolutionExpression, [
7183 scope_resolution_qualifier;
7184 scope_resolution_operator;
7185 scope_resolution_name;
7186 ]) ->
7187 ScopeResolutionExpression {
7188 scope_resolution_qualifier;
7189 scope_resolution_operator;
7190 scope_resolution_name;
7192 | (SyntaxKind.MemberSelectionExpression, [
7193 member_object;
7194 member_operator;
7195 member_name;
7196 ]) ->
7197 MemberSelectionExpression {
7198 member_object;
7199 member_operator;
7200 member_name;
7202 | (SyntaxKind.SafeMemberSelectionExpression, [
7203 safe_member_object;
7204 safe_member_operator;
7205 safe_member_name;
7206 ]) ->
7207 SafeMemberSelectionExpression {
7208 safe_member_object;
7209 safe_member_operator;
7210 safe_member_name;
7212 | (SyntaxKind.EmbeddedMemberSelectionExpression, [
7213 embedded_member_object;
7214 embedded_member_operator;
7215 embedded_member_name;
7216 ]) ->
7217 EmbeddedMemberSelectionExpression {
7218 embedded_member_object;
7219 embedded_member_operator;
7220 embedded_member_name;
7222 | (SyntaxKind.YieldExpression, [
7223 yield_keyword;
7224 yield_operand;
7225 ]) ->
7226 YieldExpression {
7227 yield_keyword;
7228 yield_operand;
7230 | (SyntaxKind.YieldFromExpression, [
7231 yield_from_yield_keyword;
7232 yield_from_from_keyword;
7233 yield_from_operand;
7234 ]) ->
7235 YieldFromExpression {
7236 yield_from_yield_keyword;
7237 yield_from_from_keyword;
7238 yield_from_operand;
7240 | (SyntaxKind.PrefixUnaryExpression, [
7241 prefix_unary_operator;
7242 prefix_unary_operand;
7243 ]) ->
7244 PrefixUnaryExpression {
7245 prefix_unary_operator;
7246 prefix_unary_operand;
7248 | (SyntaxKind.PostfixUnaryExpression, [
7249 postfix_unary_operand;
7250 postfix_unary_operator;
7251 ]) ->
7252 PostfixUnaryExpression {
7253 postfix_unary_operand;
7254 postfix_unary_operator;
7256 | (SyntaxKind.BinaryExpression, [
7257 binary_left_operand;
7258 binary_operator;
7259 binary_right_operand;
7260 ]) ->
7261 BinaryExpression {
7262 binary_left_operand;
7263 binary_operator;
7264 binary_right_operand;
7266 | (SyntaxKind.InstanceofExpression, [
7267 instanceof_left_operand;
7268 instanceof_operator;
7269 instanceof_right_operand;
7270 ]) ->
7271 InstanceofExpression {
7272 instanceof_left_operand;
7273 instanceof_operator;
7274 instanceof_right_operand;
7276 | (SyntaxKind.IsExpression, [
7277 is_left_operand;
7278 is_operator;
7279 is_right_operand;
7280 ]) ->
7281 IsExpression {
7282 is_left_operand;
7283 is_operator;
7284 is_right_operand;
7286 | (SyntaxKind.AsExpression, [
7287 as_left_operand;
7288 as_operator;
7289 as_right_operand;
7290 ]) ->
7291 AsExpression {
7292 as_left_operand;
7293 as_operator;
7294 as_right_operand;
7296 | (SyntaxKind.NullableAsExpression, [
7297 nullable_as_left_operand;
7298 nullable_as_operator;
7299 nullable_as_right_operand;
7300 ]) ->
7301 NullableAsExpression {
7302 nullable_as_left_operand;
7303 nullable_as_operator;
7304 nullable_as_right_operand;
7306 | (SyntaxKind.ConditionalExpression, [
7307 conditional_test;
7308 conditional_question;
7309 conditional_consequence;
7310 conditional_colon;
7311 conditional_alternative;
7312 ]) ->
7313 ConditionalExpression {
7314 conditional_test;
7315 conditional_question;
7316 conditional_consequence;
7317 conditional_colon;
7318 conditional_alternative;
7320 | (SyntaxKind.EvalExpression, [
7321 eval_keyword;
7322 eval_left_paren;
7323 eval_argument;
7324 eval_right_paren;
7325 ]) ->
7326 EvalExpression {
7327 eval_keyword;
7328 eval_left_paren;
7329 eval_argument;
7330 eval_right_paren;
7332 | (SyntaxKind.EmptyExpression, [
7333 empty_keyword;
7334 empty_left_paren;
7335 empty_argument;
7336 empty_right_paren;
7337 ]) ->
7338 EmptyExpression {
7339 empty_keyword;
7340 empty_left_paren;
7341 empty_argument;
7342 empty_right_paren;
7344 | (SyntaxKind.DefineExpression, [
7345 define_keyword;
7346 define_left_paren;
7347 define_argument_list;
7348 define_right_paren;
7349 ]) ->
7350 DefineExpression {
7351 define_keyword;
7352 define_left_paren;
7353 define_argument_list;
7354 define_right_paren;
7356 | (SyntaxKind.HaltCompilerExpression, [
7357 halt_compiler_keyword;
7358 halt_compiler_left_paren;
7359 halt_compiler_argument_list;
7360 halt_compiler_right_paren;
7361 ]) ->
7362 HaltCompilerExpression {
7363 halt_compiler_keyword;
7364 halt_compiler_left_paren;
7365 halt_compiler_argument_list;
7366 halt_compiler_right_paren;
7368 | (SyntaxKind.IssetExpression, [
7369 isset_keyword;
7370 isset_left_paren;
7371 isset_argument_list;
7372 isset_right_paren;
7373 ]) ->
7374 IssetExpression {
7375 isset_keyword;
7376 isset_left_paren;
7377 isset_argument_list;
7378 isset_right_paren;
7380 | (SyntaxKind.FunctionCallExpression, [
7381 function_call_receiver;
7382 function_call_left_paren;
7383 function_call_argument_list;
7384 function_call_right_paren;
7385 ]) ->
7386 FunctionCallExpression {
7387 function_call_receiver;
7388 function_call_left_paren;
7389 function_call_argument_list;
7390 function_call_right_paren;
7392 | (SyntaxKind.FunctionCallWithTypeArgumentsExpression, [
7393 function_call_with_type_arguments_receiver;
7394 function_call_with_type_arguments_type_args;
7395 function_call_with_type_arguments_left_paren;
7396 function_call_with_type_arguments_argument_list;
7397 function_call_with_type_arguments_right_paren;
7398 ]) ->
7399 FunctionCallWithTypeArgumentsExpression {
7400 function_call_with_type_arguments_receiver;
7401 function_call_with_type_arguments_type_args;
7402 function_call_with_type_arguments_left_paren;
7403 function_call_with_type_arguments_argument_list;
7404 function_call_with_type_arguments_right_paren;
7406 | (SyntaxKind.ParenthesizedExpression, [
7407 parenthesized_expression_left_paren;
7408 parenthesized_expression_expression;
7409 parenthesized_expression_right_paren;
7410 ]) ->
7411 ParenthesizedExpression {
7412 parenthesized_expression_left_paren;
7413 parenthesized_expression_expression;
7414 parenthesized_expression_right_paren;
7416 | (SyntaxKind.BracedExpression, [
7417 braced_expression_left_brace;
7418 braced_expression_expression;
7419 braced_expression_right_brace;
7420 ]) ->
7421 BracedExpression {
7422 braced_expression_left_brace;
7423 braced_expression_expression;
7424 braced_expression_right_brace;
7426 | (SyntaxKind.EmbeddedBracedExpression, [
7427 embedded_braced_expression_left_brace;
7428 embedded_braced_expression_expression;
7429 embedded_braced_expression_right_brace;
7430 ]) ->
7431 EmbeddedBracedExpression {
7432 embedded_braced_expression_left_brace;
7433 embedded_braced_expression_expression;
7434 embedded_braced_expression_right_brace;
7436 | (SyntaxKind.ListExpression, [
7437 list_keyword;
7438 list_left_paren;
7439 list_members;
7440 list_right_paren;
7441 ]) ->
7442 ListExpression {
7443 list_keyword;
7444 list_left_paren;
7445 list_members;
7446 list_right_paren;
7448 | (SyntaxKind.CollectionLiteralExpression, [
7449 collection_literal_name;
7450 collection_literal_left_brace;
7451 collection_literal_initializers;
7452 collection_literal_right_brace;
7453 ]) ->
7454 CollectionLiteralExpression {
7455 collection_literal_name;
7456 collection_literal_left_brace;
7457 collection_literal_initializers;
7458 collection_literal_right_brace;
7460 | (SyntaxKind.ObjectCreationExpression, [
7461 object_creation_new_keyword;
7462 object_creation_object;
7463 ]) ->
7464 ObjectCreationExpression {
7465 object_creation_new_keyword;
7466 object_creation_object;
7468 | (SyntaxKind.ConstructorCall, [
7469 constructor_call_type;
7470 constructor_call_left_paren;
7471 constructor_call_argument_list;
7472 constructor_call_right_paren;
7473 ]) ->
7474 ConstructorCall {
7475 constructor_call_type;
7476 constructor_call_left_paren;
7477 constructor_call_argument_list;
7478 constructor_call_right_paren;
7480 | (SyntaxKind.ArrayCreationExpression, [
7481 array_creation_left_bracket;
7482 array_creation_members;
7483 array_creation_right_bracket;
7484 ]) ->
7485 ArrayCreationExpression {
7486 array_creation_left_bracket;
7487 array_creation_members;
7488 array_creation_right_bracket;
7490 | (SyntaxKind.ArrayIntrinsicExpression, [
7491 array_intrinsic_keyword;
7492 array_intrinsic_left_paren;
7493 array_intrinsic_members;
7494 array_intrinsic_right_paren;
7495 ]) ->
7496 ArrayIntrinsicExpression {
7497 array_intrinsic_keyword;
7498 array_intrinsic_left_paren;
7499 array_intrinsic_members;
7500 array_intrinsic_right_paren;
7502 | (SyntaxKind.DarrayIntrinsicExpression, [
7503 darray_intrinsic_keyword;
7504 darray_intrinsic_explicit_type;
7505 darray_intrinsic_left_bracket;
7506 darray_intrinsic_members;
7507 darray_intrinsic_right_bracket;
7508 ]) ->
7509 DarrayIntrinsicExpression {
7510 darray_intrinsic_keyword;
7511 darray_intrinsic_explicit_type;
7512 darray_intrinsic_left_bracket;
7513 darray_intrinsic_members;
7514 darray_intrinsic_right_bracket;
7516 | (SyntaxKind.DictionaryIntrinsicExpression, [
7517 dictionary_intrinsic_keyword;
7518 dictionary_intrinsic_explicit_type;
7519 dictionary_intrinsic_left_bracket;
7520 dictionary_intrinsic_members;
7521 dictionary_intrinsic_right_bracket;
7522 ]) ->
7523 DictionaryIntrinsicExpression {
7524 dictionary_intrinsic_keyword;
7525 dictionary_intrinsic_explicit_type;
7526 dictionary_intrinsic_left_bracket;
7527 dictionary_intrinsic_members;
7528 dictionary_intrinsic_right_bracket;
7530 | (SyntaxKind.KeysetIntrinsicExpression, [
7531 keyset_intrinsic_keyword;
7532 keyset_intrinsic_explicit_type;
7533 keyset_intrinsic_left_bracket;
7534 keyset_intrinsic_members;
7535 keyset_intrinsic_right_bracket;
7536 ]) ->
7537 KeysetIntrinsicExpression {
7538 keyset_intrinsic_keyword;
7539 keyset_intrinsic_explicit_type;
7540 keyset_intrinsic_left_bracket;
7541 keyset_intrinsic_members;
7542 keyset_intrinsic_right_bracket;
7544 | (SyntaxKind.VarrayIntrinsicExpression, [
7545 varray_intrinsic_keyword;
7546 varray_intrinsic_explicit_type;
7547 varray_intrinsic_left_bracket;
7548 varray_intrinsic_members;
7549 varray_intrinsic_right_bracket;
7550 ]) ->
7551 VarrayIntrinsicExpression {
7552 varray_intrinsic_keyword;
7553 varray_intrinsic_explicit_type;
7554 varray_intrinsic_left_bracket;
7555 varray_intrinsic_members;
7556 varray_intrinsic_right_bracket;
7558 | (SyntaxKind.VectorIntrinsicExpression, [
7559 vector_intrinsic_keyword;
7560 vector_intrinsic_explicit_type;
7561 vector_intrinsic_left_bracket;
7562 vector_intrinsic_members;
7563 vector_intrinsic_right_bracket;
7564 ]) ->
7565 VectorIntrinsicExpression {
7566 vector_intrinsic_keyword;
7567 vector_intrinsic_explicit_type;
7568 vector_intrinsic_left_bracket;
7569 vector_intrinsic_members;
7570 vector_intrinsic_right_bracket;
7572 | (SyntaxKind.ElementInitializer, [
7573 element_key;
7574 element_arrow;
7575 element_value;
7576 ]) ->
7577 ElementInitializer {
7578 element_key;
7579 element_arrow;
7580 element_value;
7582 | (SyntaxKind.SubscriptExpression, [
7583 subscript_receiver;
7584 subscript_left_bracket;
7585 subscript_index;
7586 subscript_right_bracket;
7587 ]) ->
7588 SubscriptExpression {
7589 subscript_receiver;
7590 subscript_left_bracket;
7591 subscript_index;
7592 subscript_right_bracket;
7594 | (SyntaxKind.EmbeddedSubscriptExpression, [
7595 embedded_subscript_receiver;
7596 embedded_subscript_left_bracket;
7597 embedded_subscript_index;
7598 embedded_subscript_right_bracket;
7599 ]) ->
7600 EmbeddedSubscriptExpression {
7601 embedded_subscript_receiver;
7602 embedded_subscript_left_bracket;
7603 embedded_subscript_index;
7604 embedded_subscript_right_bracket;
7606 | (SyntaxKind.AwaitableCreationExpression, [
7607 awaitable_attribute_spec;
7608 awaitable_async;
7609 awaitable_coroutine;
7610 awaitable_compound_statement;
7611 ]) ->
7612 AwaitableCreationExpression {
7613 awaitable_attribute_spec;
7614 awaitable_async;
7615 awaitable_coroutine;
7616 awaitable_compound_statement;
7618 | (SyntaxKind.XHPChildrenDeclaration, [
7619 xhp_children_keyword;
7620 xhp_children_expression;
7621 xhp_children_semicolon;
7622 ]) ->
7623 XHPChildrenDeclaration {
7624 xhp_children_keyword;
7625 xhp_children_expression;
7626 xhp_children_semicolon;
7628 | (SyntaxKind.XHPChildrenParenthesizedList, [
7629 xhp_children_list_left_paren;
7630 xhp_children_list_xhp_children;
7631 xhp_children_list_right_paren;
7632 ]) ->
7633 XHPChildrenParenthesizedList {
7634 xhp_children_list_left_paren;
7635 xhp_children_list_xhp_children;
7636 xhp_children_list_right_paren;
7638 | (SyntaxKind.XHPCategoryDeclaration, [
7639 xhp_category_keyword;
7640 xhp_category_categories;
7641 xhp_category_semicolon;
7642 ]) ->
7643 XHPCategoryDeclaration {
7644 xhp_category_keyword;
7645 xhp_category_categories;
7646 xhp_category_semicolon;
7648 | (SyntaxKind.XHPEnumType, [
7649 xhp_enum_optional;
7650 xhp_enum_keyword;
7651 xhp_enum_left_brace;
7652 xhp_enum_values;
7653 xhp_enum_right_brace;
7654 ]) ->
7655 XHPEnumType {
7656 xhp_enum_optional;
7657 xhp_enum_keyword;
7658 xhp_enum_left_brace;
7659 xhp_enum_values;
7660 xhp_enum_right_brace;
7662 | (SyntaxKind.XHPRequired, [
7663 xhp_required_at;
7664 xhp_required_keyword;
7665 ]) ->
7666 XHPRequired {
7667 xhp_required_at;
7668 xhp_required_keyword;
7670 | (SyntaxKind.XHPClassAttributeDeclaration, [
7671 xhp_attribute_keyword;
7672 xhp_attribute_attributes;
7673 xhp_attribute_semicolon;
7674 ]) ->
7675 XHPClassAttributeDeclaration {
7676 xhp_attribute_keyword;
7677 xhp_attribute_attributes;
7678 xhp_attribute_semicolon;
7680 | (SyntaxKind.XHPClassAttribute, [
7681 xhp_attribute_decl_type;
7682 xhp_attribute_decl_name;
7683 xhp_attribute_decl_initializer;
7684 xhp_attribute_decl_required;
7685 ]) ->
7686 XHPClassAttribute {
7687 xhp_attribute_decl_type;
7688 xhp_attribute_decl_name;
7689 xhp_attribute_decl_initializer;
7690 xhp_attribute_decl_required;
7692 | (SyntaxKind.XHPSimpleClassAttribute, [
7693 xhp_simple_class_attribute_type;
7694 ]) ->
7695 XHPSimpleClassAttribute {
7696 xhp_simple_class_attribute_type;
7698 | (SyntaxKind.XHPSimpleAttribute, [
7699 xhp_simple_attribute_name;
7700 xhp_simple_attribute_equal;
7701 xhp_simple_attribute_expression;
7702 ]) ->
7703 XHPSimpleAttribute {
7704 xhp_simple_attribute_name;
7705 xhp_simple_attribute_equal;
7706 xhp_simple_attribute_expression;
7708 | (SyntaxKind.XHPSpreadAttribute, [
7709 xhp_spread_attribute_left_brace;
7710 xhp_spread_attribute_spread_operator;
7711 xhp_spread_attribute_expression;
7712 xhp_spread_attribute_right_brace;
7713 ]) ->
7714 XHPSpreadAttribute {
7715 xhp_spread_attribute_left_brace;
7716 xhp_spread_attribute_spread_operator;
7717 xhp_spread_attribute_expression;
7718 xhp_spread_attribute_right_brace;
7720 | (SyntaxKind.XHPOpen, [
7721 xhp_open_left_angle;
7722 xhp_open_name;
7723 xhp_open_attributes;
7724 xhp_open_right_angle;
7725 ]) ->
7726 XHPOpen {
7727 xhp_open_left_angle;
7728 xhp_open_name;
7729 xhp_open_attributes;
7730 xhp_open_right_angle;
7732 | (SyntaxKind.XHPExpression, [
7733 xhp_open;
7734 xhp_body;
7735 xhp_close;
7736 ]) ->
7737 XHPExpression {
7738 xhp_open;
7739 xhp_body;
7740 xhp_close;
7742 | (SyntaxKind.XHPClose, [
7743 xhp_close_left_angle;
7744 xhp_close_name;
7745 xhp_close_right_angle;
7746 ]) ->
7747 XHPClose {
7748 xhp_close_left_angle;
7749 xhp_close_name;
7750 xhp_close_right_angle;
7752 | (SyntaxKind.TypeConstant, [
7753 type_constant_left_type;
7754 type_constant_separator;
7755 type_constant_right_type;
7756 ]) ->
7757 TypeConstant {
7758 type_constant_left_type;
7759 type_constant_separator;
7760 type_constant_right_type;
7762 | (SyntaxKind.VectorTypeSpecifier, [
7763 vector_type_keyword;
7764 vector_type_left_angle;
7765 vector_type_type;
7766 vector_type_trailing_comma;
7767 vector_type_right_angle;
7768 ]) ->
7769 VectorTypeSpecifier {
7770 vector_type_keyword;
7771 vector_type_left_angle;
7772 vector_type_type;
7773 vector_type_trailing_comma;
7774 vector_type_right_angle;
7776 | (SyntaxKind.KeysetTypeSpecifier, [
7777 keyset_type_keyword;
7778 keyset_type_left_angle;
7779 keyset_type_type;
7780 keyset_type_trailing_comma;
7781 keyset_type_right_angle;
7782 ]) ->
7783 KeysetTypeSpecifier {
7784 keyset_type_keyword;
7785 keyset_type_left_angle;
7786 keyset_type_type;
7787 keyset_type_trailing_comma;
7788 keyset_type_right_angle;
7790 | (SyntaxKind.TupleTypeExplicitSpecifier, [
7791 tuple_type_keyword;
7792 tuple_type_left_angle;
7793 tuple_type_types;
7794 tuple_type_right_angle;
7795 ]) ->
7796 TupleTypeExplicitSpecifier {
7797 tuple_type_keyword;
7798 tuple_type_left_angle;
7799 tuple_type_types;
7800 tuple_type_right_angle;
7802 | (SyntaxKind.VarrayTypeSpecifier, [
7803 varray_keyword;
7804 varray_left_angle;
7805 varray_type;
7806 varray_trailing_comma;
7807 varray_right_angle;
7808 ]) ->
7809 VarrayTypeSpecifier {
7810 varray_keyword;
7811 varray_left_angle;
7812 varray_type;
7813 varray_trailing_comma;
7814 varray_right_angle;
7816 | (SyntaxKind.VectorArrayTypeSpecifier, [
7817 vector_array_keyword;
7818 vector_array_left_angle;
7819 vector_array_type;
7820 vector_array_right_angle;
7821 ]) ->
7822 VectorArrayTypeSpecifier {
7823 vector_array_keyword;
7824 vector_array_left_angle;
7825 vector_array_type;
7826 vector_array_right_angle;
7828 | (SyntaxKind.TypeParameter, [
7829 type_reified;
7830 type_variance;
7831 type_name;
7832 type_constraints;
7833 ]) ->
7834 TypeParameter {
7835 type_reified;
7836 type_variance;
7837 type_name;
7838 type_constraints;
7840 | (SyntaxKind.TypeConstraint, [
7841 constraint_keyword;
7842 constraint_type;
7843 ]) ->
7844 TypeConstraint {
7845 constraint_keyword;
7846 constraint_type;
7848 | (SyntaxKind.DarrayTypeSpecifier, [
7849 darray_keyword;
7850 darray_left_angle;
7851 darray_key;
7852 darray_comma;
7853 darray_value;
7854 darray_trailing_comma;
7855 darray_right_angle;
7856 ]) ->
7857 DarrayTypeSpecifier {
7858 darray_keyword;
7859 darray_left_angle;
7860 darray_key;
7861 darray_comma;
7862 darray_value;
7863 darray_trailing_comma;
7864 darray_right_angle;
7866 | (SyntaxKind.MapArrayTypeSpecifier, [
7867 map_array_keyword;
7868 map_array_left_angle;
7869 map_array_key;
7870 map_array_comma;
7871 map_array_value;
7872 map_array_right_angle;
7873 ]) ->
7874 MapArrayTypeSpecifier {
7875 map_array_keyword;
7876 map_array_left_angle;
7877 map_array_key;
7878 map_array_comma;
7879 map_array_value;
7880 map_array_right_angle;
7882 | (SyntaxKind.DictionaryTypeSpecifier, [
7883 dictionary_type_keyword;
7884 dictionary_type_left_angle;
7885 dictionary_type_members;
7886 dictionary_type_right_angle;
7887 ]) ->
7888 DictionaryTypeSpecifier {
7889 dictionary_type_keyword;
7890 dictionary_type_left_angle;
7891 dictionary_type_members;
7892 dictionary_type_right_angle;
7894 | (SyntaxKind.ClosureTypeSpecifier, [
7895 closure_outer_left_paren;
7896 closure_coroutine;
7897 closure_function_keyword;
7898 closure_inner_left_paren;
7899 closure_parameter_list;
7900 closure_inner_right_paren;
7901 closure_colon;
7902 closure_return_type;
7903 closure_outer_right_paren;
7904 ]) ->
7905 ClosureTypeSpecifier {
7906 closure_outer_left_paren;
7907 closure_coroutine;
7908 closure_function_keyword;
7909 closure_inner_left_paren;
7910 closure_parameter_list;
7911 closure_inner_right_paren;
7912 closure_colon;
7913 closure_return_type;
7914 closure_outer_right_paren;
7916 | (SyntaxKind.ClosureParameterTypeSpecifier, [
7917 closure_parameter_call_convention;
7918 closure_parameter_type;
7919 ]) ->
7920 ClosureParameterTypeSpecifier {
7921 closure_parameter_call_convention;
7922 closure_parameter_type;
7924 | (SyntaxKind.ClassnameTypeSpecifier, [
7925 classname_keyword;
7926 classname_left_angle;
7927 classname_type;
7928 classname_trailing_comma;
7929 classname_right_angle;
7930 ]) ->
7931 ClassnameTypeSpecifier {
7932 classname_keyword;
7933 classname_left_angle;
7934 classname_type;
7935 classname_trailing_comma;
7936 classname_right_angle;
7938 | (SyntaxKind.FieldSpecifier, [
7939 field_question;
7940 field_name;
7941 field_arrow;
7942 field_type;
7943 ]) ->
7944 FieldSpecifier {
7945 field_question;
7946 field_name;
7947 field_arrow;
7948 field_type;
7950 | (SyntaxKind.FieldInitializer, [
7951 field_initializer_name;
7952 field_initializer_arrow;
7953 field_initializer_value;
7954 ]) ->
7955 FieldInitializer {
7956 field_initializer_name;
7957 field_initializer_arrow;
7958 field_initializer_value;
7960 | (SyntaxKind.ShapeTypeSpecifier, [
7961 shape_type_keyword;
7962 shape_type_left_paren;
7963 shape_type_fields;
7964 shape_type_ellipsis;
7965 shape_type_right_paren;
7966 ]) ->
7967 ShapeTypeSpecifier {
7968 shape_type_keyword;
7969 shape_type_left_paren;
7970 shape_type_fields;
7971 shape_type_ellipsis;
7972 shape_type_right_paren;
7974 | (SyntaxKind.ShapeExpression, [
7975 shape_expression_keyword;
7976 shape_expression_left_paren;
7977 shape_expression_fields;
7978 shape_expression_right_paren;
7979 ]) ->
7980 ShapeExpression {
7981 shape_expression_keyword;
7982 shape_expression_left_paren;
7983 shape_expression_fields;
7984 shape_expression_right_paren;
7986 | (SyntaxKind.TupleExpression, [
7987 tuple_expression_keyword;
7988 tuple_expression_left_paren;
7989 tuple_expression_items;
7990 tuple_expression_right_paren;
7991 ]) ->
7992 TupleExpression {
7993 tuple_expression_keyword;
7994 tuple_expression_left_paren;
7995 tuple_expression_items;
7996 tuple_expression_right_paren;
7998 | (SyntaxKind.GenericTypeSpecifier, [
7999 generic_class_type;
8000 generic_argument_list;
8001 ]) ->
8002 GenericTypeSpecifier {
8003 generic_class_type;
8004 generic_argument_list;
8006 | (SyntaxKind.NullableTypeSpecifier, [
8007 nullable_question;
8008 nullable_type;
8009 ]) ->
8010 NullableTypeSpecifier {
8011 nullable_question;
8012 nullable_type;
8014 | (SyntaxKind.SoftTypeSpecifier, [
8015 soft_at;
8016 soft_type;
8017 ]) ->
8018 SoftTypeSpecifier {
8019 soft_at;
8020 soft_type;
8022 | (SyntaxKind.ReifiedTypeArgument, [
8023 reified_type_argument_reified;
8024 reified_type_argument_type;
8025 ]) ->
8026 ReifiedTypeArgument {
8027 reified_type_argument_reified;
8028 reified_type_argument_type;
8030 | (SyntaxKind.TypeArguments, [
8031 type_arguments_left_angle;
8032 type_arguments_types;
8033 type_arguments_right_angle;
8034 ]) ->
8035 TypeArguments {
8036 type_arguments_left_angle;
8037 type_arguments_types;
8038 type_arguments_right_angle;
8040 | (SyntaxKind.TypeParameters, [
8041 type_parameters_left_angle;
8042 type_parameters_parameters;
8043 type_parameters_right_angle;
8044 ]) ->
8045 TypeParameters {
8046 type_parameters_left_angle;
8047 type_parameters_parameters;
8048 type_parameters_right_angle;
8050 | (SyntaxKind.TupleTypeSpecifier, [
8051 tuple_left_paren;
8052 tuple_types;
8053 tuple_right_paren;
8054 ]) ->
8055 TupleTypeSpecifier {
8056 tuple_left_paren;
8057 tuple_types;
8058 tuple_right_paren;
8060 | (SyntaxKind.ErrorSyntax, [
8061 error_error;
8062 ]) ->
8063 ErrorSyntax {
8064 error_error;
8066 | (SyntaxKind.ListItem, [
8067 list_item;
8068 list_separator;
8069 ]) ->
8070 ListItem {
8071 list_item;
8072 list_separator;
8074 | (SyntaxKind.Missing, []) -> Missing
8075 | (SyntaxKind.SyntaxList, items) -> SyntaxList items
8076 | _ -> failwith
8077 "syntax_from_children called with wrong number of children"
8079 let all_tokens node =
8080 let rec aux acc nodes =
8081 match nodes with
8082 | [] -> acc
8083 | h :: t ->
8084 begin
8085 match syntax h with
8086 | Token token -> aux (token :: acc) t
8087 | _ -> aux (aux acc (children h)) t
8088 end in
8089 List.rev (aux [] [node])
8091 module type ValueBuilderType = sig
8092 val value_from_children:
8093 Full_fidelity_source_text.t ->
8094 int -> (* offset *)
8095 Full_fidelity_syntax_kind.t ->
8096 t list ->
8097 SyntaxValue.t
8098 val value_from_token: Token.t -> SyntaxValue.t
8099 val value_from_syntax: syntax -> SyntaxValue.t
8102 module WithValueBuilder(ValueBuilder: ValueBuilderType) = struct
8103 let from_children text offset kind ts =
8104 let syntax = syntax_from_children kind ts in
8105 let value = ValueBuilder.value_from_children text offset kind ts in
8106 make syntax value
8108 let make_token token =
8109 let syntax = Token token in
8110 let value = ValueBuilder.value_from_token token in
8111 make syntax value
8113 let make_missing text offset =
8114 from_children text offset SyntaxKind.Missing []
8116 (* An empty list is represented by Missing; everything else is a
8117 SyntaxList, even if the list has only one item. *)
8118 let make_list text offset items =
8119 match items with
8120 | [] -> make_missing text offset
8121 | _ -> from_children text offset SyntaxKind.SyntaxList items
8123 let make_end_of_file
8124 end_of_file_token
8126 let syntax = EndOfFile {
8127 end_of_file_token;
8128 } in
8129 let value = ValueBuilder.value_from_syntax syntax in
8130 make syntax value
8132 let make_script
8133 script_declarations
8135 let syntax = Script {
8136 script_declarations;
8137 } in
8138 let value = ValueBuilder.value_from_syntax syntax in
8139 make syntax value
8141 let make_qualified_name
8142 qualified_name_parts
8144 let syntax = QualifiedName {
8145 qualified_name_parts;
8146 } in
8147 let value = ValueBuilder.value_from_syntax syntax in
8148 make syntax value
8150 let make_simple_type_specifier
8151 simple_type_specifier
8153 let syntax = SimpleTypeSpecifier {
8154 simple_type_specifier;
8155 } in
8156 let value = ValueBuilder.value_from_syntax syntax in
8157 make syntax value
8159 let make_literal_expression
8160 literal_expression
8162 let syntax = LiteralExpression {
8163 literal_expression;
8164 } in
8165 let value = ValueBuilder.value_from_syntax syntax in
8166 make syntax value
8168 let make_prefixed_string_expression
8169 prefixed_string_name
8170 prefixed_string_str
8172 let syntax = PrefixedStringExpression {
8173 prefixed_string_name;
8174 prefixed_string_str;
8175 } in
8176 let value = ValueBuilder.value_from_syntax syntax in
8177 make syntax value
8179 let make_variable_expression
8180 variable_expression
8182 let syntax = VariableExpression {
8183 variable_expression;
8184 } in
8185 let value = ValueBuilder.value_from_syntax syntax in
8186 make syntax value
8188 let make_pipe_variable_expression
8189 pipe_variable_expression
8191 let syntax = PipeVariableExpression {
8192 pipe_variable_expression;
8193 } in
8194 let value = ValueBuilder.value_from_syntax syntax in
8195 make syntax value
8197 let make_enum_declaration
8198 enum_attribute_spec
8199 enum_keyword
8200 enum_name
8201 enum_colon
8202 enum_base
8203 enum_type
8204 enum_left_brace
8205 enum_enumerators
8206 enum_right_brace
8208 let syntax = EnumDeclaration {
8209 enum_attribute_spec;
8210 enum_keyword;
8211 enum_name;
8212 enum_colon;
8213 enum_base;
8214 enum_type;
8215 enum_left_brace;
8216 enum_enumerators;
8217 enum_right_brace;
8218 } in
8219 let value = ValueBuilder.value_from_syntax syntax in
8220 make syntax value
8222 let make_enumerator
8223 enumerator_name
8224 enumerator_equal
8225 enumerator_value
8226 enumerator_semicolon
8228 let syntax = Enumerator {
8229 enumerator_name;
8230 enumerator_equal;
8231 enumerator_value;
8232 enumerator_semicolon;
8233 } in
8234 let value = ValueBuilder.value_from_syntax syntax in
8235 make syntax value
8237 let make_alias_declaration
8238 alias_attribute_spec
8239 alias_keyword
8240 alias_name
8241 alias_generic_parameter
8242 alias_constraint
8243 alias_equal
8244 alias_type
8245 alias_semicolon
8247 let syntax = AliasDeclaration {
8248 alias_attribute_spec;
8249 alias_keyword;
8250 alias_name;
8251 alias_generic_parameter;
8252 alias_constraint;
8253 alias_equal;
8254 alias_type;
8255 alias_semicolon;
8256 } in
8257 let value = ValueBuilder.value_from_syntax syntax in
8258 make syntax value
8260 let make_property_declaration
8261 property_attribute_spec
8262 property_modifiers
8263 property_type
8264 property_declarators
8265 property_semicolon
8267 let syntax = PropertyDeclaration {
8268 property_attribute_spec;
8269 property_modifiers;
8270 property_type;
8271 property_declarators;
8272 property_semicolon;
8273 } in
8274 let value = ValueBuilder.value_from_syntax syntax in
8275 make syntax value
8277 let make_property_declarator
8278 property_name
8279 property_initializer
8281 let syntax = PropertyDeclarator {
8282 property_name;
8283 property_initializer;
8284 } in
8285 let value = ValueBuilder.value_from_syntax syntax in
8286 make syntax value
8288 let make_namespace_declaration
8289 namespace_keyword
8290 namespace_name
8291 namespace_body
8293 let syntax = NamespaceDeclaration {
8294 namespace_keyword;
8295 namespace_name;
8296 namespace_body;
8297 } in
8298 let value = ValueBuilder.value_from_syntax syntax in
8299 make syntax value
8301 let make_namespace_body
8302 namespace_left_brace
8303 namespace_declarations
8304 namespace_right_brace
8306 let syntax = NamespaceBody {
8307 namespace_left_brace;
8308 namespace_declarations;
8309 namespace_right_brace;
8310 } in
8311 let value = ValueBuilder.value_from_syntax syntax in
8312 make syntax value
8314 let make_namespace_empty_body
8315 namespace_semicolon
8317 let syntax = NamespaceEmptyBody {
8318 namespace_semicolon;
8319 } in
8320 let value = ValueBuilder.value_from_syntax syntax in
8321 make syntax value
8323 let make_namespace_use_declaration
8324 namespace_use_keyword
8325 namespace_use_kind
8326 namespace_use_clauses
8327 namespace_use_semicolon
8329 let syntax = NamespaceUseDeclaration {
8330 namespace_use_keyword;
8331 namespace_use_kind;
8332 namespace_use_clauses;
8333 namespace_use_semicolon;
8334 } in
8335 let value = ValueBuilder.value_from_syntax syntax in
8336 make syntax value
8338 let make_namespace_group_use_declaration
8339 namespace_group_use_keyword
8340 namespace_group_use_kind
8341 namespace_group_use_prefix
8342 namespace_group_use_left_brace
8343 namespace_group_use_clauses
8344 namespace_group_use_right_brace
8345 namespace_group_use_semicolon
8347 let syntax = NamespaceGroupUseDeclaration {
8348 namespace_group_use_keyword;
8349 namespace_group_use_kind;
8350 namespace_group_use_prefix;
8351 namespace_group_use_left_brace;
8352 namespace_group_use_clauses;
8353 namespace_group_use_right_brace;
8354 namespace_group_use_semicolon;
8355 } in
8356 let value = ValueBuilder.value_from_syntax syntax in
8357 make syntax value
8359 let make_namespace_use_clause
8360 namespace_use_clause_kind
8361 namespace_use_name
8362 namespace_use_as
8363 namespace_use_alias
8365 let syntax = NamespaceUseClause {
8366 namespace_use_clause_kind;
8367 namespace_use_name;
8368 namespace_use_as;
8369 namespace_use_alias;
8370 } in
8371 let value = ValueBuilder.value_from_syntax syntax in
8372 make syntax value
8374 let make_function_declaration
8375 function_attribute_spec
8376 function_declaration_header
8377 function_body
8379 let syntax = FunctionDeclaration {
8380 function_attribute_spec;
8381 function_declaration_header;
8382 function_body;
8383 } in
8384 let value = ValueBuilder.value_from_syntax syntax in
8385 make syntax value
8387 let make_function_declaration_header
8388 function_modifiers
8389 function_keyword
8390 function_ampersand
8391 function_name
8392 function_type_parameter_list
8393 function_left_paren
8394 function_parameter_list
8395 function_right_paren
8396 function_colon
8397 function_type
8398 function_where_clause
8400 let syntax = FunctionDeclarationHeader {
8401 function_modifiers;
8402 function_keyword;
8403 function_ampersand;
8404 function_name;
8405 function_type_parameter_list;
8406 function_left_paren;
8407 function_parameter_list;
8408 function_right_paren;
8409 function_colon;
8410 function_type;
8411 function_where_clause;
8412 } in
8413 let value = ValueBuilder.value_from_syntax syntax in
8414 make syntax value
8416 let make_where_clause
8417 where_clause_keyword
8418 where_clause_constraints
8420 let syntax = WhereClause {
8421 where_clause_keyword;
8422 where_clause_constraints;
8423 } in
8424 let value = ValueBuilder.value_from_syntax syntax in
8425 make syntax value
8427 let make_where_constraint
8428 where_constraint_left_type
8429 where_constraint_operator
8430 where_constraint_right_type
8432 let syntax = WhereConstraint {
8433 where_constraint_left_type;
8434 where_constraint_operator;
8435 where_constraint_right_type;
8436 } in
8437 let value = ValueBuilder.value_from_syntax syntax in
8438 make syntax value
8440 let make_methodish_declaration
8441 methodish_attribute
8442 methodish_function_decl_header
8443 methodish_function_body
8444 methodish_semicolon
8446 let syntax = MethodishDeclaration {
8447 methodish_attribute;
8448 methodish_function_decl_header;
8449 methodish_function_body;
8450 methodish_semicolon;
8451 } in
8452 let value = ValueBuilder.value_from_syntax syntax in
8453 make syntax value
8455 let make_classish_declaration
8456 classish_attribute
8457 classish_modifiers
8458 classish_keyword
8459 classish_name
8460 classish_type_parameters
8461 classish_extends_keyword
8462 classish_extends_list
8463 classish_implements_keyword
8464 classish_implements_list
8465 classish_body
8467 let syntax = ClassishDeclaration {
8468 classish_attribute;
8469 classish_modifiers;
8470 classish_keyword;
8471 classish_name;
8472 classish_type_parameters;
8473 classish_extends_keyword;
8474 classish_extends_list;
8475 classish_implements_keyword;
8476 classish_implements_list;
8477 classish_body;
8478 } in
8479 let value = ValueBuilder.value_from_syntax syntax in
8480 make syntax value
8482 let make_classish_body
8483 classish_body_left_brace
8484 classish_body_elements
8485 classish_body_right_brace
8487 let syntax = ClassishBody {
8488 classish_body_left_brace;
8489 classish_body_elements;
8490 classish_body_right_brace;
8491 } in
8492 let value = ValueBuilder.value_from_syntax syntax in
8493 make syntax value
8495 let make_trait_use_precedence_item
8496 trait_use_precedence_item_name
8497 trait_use_precedence_item_keyword
8498 trait_use_precedence_item_removed_names
8500 let syntax = TraitUsePrecedenceItem {
8501 trait_use_precedence_item_name;
8502 trait_use_precedence_item_keyword;
8503 trait_use_precedence_item_removed_names;
8504 } in
8505 let value = ValueBuilder.value_from_syntax syntax in
8506 make syntax value
8508 let make_trait_use_alias_item
8509 trait_use_alias_item_aliasing_name
8510 trait_use_alias_item_keyword
8511 trait_use_alias_item_modifiers
8512 trait_use_alias_item_aliased_name
8514 let syntax = TraitUseAliasItem {
8515 trait_use_alias_item_aliasing_name;
8516 trait_use_alias_item_keyword;
8517 trait_use_alias_item_modifiers;
8518 trait_use_alias_item_aliased_name;
8519 } in
8520 let value = ValueBuilder.value_from_syntax syntax in
8521 make syntax value
8523 let make_trait_use_conflict_resolution
8524 trait_use_conflict_resolution_keyword
8525 trait_use_conflict_resolution_names
8526 trait_use_conflict_resolution_left_brace
8527 trait_use_conflict_resolution_clauses
8528 trait_use_conflict_resolution_right_brace
8530 let syntax = TraitUseConflictResolution {
8531 trait_use_conflict_resolution_keyword;
8532 trait_use_conflict_resolution_names;
8533 trait_use_conflict_resolution_left_brace;
8534 trait_use_conflict_resolution_clauses;
8535 trait_use_conflict_resolution_right_brace;
8536 } in
8537 let value = ValueBuilder.value_from_syntax syntax in
8538 make syntax value
8540 let make_trait_use
8541 trait_use_keyword
8542 trait_use_names
8543 trait_use_semicolon
8545 let syntax = TraitUse {
8546 trait_use_keyword;
8547 trait_use_names;
8548 trait_use_semicolon;
8549 } in
8550 let value = ValueBuilder.value_from_syntax syntax in
8551 make syntax value
8553 let make_require_clause
8554 require_keyword
8555 require_kind
8556 require_name
8557 require_semicolon
8559 let syntax = RequireClause {
8560 require_keyword;
8561 require_kind;
8562 require_name;
8563 require_semicolon;
8564 } in
8565 let value = ValueBuilder.value_from_syntax syntax in
8566 make syntax value
8568 let make_const_declaration
8569 const_visibility
8570 const_abstract
8571 const_keyword
8572 const_type_specifier
8573 const_declarators
8574 const_semicolon
8576 let syntax = ConstDeclaration {
8577 const_visibility;
8578 const_abstract;
8579 const_keyword;
8580 const_type_specifier;
8581 const_declarators;
8582 const_semicolon;
8583 } in
8584 let value = ValueBuilder.value_from_syntax syntax in
8585 make syntax value
8587 let make_constant_declarator
8588 constant_declarator_name
8589 constant_declarator_initializer
8591 let syntax = ConstantDeclarator {
8592 constant_declarator_name;
8593 constant_declarator_initializer;
8594 } in
8595 let value = ValueBuilder.value_from_syntax syntax in
8596 make syntax value
8598 let make_type_const_declaration
8599 type_const_abstract
8600 type_const_keyword
8601 type_const_type_keyword
8602 type_const_name
8603 type_const_type_parameters
8604 type_const_type_constraint
8605 type_const_equal
8606 type_const_type_specifier
8607 type_const_semicolon
8609 let syntax = TypeConstDeclaration {
8610 type_const_abstract;
8611 type_const_keyword;
8612 type_const_type_keyword;
8613 type_const_name;
8614 type_const_type_parameters;
8615 type_const_type_constraint;
8616 type_const_equal;
8617 type_const_type_specifier;
8618 type_const_semicolon;
8619 } in
8620 let value = ValueBuilder.value_from_syntax syntax in
8621 make syntax value
8623 let make_decorated_expression
8624 decorated_expression_decorator
8625 decorated_expression_expression
8627 let syntax = DecoratedExpression {
8628 decorated_expression_decorator;
8629 decorated_expression_expression;
8630 } in
8631 let value = ValueBuilder.value_from_syntax syntax in
8632 make syntax value
8634 let make_parameter_declaration
8635 parameter_attribute
8636 parameter_visibility
8637 parameter_call_convention
8638 parameter_type
8639 parameter_name
8640 parameter_default_value
8642 let syntax = ParameterDeclaration {
8643 parameter_attribute;
8644 parameter_visibility;
8645 parameter_call_convention;
8646 parameter_type;
8647 parameter_name;
8648 parameter_default_value;
8649 } in
8650 let value = ValueBuilder.value_from_syntax syntax in
8651 make syntax value
8653 let make_variadic_parameter
8654 variadic_parameter_call_convention
8655 variadic_parameter_type
8656 variadic_parameter_ellipsis
8658 let syntax = VariadicParameter {
8659 variadic_parameter_call_convention;
8660 variadic_parameter_type;
8661 variadic_parameter_ellipsis;
8662 } in
8663 let value = ValueBuilder.value_from_syntax syntax in
8664 make syntax value
8666 let make_attribute_specification
8667 attribute_specification_left_double_angle
8668 attribute_specification_attributes
8669 attribute_specification_right_double_angle
8671 let syntax = AttributeSpecification {
8672 attribute_specification_left_double_angle;
8673 attribute_specification_attributes;
8674 attribute_specification_right_double_angle;
8675 } in
8676 let value = ValueBuilder.value_from_syntax syntax in
8677 make syntax value
8679 let make_inclusion_expression
8680 inclusion_require
8681 inclusion_filename
8683 let syntax = InclusionExpression {
8684 inclusion_require;
8685 inclusion_filename;
8686 } in
8687 let value = ValueBuilder.value_from_syntax syntax in
8688 make syntax value
8690 let make_inclusion_directive
8691 inclusion_expression
8692 inclusion_semicolon
8694 let syntax = InclusionDirective {
8695 inclusion_expression;
8696 inclusion_semicolon;
8697 } in
8698 let value = ValueBuilder.value_from_syntax syntax in
8699 make syntax value
8701 let make_compound_statement
8702 compound_left_brace
8703 compound_statements
8704 compound_right_brace
8706 let syntax = CompoundStatement {
8707 compound_left_brace;
8708 compound_statements;
8709 compound_right_brace;
8710 } in
8711 let value = ValueBuilder.value_from_syntax syntax in
8712 make syntax value
8714 let make_alternate_loop_statement
8715 alternate_loop_opening_colon
8716 alternate_loop_statements
8717 alternate_loop_closing_keyword
8718 alternate_loop_closing_semicolon
8720 let syntax = AlternateLoopStatement {
8721 alternate_loop_opening_colon;
8722 alternate_loop_statements;
8723 alternate_loop_closing_keyword;
8724 alternate_loop_closing_semicolon;
8725 } in
8726 let value = ValueBuilder.value_from_syntax syntax in
8727 make syntax value
8729 let make_expression_statement
8730 expression_statement_expression
8731 expression_statement_semicolon
8733 let syntax = ExpressionStatement {
8734 expression_statement_expression;
8735 expression_statement_semicolon;
8736 } in
8737 let value = ValueBuilder.value_from_syntax syntax in
8738 make syntax value
8740 let make_markup_section
8741 markup_prefix
8742 markup_text
8743 markup_suffix
8744 markup_expression
8746 let syntax = MarkupSection {
8747 markup_prefix;
8748 markup_text;
8749 markup_suffix;
8750 markup_expression;
8751 } in
8752 let value = ValueBuilder.value_from_syntax syntax in
8753 make syntax value
8755 let make_markup_suffix
8756 markup_suffix_less_than_question
8757 markup_suffix_name
8759 let syntax = MarkupSuffix {
8760 markup_suffix_less_than_question;
8761 markup_suffix_name;
8762 } in
8763 let value = ValueBuilder.value_from_syntax syntax in
8764 make syntax value
8766 let make_unset_statement
8767 unset_keyword
8768 unset_left_paren
8769 unset_variables
8770 unset_right_paren
8771 unset_semicolon
8773 let syntax = UnsetStatement {
8774 unset_keyword;
8775 unset_left_paren;
8776 unset_variables;
8777 unset_right_paren;
8778 unset_semicolon;
8779 } in
8780 let value = ValueBuilder.value_from_syntax syntax in
8781 make syntax value
8783 let make_let_statement
8784 let_statement_keyword
8785 let_statement_name
8786 let_statement_colon
8787 let_statement_type
8788 let_statement_initializer
8789 let_statement_semicolon
8791 let syntax = LetStatement {
8792 let_statement_keyword;
8793 let_statement_name;
8794 let_statement_colon;
8795 let_statement_type;
8796 let_statement_initializer;
8797 let_statement_semicolon;
8798 } in
8799 let value = ValueBuilder.value_from_syntax syntax in
8800 make syntax value
8802 let make_using_statement_block_scoped
8803 using_block_await_keyword
8804 using_block_using_keyword
8805 using_block_left_paren
8806 using_block_expressions
8807 using_block_right_paren
8808 using_block_body
8810 let syntax = UsingStatementBlockScoped {
8811 using_block_await_keyword;
8812 using_block_using_keyword;
8813 using_block_left_paren;
8814 using_block_expressions;
8815 using_block_right_paren;
8816 using_block_body;
8817 } in
8818 let value = ValueBuilder.value_from_syntax syntax in
8819 make syntax value
8821 let make_using_statement_function_scoped
8822 using_function_await_keyword
8823 using_function_using_keyword
8824 using_function_expression
8825 using_function_semicolon
8827 let syntax = UsingStatementFunctionScoped {
8828 using_function_await_keyword;
8829 using_function_using_keyword;
8830 using_function_expression;
8831 using_function_semicolon;
8832 } in
8833 let value = ValueBuilder.value_from_syntax syntax in
8834 make syntax value
8836 let make_declare_directive_statement
8837 declare_directive_keyword
8838 declare_directive_left_paren
8839 declare_directive_expression
8840 declare_directive_right_paren
8841 declare_directive_semicolon
8843 let syntax = DeclareDirectiveStatement {
8844 declare_directive_keyword;
8845 declare_directive_left_paren;
8846 declare_directive_expression;
8847 declare_directive_right_paren;
8848 declare_directive_semicolon;
8849 } in
8850 let value = ValueBuilder.value_from_syntax syntax in
8851 make syntax value
8853 let make_declare_block_statement
8854 declare_block_keyword
8855 declare_block_left_paren
8856 declare_block_expression
8857 declare_block_right_paren
8858 declare_block_body
8860 let syntax = DeclareBlockStatement {
8861 declare_block_keyword;
8862 declare_block_left_paren;
8863 declare_block_expression;
8864 declare_block_right_paren;
8865 declare_block_body;
8866 } in
8867 let value = ValueBuilder.value_from_syntax syntax in
8868 make syntax value
8870 let make_while_statement
8871 while_keyword
8872 while_left_paren
8873 while_condition
8874 while_right_paren
8875 while_body
8877 let syntax = WhileStatement {
8878 while_keyword;
8879 while_left_paren;
8880 while_condition;
8881 while_right_paren;
8882 while_body;
8883 } in
8884 let value = ValueBuilder.value_from_syntax syntax in
8885 make syntax value
8887 let make_if_statement
8888 if_keyword
8889 if_left_paren
8890 if_condition
8891 if_right_paren
8892 if_statement
8893 if_elseif_clauses
8894 if_else_clause
8896 let syntax = IfStatement {
8897 if_keyword;
8898 if_left_paren;
8899 if_condition;
8900 if_right_paren;
8901 if_statement;
8902 if_elseif_clauses;
8903 if_else_clause;
8904 } in
8905 let value = ValueBuilder.value_from_syntax syntax in
8906 make syntax value
8908 let make_elseif_clause
8909 elseif_keyword
8910 elseif_left_paren
8911 elseif_condition
8912 elseif_right_paren
8913 elseif_statement
8915 let syntax = ElseifClause {
8916 elseif_keyword;
8917 elseif_left_paren;
8918 elseif_condition;
8919 elseif_right_paren;
8920 elseif_statement;
8921 } in
8922 let value = ValueBuilder.value_from_syntax syntax in
8923 make syntax value
8925 let make_else_clause
8926 else_keyword
8927 else_statement
8929 let syntax = ElseClause {
8930 else_keyword;
8931 else_statement;
8932 } in
8933 let value = ValueBuilder.value_from_syntax syntax in
8934 make syntax value
8936 let make_alternate_if_statement
8937 alternate_if_keyword
8938 alternate_if_left_paren
8939 alternate_if_condition
8940 alternate_if_right_paren
8941 alternate_if_colon
8942 alternate_if_statement
8943 alternate_if_elseif_clauses
8944 alternate_if_else_clause
8945 alternate_if_endif_keyword
8946 alternate_if_semicolon
8948 let syntax = AlternateIfStatement {
8949 alternate_if_keyword;
8950 alternate_if_left_paren;
8951 alternate_if_condition;
8952 alternate_if_right_paren;
8953 alternate_if_colon;
8954 alternate_if_statement;
8955 alternate_if_elseif_clauses;
8956 alternate_if_else_clause;
8957 alternate_if_endif_keyword;
8958 alternate_if_semicolon;
8959 } in
8960 let value = ValueBuilder.value_from_syntax syntax in
8961 make syntax value
8963 let make_alternate_elseif_clause
8964 alternate_elseif_keyword
8965 alternate_elseif_left_paren
8966 alternate_elseif_condition
8967 alternate_elseif_right_paren
8968 alternate_elseif_colon
8969 alternate_elseif_statement
8971 let syntax = AlternateElseifClause {
8972 alternate_elseif_keyword;
8973 alternate_elseif_left_paren;
8974 alternate_elseif_condition;
8975 alternate_elseif_right_paren;
8976 alternate_elseif_colon;
8977 alternate_elseif_statement;
8978 } in
8979 let value = ValueBuilder.value_from_syntax syntax in
8980 make syntax value
8982 let make_alternate_else_clause
8983 alternate_else_keyword
8984 alternate_else_colon
8985 alternate_else_statement
8987 let syntax = AlternateElseClause {
8988 alternate_else_keyword;
8989 alternate_else_colon;
8990 alternate_else_statement;
8991 } in
8992 let value = ValueBuilder.value_from_syntax syntax in
8993 make syntax value
8995 let make_try_statement
8996 try_keyword
8997 try_compound_statement
8998 try_catch_clauses
8999 try_finally_clause
9001 let syntax = TryStatement {
9002 try_keyword;
9003 try_compound_statement;
9004 try_catch_clauses;
9005 try_finally_clause;
9006 } in
9007 let value = ValueBuilder.value_from_syntax syntax in
9008 make syntax value
9010 let make_catch_clause
9011 catch_keyword
9012 catch_left_paren
9013 catch_type
9014 catch_variable
9015 catch_right_paren
9016 catch_body
9018 let syntax = CatchClause {
9019 catch_keyword;
9020 catch_left_paren;
9021 catch_type;
9022 catch_variable;
9023 catch_right_paren;
9024 catch_body;
9025 } in
9026 let value = ValueBuilder.value_from_syntax syntax in
9027 make syntax value
9029 let make_finally_clause
9030 finally_keyword
9031 finally_body
9033 let syntax = FinallyClause {
9034 finally_keyword;
9035 finally_body;
9036 } in
9037 let value = ValueBuilder.value_from_syntax syntax in
9038 make syntax value
9040 let make_do_statement
9041 do_keyword
9042 do_body
9043 do_while_keyword
9044 do_left_paren
9045 do_condition
9046 do_right_paren
9047 do_semicolon
9049 let syntax = DoStatement {
9050 do_keyword;
9051 do_body;
9052 do_while_keyword;
9053 do_left_paren;
9054 do_condition;
9055 do_right_paren;
9056 do_semicolon;
9057 } in
9058 let value = ValueBuilder.value_from_syntax syntax in
9059 make syntax value
9061 let make_for_statement
9062 for_keyword
9063 for_left_paren
9064 for_initializer
9065 for_first_semicolon
9066 for_control
9067 for_second_semicolon
9068 for_end_of_loop
9069 for_right_paren
9070 for_body
9072 let syntax = ForStatement {
9073 for_keyword;
9074 for_left_paren;
9075 for_initializer;
9076 for_first_semicolon;
9077 for_control;
9078 for_second_semicolon;
9079 for_end_of_loop;
9080 for_right_paren;
9081 for_body;
9082 } in
9083 let value = ValueBuilder.value_from_syntax syntax in
9084 make syntax value
9086 let make_foreach_statement
9087 foreach_keyword
9088 foreach_left_paren
9089 foreach_collection
9090 foreach_await_keyword
9091 foreach_as
9092 foreach_key
9093 foreach_arrow
9094 foreach_value
9095 foreach_right_paren
9096 foreach_body
9098 let syntax = ForeachStatement {
9099 foreach_keyword;
9100 foreach_left_paren;
9101 foreach_collection;
9102 foreach_await_keyword;
9103 foreach_as;
9104 foreach_key;
9105 foreach_arrow;
9106 foreach_value;
9107 foreach_right_paren;
9108 foreach_body;
9109 } in
9110 let value = ValueBuilder.value_from_syntax syntax in
9111 make syntax value
9113 let make_switch_statement
9114 switch_keyword
9115 switch_left_paren
9116 switch_expression
9117 switch_right_paren
9118 switch_left_brace
9119 switch_sections
9120 switch_right_brace
9122 let syntax = SwitchStatement {
9123 switch_keyword;
9124 switch_left_paren;
9125 switch_expression;
9126 switch_right_paren;
9127 switch_left_brace;
9128 switch_sections;
9129 switch_right_brace;
9130 } in
9131 let value = ValueBuilder.value_from_syntax syntax in
9132 make syntax value
9134 let make_alternate_switch_statement
9135 alternate_switch_keyword
9136 alternate_switch_left_paren
9137 alternate_switch_expression
9138 alternate_switch_right_paren
9139 alternate_switch_opening_colon
9140 alternate_switch_sections
9141 alternate_switch_closing_endswitch
9142 alternate_switch_closing_semicolon
9144 let syntax = AlternateSwitchStatement {
9145 alternate_switch_keyword;
9146 alternate_switch_left_paren;
9147 alternate_switch_expression;
9148 alternate_switch_right_paren;
9149 alternate_switch_opening_colon;
9150 alternate_switch_sections;
9151 alternate_switch_closing_endswitch;
9152 alternate_switch_closing_semicolon;
9153 } in
9154 let value = ValueBuilder.value_from_syntax syntax in
9155 make syntax value
9157 let make_switch_section
9158 switch_section_labels
9159 switch_section_statements
9160 switch_section_fallthrough
9162 let syntax = SwitchSection {
9163 switch_section_labels;
9164 switch_section_statements;
9165 switch_section_fallthrough;
9166 } in
9167 let value = ValueBuilder.value_from_syntax syntax in
9168 make syntax value
9170 let make_switch_fallthrough
9171 fallthrough_keyword
9172 fallthrough_semicolon
9174 let syntax = SwitchFallthrough {
9175 fallthrough_keyword;
9176 fallthrough_semicolon;
9177 } in
9178 let value = ValueBuilder.value_from_syntax syntax in
9179 make syntax value
9181 let make_case_label
9182 case_keyword
9183 case_expression
9184 case_colon
9186 let syntax = CaseLabel {
9187 case_keyword;
9188 case_expression;
9189 case_colon;
9190 } in
9191 let value = ValueBuilder.value_from_syntax syntax in
9192 make syntax value
9194 let make_default_label
9195 default_keyword
9196 default_colon
9198 let syntax = DefaultLabel {
9199 default_keyword;
9200 default_colon;
9201 } in
9202 let value = ValueBuilder.value_from_syntax syntax in
9203 make syntax value
9205 let make_return_statement
9206 return_keyword
9207 return_expression
9208 return_semicolon
9210 let syntax = ReturnStatement {
9211 return_keyword;
9212 return_expression;
9213 return_semicolon;
9214 } in
9215 let value = ValueBuilder.value_from_syntax syntax in
9216 make syntax value
9218 let make_goto_label
9219 goto_label_name
9220 goto_label_colon
9222 let syntax = GotoLabel {
9223 goto_label_name;
9224 goto_label_colon;
9225 } in
9226 let value = ValueBuilder.value_from_syntax syntax in
9227 make syntax value
9229 let make_goto_statement
9230 goto_statement_keyword
9231 goto_statement_label_name
9232 goto_statement_semicolon
9234 let syntax = GotoStatement {
9235 goto_statement_keyword;
9236 goto_statement_label_name;
9237 goto_statement_semicolon;
9238 } in
9239 let value = ValueBuilder.value_from_syntax syntax in
9240 make syntax value
9242 let make_throw_statement
9243 throw_keyword
9244 throw_expression
9245 throw_semicolon
9247 let syntax = ThrowStatement {
9248 throw_keyword;
9249 throw_expression;
9250 throw_semicolon;
9251 } in
9252 let value = ValueBuilder.value_from_syntax syntax in
9253 make syntax value
9255 let make_break_statement
9256 break_keyword
9257 break_level
9258 break_semicolon
9260 let syntax = BreakStatement {
9261 break_keyword;
9262 break_level;
9263 break_semicolon;
9264 } in
9265 let value = ValueBuilder.value_from_syntax syntax in
9266 make syntax value
9268 let make_continue_statement
9269 continue_keyword
9270 continue_level
9271 continue_semicolon
9273 let syntax = ContinueStatement {
9274 continue_keyword;
9275 continue_level;
9276 continue_semicolon;
9277 } in
9278 let value = ValueBuilder.value_from_syntax syntax in
9279 make syntax value
9281 let make_function_static_statement
9282 static_static_keyword
9283 static_declarations
9284 static_semicolon
9286 let syntax = FunctionStaticStatement {
9287 static_static_keyword;
9288 static_declarations;
9289 static_semicolon;
9290 } in
9291 let value = ValueBuilder.value_from_syntax syntax in
9292 make syntax value
9294 let make_static_declarator
9295 static_name
9296 static_initializer
9298 let syntax = StaticDeclarator {
9299 static_name;
9300 static_initializer;
9301 } in
9302 let value = ValueBuilder.value_from_syntax syntax in
9303 make syntax value
9305 let make_echo_statement
9306 echo_keyword
9307 echo_expressions
9308 echo_semicolon
9310 let syntax = EchoStatement {
9311 echo_keyword;
9312 echo_expressions;
9313 echo_semicolon;
9314 } in
9315 let value = ValueBuilder.value_from_syntax syntax in
9316 make syntax value
9318 let make_global_statement
9319 global_keyword
9320 global_variables
9321 global_semicolon
9323 let syntax = GlobalStatement {
9324 global_keyword;
9325 global_variables;
9326 global_semicolon;
9327 } in
9328 let value = ValueBuilder.value_from_syntax syntax in
9329 make syntax value
9331 let make_simple_initializer
9332 simple_initializer_equal
9333 simple_initializer_value
9335 let syntax = SimpleInitializer {
9336 simple_initializer_equal;
9337 simple_initializer_value;
9338 } in
9339 let value = ValueBuilder.value_from_syntax syntax in
9340 make syntax value
9342 let make_anonymous_class
9343 anonymous_class_class_keyword
9344 anonymous_class_left_paren
9345 anonymous_class_argument_list
9346 anonymous_class_right_paren
9347 anonymous_class_extends_keyword
9348 anonymous_class_extends_list
9349 anonymous_class_implements_keyword
9350 anonymous_class_implements_list
9351 anonymous_class_body
9353 let syntax = AnonymousClass {
9354 anonymous_class_class_keyword;
9355 anonymous_class_left_paren;
9356 anonymous_class_argument_list;
9357 anonymous_class_right_paren;
9358 anonymous_class_extends_keyword;
9359 anonymous_class_extends_list;
9360 anonymous_class_implements_keyword;
9361 anonymous_class_implements_list;
9362 anonymous_class_body;
9363 } in
9364 let value = ValueBuilder.value_from_syntax syntax in
9365 make syntax value
9367 let make_anonymous_function
9368 anonymous_attribute_spec
9369 anonymous_static_keyword
9370 anonymous_async_keyword
9371 anonymous_coroutine_keyword
9372 anonymous_function_keyword
9373 anonymous_ampersand
9374 anonymous_left_paren
9375 anonymous_parameters
9376 anonymous_right_paren
9377 anonymous_colon
9378 anonymous_type
9379 anonymous_use
9380 anonymous_body
9382 let syntax = AnonymousFunction {
9383 anonymous_attribute_spec;
9384 anonymous_static_keyword;
9385 anonymous_async_keyword;
9386 anonymous_coroutine_keyword;
9387 anonymous_function_keyword;
9388 anonymous_ampersand;
9389 anonymous_left_paren;
9390 anonymous_parameters;
9391 anonymous_right_paren;
9392 anonymous_colon;
9393 anonymous_type;
9394 anonymous_use;
9395 anonymous_body;
9396 } in
9397 let value = ValueBuilder.value_from_syntax syntax in
9398 make syntax value
9400 let make_php7_anonymous_function
9401 php7_anonymous_attribute_spec
9402 php7_anonymous_static_keyword
9403 php7_anonymous_async_keyword
9404 php7_anonymous_coroutine_keyword
9405 php7_anonymous_function_keyword
9406 php7_anonymous_ampersand
9407 php7_anonymous_left_paren
9408 php7_anonymous_parameters
9409 php7_anonymous_right_paren
9410 php7_anonymous_use
9411 php7_anonymous_colon
9412 php7_anonymous_type
9413 php7_anonymous_body
9415 let syntax = Php7AnonymousFunction {
9416 php7_anonymous_attribute_spec;
9417 php7_anonymous_static_keyword;
9418 php7_anonymous_async_keyword;
9419 php7_anonymous_coroutine_keyword;
9420 php7_anonymous_function_keyword;
9421 php7_anonymous_ampersand;
9422 php7_anonymous_left_paren;
9423 php7_anonymous_parameters;
9424 php7_anonymous_right_paren;
9425 php7_anonymous_use;
9426 php7_anonymous_colon;
9427 php7_anonymous_type;
9428 php7_anonymous_body;
9429 } in
9430 let value = ValueBuilder.value_from_syntax syntax in
9431 make syntax value
9433 let make_anonymous_function_use_clause
9434 anonymous_use_keyword
9435 anonymous_use_left_paren
9436 anonymous_use_variables
9437 anonymous_use_right_paren
9439 let syntax = AnonymousFunctionUseClause {
9440 anonymous_use_keyword;
9441 anonymous_use_left_paren;
9442 anonymous_use_variables;
9443 anonymous_use_right_paren;
9444 } in
9445 let value = ValueBuilder.value_from_syntax syntax in
9446 make syntax value
9448 let make_lambda_expression
9449 lambda_attribute_spec
9450 lambda_async
9451 lambda_coroutine
9452 lambda_signature
9453 lambda_arrow
9454 lambda_body
9456 let syntax = LambdaExpression {
9457 lambda_attribute_spec;
9458 lambda_async;
9459 lambda_coroutine;
9460 lambda_signature;
9461 lambda_arrow;
9462 lambda_body;
9463 } in
9464 let value = ValueBuilder.value_from_syntax syntax in
9465 make syntax value
9467 let make_lambda_signature
9468 lambda_left_paren
9469 lambda_parameters
9470 lambda_right_paren
9471 lambda_colon
9472 lambda_type
9474 let syntax = LambdaSignature {
9475 lambda_left_paren;
9476 lambda_parameters;
9477 lambda_right_paren;
9478 lambda_colon;
9479 lambda_type;
9480 } in
9481 let value = ValueBuilder.value_from_syntax syntax in
9482 make syntax value
9484 let make_cast_expression
9485 cast_left_paren
9486 cast_type
9487 cast_right_paren
9488 cast_operand
9490 let syntax = CastExpression {
9491 cast_left_paren;
9492 cast_type;
9493 cast_right_paren;
9494 cast_operand;
9495 } in
9496 let value = ValueBuilder.value_from_syntax syntax in
9497 make syntax value
9499 let make_scope_resolution_expression
9500 scope_resolution_qualifier
9501 scope_resolution_operator
9502 scope_resolution_name
9504 let syntax = ScopeResolutionExpression {
9505 scope_resolution_qualifier;
9506 scope_resolution_operator;
9507 scope_resolution_name;
9508 } in
9509 let value = ValueBuilder.value_from_syntax syntax in
9510 make syntax value
9512 let make_member_selection_expression
9513 member_object
9514 member_operator
9515 member_name
9517 let syntax = MemberSelectionExpression {
9518 member_object;
9519 member_operator;
9520 member_name;
9521 } in
9522 let value = ValueBuilder.value_from_syntax syntax in
9523 make syntax value
9525 let make_safe_member_selection_expression
9526 safe_member_object
9527 safe_member_operator
9528 safe_member_name
9530 let syntax = SafeMemberSelectionExpression {
9531 safe_member_object;
9532 safe_member_operator;
9533 safe_member_name;
9534 } in
9535 let value = ValueBuilder.value_from_syntax syntax in
9536 make syntax value
9538 let make_embedded_member_selection_expression
9539 embedded_member_object
9540 embedded_member_operator
9541 embedded_member_name
9543 let syntax = EmbeddedMemberSelectionExpression {
9544 embedded_member_object;
9545 embedded_member_operator;
9546 embedded_member_name;
9547 } in
9548 let value = ValueBuilder.value_from_syntax syntax in
9549 make syntax value
9551 let make_yield_expression
9552 yield_keyword
9553 yield_operand
9555 let syntax = YieldExpression {
9556 yield_keyword;
9557 yield_operand;
9558 } in
9559 let value = ValueBuilder.value_from_syntax syntax in
9560 make syntax value
9562 let make_yield_from_expression
9563 yield_from_yield_keyword
9564 yield_from_from_keyword
9565 yield_from_operand
9567 let syntax = YieldFromExpression {
9568 yield_from_yield_keyword;
9569 yield_from_from_keyword;
9570 yield_from_operand;
9571 } in
9572 let value = ValueBuilder.value_from_syntax syntax in
9573 make syntax value
9575 let make_prefix_unary_expression
9576 prefix_unary_operator
9577 prefix_unary_operand
9579 let syntax = PrefixUnaryExpression {
9580 prefix_unary_operator;
9581 prefix_unary_operand;
9582 } in
9583 let value = ValueBuilder.value_from_syntax syntax in
9584 make syntax value
9586 let make_postfix_unary_expression
9587 postfix_unary_operand
9588 postfix_unary_operator
9590 let syntax = PostfixUnaryExpression {
9591 postfix_unary_operand;
9592 postfix_unary_operator;
9593 } in
9594 let value = ValueBuilder.value_from_syntax syntax in
9595 make syntax value
9597 let make_binary_expression
9598 binary_left_operand
9599 binary_operator
9600 binary_right_operand
9602 let syntax = BinaryExpression {
9603 binary_left_operand;
9604 binary_operator;
9605 binary_right_operand;
9606 } in
9607 let value = ValueBuilder.value_from_syntax syntax in
9608 make syntax value
9610 let make_instanceof_expression
9611 instanceof_left_operand
9612 instanceof_operator
9613 instanceof_right_operand
9615 let syntax = InstanceofExpression {
9616 instanceof_left_operand;
9617 instanceof_operator;
9618 instanceof_right_operand;
9619 } in
9620 let value = ValueBuilder.value_from_syntax syntax in
9621 make syntax value
9623 let make_is_expression
9624 is_left_operand
9625 is_operator
9626 is_right_operand
9628 let syntax = IsExpression {
9629 is_left_operand;
9630 is_operator;
9631 is_right_operand;
9632 } in
9633 let value = ValueBuilder.value_from_syntax syntax in
9634 make syntax value
9636 let make_as_expression
9637 as_left_operand
9638 as_operator
9639 as_right_operand
9641 let syntax = AsExpression {
9642 as_left_operand;
9643 as_operator;
9644 as_right_operand;
9645 } in
9646 let value = ValueBuilder.value_from_syntax syntax in
9647 make syntax value
9649 let make_nullable_as_expression
9650 nullable_as_left_operand
9651 nullable_as_operator
9652 nullable_as_right_operand
9654 let syntax = NullableAsExpression {
9655 nullable_as_left_operand;
9656 nullable_as_operator;
9657 nullable_as_right_operand;
9658 } in
9659 let value = ValueBuilder.value_from_syntax syntax in
9660 make syntax value
9662 let make_conditional_expression
9663 conditional_test
9664 conditional_question
9665 conditional_consequence
9666 conditional_colon
9667 conditional_alternative
9669 let syntax = ConditionalExpression {
9670 conditional_test;
9671 conditional_question;
9672 conditional_consequence;
9673 conditional_colon;
9674 conditional_alternative;
9675 } in
9676 let value = ValueBuilder.value_from_syntax syntax in
9677 make syntax value
9679 let make_eval_expression
9680 eval_keyword
9681 eval_left_paren
9682 eval_argument
9683 eval_right_paren
9685 let syntax = EvalExpression {
9686 eval_keyword;
9687 eval_left_paren;
9688 eval_argument;
9689 eval_right_paren;
9690 } in
9691 let value = ValueBuilder.value_from_syntax syntax in
9692 make syntax value
9694 let make_empty_expression
9695 empty_keyword
9696 empty_left_paren
9697 empty_argument
9698 empty_right_paren
9700 let syntax = EmptyExpression {
9701 empty_keyword;
9702 empty_left_paren;
9703 empty_argument;
9704 empty_right_paren;
9705 } in
9706 let value = ValueBuilder.value_from_syntax syntax in
9707 make syntax value
9709 let make_define_expression
9710 define_keyword
9711 define_left_paren
9712 define_argument_list
9713 define_right_paren
9715 let syntax = DefineExpression {
9716 define_keyword;
9717 define_left_paren;
9718 define_argument_list;
9719 define_right_paren;
9720 } in
9721 let value = ValueBuilder.value_from_syntax syntax in
9722 make syntax value
9724 let make_halt_compiler_expression
9725 halt_compiler_keyword
9726 halt_compiler_left_paren
9727 halt_compiler_argument_list
9728 halt_compiler_right_paren
9730 let syntax = HaltCompilerExpression {
9731 halt_compiler_keyword;
9732 halt_compiler_left_paren;
9733 halt_compiler_argument_list;
9734 halt_compiler_right_paren;
9735 } in
9736 let value = ValueBuilder.value_from_syntax syntax in
9737 make syntax value
9739 let make_isset_expression
9740 isset_keyword
9741 isset_left_paren
9742 isset_argument_list
9743 isset_right_paren
9745 let syntax = IssetExpression {
9746 isset_keyword;
9747 isset_left_paren;
9748 isset_argument_list;
9749 isset_right_paren;
9750 } in
9751 let value = ValueBuilder.value_from_syntax syntax in
9752 make syntax value
9754 let make_function_call_expression
9755 function_call_receiver
9756 function_call_left_paren
9757 function_call_argument_list
9758 function_call_right_paren
9760 let syntax = FunctionCallExpression {
9761 function_call_receiver;
9762 function_call_left_paren;
9763 function_call_argument_list;
9764 function_call_right_paren;
9765 } in
9766 let value = ValueBuilder.value_from_syntax syntax in
9767 make syntax value
9769 let make_function_call_with_type_arguments_expression
9770 function_call_with_type_arguments_receiver
9771 function_call_with_type_arguments_type_args
9772 function_call_with_type_arguments_left_paren
9773 function_call_with_type_arguments_argument_list
9774 function_call_with_type_arguments_right_paren
9776 let syntax = FunctionCallWithTypeArgumentsExpression {
9777 function_call_with_type_arguments_receiver;
9778 function_call_with_type_arguments_type_args;
9779 function_call_with_type_arguments_left_paren;
9780 function_call_with_type_arguments_argument_list;
9781 function_call_with_type_arguments_right_paren;
9782 } in
9783 let value = ValueBuilder.value_from_syntax syntax in
9784 make syntax value
9786 let make_parenthesized_expression
9787 parenthesized_expression_left_paren
9788 parenthesized_expression_expression
9789 parenthesized_expression_right_paren
9791 let syntax = ParenthesizedExpression {
9792 parenthesized_expression_left_paren;
9793 parenthesized_expression_expression;
9794 parenthesized_expression_right_paren;
9795 } in
9796 let value = ValueBuilder.value_from_syntax syntax in
9797 make syntax value
9799 let make_braced_expression
9800 braced_expression_left_brace
9801 braced_expression_expression
9802 braced_expression_right_brace
9804 let syntax = BracedExpression {
9805 braced_expression_left_brace;
9806 braced_expression_expression;
9807 braced_expression_right_brace;
9808 } in
9809 let value = ValueBuilder.value_from_syntax syntax in
9810 make syntax value
9812 let make_embedded_braced_expression
9813 embedded_braced_expression_left_brace
9814 embedded_braced_expression_expression
9815 embedded_braced_expression_right_brace
9817 let syntax = EmbeddedBracedExpression {
9818 embedded_braced_expression_left_brace;
9819 embedded_braced_expression_expression;
9820 embedded_braced_expression_right_brace;
9821 } in
9822 let value = ValueBuilder.value_from_syntax syntax in
9823 make syntax value
9825 let make_list_expression
9826 list_keyword
9827 list_left_paren
9828 list_members
9829 list_right_paren
9831 let syntax = ListExpression {
9832 list_keyword;
9833 list_left_paren;
9834 list_members;
9835 list_right_paren;
9836 } in
9837 let value = ValueBuilder.value_from_syntax syntax in
9838 make syntax value
9840 let make_collection_literal_expression
9841 collection_literal_name
9842 collection_literal_left_brace
9843 collection_literal_initializers
9844 collection_literal_right_brace
9846 let syntax = CollectionLiteralExpression {
9847 collection_literal_name;
9848 collection_literal_left_brace;
9849 collection_literal_initializers;
9850 collection_literal_right_brace;
9851 } in
9852 let value = ValueBuilder.value_from_syntax syntax in
9853 make syntax value
9855 let make_object_creation_expression
9856 object_creation_new_keyword
9857 object_creation_object
9859 let syntax = ObjectCreationExpression {
9860 object_creation_new_keyword;
9861 object_creation_object;
9862 } in
9863 let value = ValueBuilder.value_from_syntax syntax in
9864 make syntax value
9866 let make_constructor_call
9867 constructor_call_type
9868 constructor_call_left_paren
9869 constructor_call_argument_list
9870 constructor_call_right_paren
9872 let syntax = ConstructorCall {
9873 constructor_call_type;
9874 constructor_call_left_paren;
9875 constructor_call_argument_list;
9876 constructor_call_right_paren;
9877 } in
9878 let value = ValueBuilder.value_from_syntax syntax in
9879 make syntax value
9881 let make_array_creation_expression
9882 array_creation_left_bracket
9883 array_creation_members
9884 array_creation_right_bracket
9886 let syntax = ArrayCreationExpression {
9887 array_creation_left_bracket;
9888 array_creation_members;
9889 array_creation_right_bracket;
9890 } in
9891 let value = ValueBuilder.value_from_syntax syntax in
9892 make syntax value
9894 let make_array_intrinsic_expression
9895 array_intrinsic_keyword
9896 array_intrinsic_left_paren
9897 array_intrinsic_members
9898 array_intrinsic_right_paren
9900 let syntax = ArrayIntrinsicExpression {
9901 array_intrinsic_keyword;
9902 array_intrinsic_left_paren;
9903 array_intrinsic_members;
9904 array_intrinsic_right_paren;
9905 } in
9906 let value = ValueBuilder.value_from_syntax syntax in
9907 make syntax value
9909 let make_darray_intrinsic_expression
9910 darray_intrinsic_keyword
9911 darray_intrinsic_explicit_type
9912 darray_intrinsic_left_bracket
9913 darray_intrinsic_members
9914 darray_intrinsic_right_bracket
9916 let syntax = DarrayIntrinsicExpression {
9917 darray_intrinsic_keyword;
9918 darray_intrinsic_explicit_type;
9919 darray_intrinsic_left_bracket;
9920 darray_intrinsic_members;
9921 darray_intrinsic_right_bracket;
9922 } in
9923 let value = ValueBuilder.value_from_syntax syntax in
9924 make syntax value
9926 let make_dictionary_intrinsic_expression
9927 dictionary_intrinsic_keyword
9928 dictionary_intrinsic_explicit_type
9929 dictionary_intrinsic_left_bracket
9930 dictionary_intrinsic_members
9931 dictionary_intrinsic_right_bracket
9933 let syntax = DictionaryIntrinsicExpression {
9934 dictionary_intrinsic_keyword;
9935 dictionary_intrinsic_explicit_type;
9936 dictionary_intrinsic_left_bracket;
9937 dictionary_intrinsic_members;
9938 dictionary_intrinsic_right_bracket;
9939 } in
9940 let value = ValueBuilder.value_from_syntax syntax in
9941 make syntax value
9943 let make_keyset_intrinsic_expression
9944 keyset_intrinsic_keyword
9945 keyset_intrinsic_explicit_type
9946 keyset_intrinsic_left_bracket
9947 keyset_intrinsic_members
9948 keyset_intrinsic_right_bracket
9950 let syntax = KeysetIntrinsicExpression {
9951 keyset_intrinsic_keyword;
9952 keyset_intrinsic_explicit_type;
9953 keyset_intrinsic_left_bracket;
9954 keyset_intrinsic_members;
9955 keyset_intrinsic_right_bracket;
9956 } in
9957 let value = ValueBuilder.value_from_syntax syntax in
9958 make syntax value
9960 let make_varray_intrinsic_expression
9961 varray_intrinsic_keyword
9962 varray_intrinsic_explicit_type
9963 varray_intrinsic_left_bracket
9964 varray_intrinsic_members
9965 varray_intrinsic_right_bracket
9967 let syntax = VarrayIntrinsicExpression {
9968 varray_intrinsic_keyword;
9969 varray_intrinsic_explicit_type;
9970 varray_intrinsic_left_bracket;
9971 varray_intrinsic_members;
9972 varray_intrinsic_right_bracket;
9973 } in
9974 let value = ValueBuilder.value_from_syntax syntax in
9975 make syntax value
9977 let make_vector_intrinsic_expression
9978 vector_intrinsic_keyword
9979 vector_intrinsic_explicit_type
9980 vector_intrinsic_left_bracket
9981 vector_intrinsic_members
9982 vector_intrinsic_right_bracket
9984 let syntax = VectorIntrinsicExpression {
9985 vector_intrinsic_keyword;
9986 vector_intrinsic_explicit_type;
9987 vector_intrinsic_left_bracket;
9988 vector_intrinsic_members;
9989 vector_intrinsic_right_bracket;
9990 } in
9991 let value = ValueBuilder.value_from_syntax syntax in
9992 make syntax value
9994 let make_element_initializer
9995 element_key
9996 element_arrow
9997 element_value
9999 let syntax = ElementInitializer {
10000 element_key;
10001 element_arrow;
10002 element_value;
10003 } in
10004 let value = ValueBuilder.value_from_syntax syntax in
10005 make syntax value
10007 let make_subscript_expression
10008 subscript_receiver
10009 subscript_left_bracket
10010 subscript_index
10011 subscript_right_bracket
10013 let syntax = SubscriptExpression {
10014 subscript_receiver;
10015 subscript_left_bracket;
10016 subscript_index;
10017 subscript_right_bracket;
10018 } in
10019 let value = ValueBuilder.value_from_syntax syntax in
10020 make syntax value
10022 let make_embedded_subscript_expression
10023 embedded_subscript_receiver
10024 embedded_subscript_left_bracket
10025 embedded_subscript_index
10026 embedded_subscript_right_bracket
10028 let syntax = EmbeddedSubscriptExpression {
10029 embedded_subscript_receiver;
10030 embedded_subscript_left_bracket;
10031 embedded_subscript_index;
10032 embedded_subscript_right_bracket;
10033 } in
10034 let value = ValueBuilder.value_from_syntax syntax in
10035 make syntax value
10037 let make_awaitable_creation_expression
10038 awaitable_attribute_spec
10039 awaitable_async
10040 awaitable_coroutine
10041 awaitable_compound_statement
10043 let syntax = AwaitableCreationExpression {
10044 awaitable_attribute_spec;
10045 awaitable_async;
10046 awaitable_coroutine;
10047 awaitable_compound_statement;
10048 } in
10049 let value = ValueBuilder.value_from_syntax syntax in
10050 make syntax value
10052 let make_xhp_children_declaration
10053 xhp_children_keyword
10054 xhp_children_expression
10055 xhp_children_semicolon
10057 let syntax = XHPChildrenDeclaration {
10058 xhp_children_keyword;
10059 xhp_children_expression;
10060 xhp_children_semicolon;
10061 } in
10062 let value = ValueBuilder.value_from_syntax syntax in
10063 make syntax value
10065 let make_xhp_children_parenthesized_list
10066 xhp_children_list_left_paren
10067 xhp_children_list_xhp_children
10068 xhp_children_list_right_paren
10070 let syntax = XHPChildrenParenthesizedList {
10071 xhp_children_list_left_paren;
10072 xhp_children_list_xhp_children;
10073 xhp_children_list_right_paren;
10074 } in
10075 let value = ValueBuilder.value_from_syntax syntax in
10076 make syntax value
10078 let make_xhp_category_declaration
10079 xhp_category_keyword
10080 xhp_category_categories
10081 xhp_category_semicolon
10083 let syntax = XHPCategoryDeclaration {
10084 xhp_category_keyword;
10085 xhp_category_categories;
10086 xhp_category_semicolon;
10087 } in
10088 let value = ValueBuilder.value_from_syntax syntax in
10089 make syntax value
10091 let make_xhp_enum_type
10092 xhp_enum_optional
10093 xhp_enum_keyword
10094 xhp_enum_left_brace
10095 xhp_enum_values
10096 xhp_enum_right_brace
10098 let syntax = XHPEnumType {
10099 xhp_enum_optional;
10100 xhp_enum_keyword;
10101 xhp_enum_left_brace;
10102 xhp_enum_values;
10103 xhp_enum_right_brace;
10104 } in
10105 let value = ValueBuilder.value_from_syntax syntax in
10106 make syntax value
10108 let make_xhp_required
10109 xhp_required_at
10110 xhp_required_keyword
10112 let syntax = XHPRequired {
10113 xhp_required_at;
10114 xhp_required_keyword;
10115 } in
10116 let value = ValueBuilder.value_from_syntax syntax in
10117 make syntax value
10119 let make_xhp_class_attribute_declaration
10120 xhp_attribute_keyword
10121 xhp_attribute_attributes
10122 xhp_attribute_semicolon
10124 let syntax = XHPClassAttributeDeclaration {
10125 xhp_attribute_keyword;
10126 xhp_attribute_attributes;
10127 xhp_attribute_semicolon;
10128 } in
10129 let value = ValueBuilder.value_from_syntax syntax in
10130 make syntax value
10132 let make_xhp_class_attribute
10133 xhp_attribute_decl_type
10134 xhp_attribute_decl_name
10135 xhp_attribute_decl_initializer
10136 xhp_attribute_decl_required
10138 let syntax = XHPClassAttribute {
10139 xhp_attribute_decl_type;
10140 xhp_attribute_decl_name;
10141 xhp_attribute_decl_initializer;
10142 xhp_attribute_decl_required;
10143 } in
10144 let value = ValueBuilder.value_from_syntax syntax in
10145 make syntax value
10147 let make_xhp_simple_class_attribute
10148 xhp_simple_class_attribute_type
10150 let syntax = XHPSimpleClassAttribute {
10151 xhp_simple_class_attribute_type;
10152 } in
10153 let value = ValueBuilder.value_from_syntax syntax in
10154 make syntax value
10156 let make_xhp_simple_attribute
10157 xhp_simple_attribute_name
10158 xhp_simple_attribute_equal
10159 xhp_simple_attribute_expression
10161 let syntax = XHPSimpleAttribute {
10162 xhp_simple_attribute_name;
10163 xhp_simple_attribute_equal;
10164 xhp_simple_attribute_expression;
10165 } in
10166 let value = ValueBuilder.value_from_syntax syntax in
10167 make syntax value
10169 let make_xhp_spread_attribute
10170 xhp_spread_attribute_left_brace
10171 xhp_spread_attribute_spread_operator
10172 xhp_spread_attribute_expression
10173 xhp_spread_attribute_right_brace
10175 let syntax = XHPSpreadAttribute {
10176 xhp_spread_attribute_left_brace;
10177 xhp_spread_attribute_spread_operator;
10178 xhp_spread_attribute_expression;
10179 xhp_spread_attribute_right_brace;
10180 } in
10181 let value = ValueBuilder.value_from_syntax syntax in
10182 make syntax value
10184 let make_xhp_open
10185 xhp_open_left_angle
10186 xhp_open_name
10187 xhp_open_attributes
10188 xhp_open_right_angle
10190 let syntax = XHPOpen {
10191 xhp_open_left_angle;
10192 xhp_open_name;
10193 xhp_open_attributes;
10194 xhp_open_right_angle;
10195 } in
10196 let value = ValueBuilder.value_from_syntax syntax in
10197 make syntax value
10199 let make_xhp_expression
10200 xhp_open
10201 xhp_body
10202 xhp_close
10204 let syntax = XHPExpression {
10205 xhp_open;
10206 xhp_body;
10207 xhp_close;
10208 } in
10209 let value = ValueBuilder.value_from_syntax syntax in
10210 make syntax value
10212 let make_xhp_close
10213 xhp_close_left_angle
10214 xhp_close_name
10215 xhp_close_right_angle
10217 let syntax = XHPClose {
10218 xhp_close_left_angle;
10219 xhp_close_name;
10220 xhp_close_right_angle;
10221 } in
10222 let value = ValueBuilder.value_from_syntax syntax in
10223 make syntax value
10225 let make_type_constant
10226 type_constant_left_type
10227 type_constant_separator
10228 type_constant_right_type
10230 let syntax = TypeConstant {
10231 type_constant_left_type;
10232 type_constant_separator;
10233 type_constant_right_type;
10234 } in
10235 let value = ValueBuilder.value_from_syntax syntax in
10236 make syntax value
10238 let make_vector_type_specifier
10239 vector_type_keyword
10240 vector_type_left_angle
10241 vector_type_type
10242 vector_type_trailing_comma
10243 vector_type_right_angle
10245 let syntax = VectorTypeSpecifier {
10246 vector_type_keyword;
10247 vector_type_left_angle;
10248 vector_type_type;
10249 vector_type_trailing_comma;
10250 vector_type_right_angle;
10251 } in
10252 let value = ValueBuilder.value_from_syntax syntax in
10253 make syntax value
10255 let make_keyset_type_specifier
10256 keyset_type_keyword
10257 keyset_type_left_angle
10258 keyset_type_type
10259 keyset_type_trailing_comma
10260 keyset_type_right_angle
10262 let syntax = KeysetTypeSpecifier {
10263 keyset_type_keyword;
10264 keyset_type_left_angle;
10265 keyset_type_type;
10266 keyset_type_trailing_comma;
10267 keyset_type_right_angle;
10268 } in
10269 let value = ValueBuilder.value_from_syntax syntax in
10270 make syntax value
10272 let make_tuple_type_explicit_specifier
10273 tuple_type_keyword
10274 tuple_type_left_angle
10275 tuple_type_types
10276 tuple_type_right_angle
10278 let syntax = TupleTypeExplicitSpecifier {
10279 tuple_type_keyword;
10280 tuple_type_left_angle;
10281 tuple_type_types;
10282 tuple_type_right_angle;
10283 } in
10284 let value = ValueBuilder.value_from_syntax syntax in
10285 make syntax value
10287 let make_varray_type_specifier
10288 varray_keyword
10289 varray_left_angle
10290 varray_type
10291 varray_trailing_comma
10292 varray_right_angle
10294 let syntax = VarrayTypeSpecifier {
10295 varray_keyword;
10296 varray_left_angle;
10297 varray_type;
10298 varray_trailing_comma;
10299 varray_right_angle;
10300 } in
10301 let value = ValueBuilder.value_from_syntax syntax in
10302 make syntax value
10304 let make_vector_array_type_specifier
10305 vector_array_keyword
10306 vector_array_left_angle
10307 vector_array_type
10308 vector_array_right_angle
10310 let syntax = VectorArrayTypeSpecifier {
10311 vector_array_keyword;
10312 vector_array_left_angle;
10313 vector_array_type;
10314 vector_array_right_angle;
10315 } in
10316 let value = ValueBuilder.value_from_syntax syntax in
10317 make syntax value
10319 let make_type_parameter
10320 type_reified
10321 type_variance
10322 type_name
10323 type_constraints
10325 let syntax = TypeParameter {
10326 type_reified;
10327 type_variance;
10328 type_name;
10329 type_constraints;
10330 } in
10331 let value = ValueBuilder.value_from_syntax syntax in
10332 make syntax value
10334 let make_type_constraint
10335 constraint_keyword
10336 constraint_type
10338 let syntax = TypeConstraint {
10339 constraint_keyword;
10340 constraint_type;
10341 } in
10342 let value = ValueBuilder.value_from_syntax syntax in
10343 make syntax value
10345 let make_darray_type_specifier
10346 darray_keyword
10347 darray_left_angle
10348 darray_key
10349 darray_comma
10350 darray_value
10351 darray_trailing_comma
10352 darray_right_angle
10354 let syntax = DarrayTypeSpecifier {
10355 darray_keyword;
10356 darray_left_angle;
10357 darray_key;
10358 darray_comma;
10359 darray_value;
10360 darray_trailing_comma;
10361 darray_right_angle;
10362 } in
10363 let value = ValueBuilder.value_from_syntax syntax in
10364 make syntax value
10366 let make_map_array_type_specifier
10367 map_array_keyword
10368 map_array_left_angle
10369 map_array_key
10370 map_array_comma
10371 map_array_value
10372 map_array_right_angle
10374 let syntax = MapArrayTypeSpecifier {
10375 map_array_keyword;
10376 map_array_left_angle;
10377 map_array_key;
10378 map_array_comma;
10379 map_array_value;
10380 map_array_right_angle;
10381 } in
10382 let value = ValueBuilder.value_from_syntax syntax in
10383 make syntax value
10385 let make_dictionary_type_specifier
10386 dictionary_type_keyword
10387 dictionary_type_left_angle
10388 dictionary_type_members
10389 dictionary_type_right_angle
10391 let syntax = DictionaryTypeSpecifier {
10392 dictionary_type_keyword;
10393 dictionary_type_left_angle;
10394 dictionary_type_members;
10395 dictionary_type_right_angle;
10396 } in
10397 let value = ValueBuilder.value_from_syntax syntax in
10398 make syntax value
10400 let make_closure_type_specifier
10401 closure_outer_left_paren
10402 closure_coroutine
10403 closure_function_keyword
10404 closure_inner_left_paren
10405 closure_parameter_list
10406 closure_inner_right_paren
10407 closure_colon
10408 closure_return_type
10409 closure_outer_right_paren
10411 let syntax = ClosureTypeSpecifier {
10412 closure_outer_left_paren;
10413 closure_coroutine;
10414 closure_function_keyword;
10415 closure_inner_left_paren;
10416 closure_parameter_list;
10417 closure_inner_right_paren;
10418 closure_colon;
10419 closure_return_type;
10420 closure_outer_right_paren;
10421 } in
10422 let value = ValueBuilder.value_from_syntax syntax in
10423 make syntax value
10425 let make_closure_parameter_type_specifier
10426 closure_parameter_call_convention
10427 closure_parameter_type
10429 let syntax = ClosureParameterTypeSpecifier {
10430 closure_parameter_call_convention;
10431 closure_parameter_type;
10432 } in
10433 let value = ValueBuilder.value_from_syntax syntax in
10434 make syntax value
10436 let make_classname_type_specifier
10437 classname_keyword
10438 classname_left_angle
10439 classname_type
10440 classname_trailing_comma
10441 classname_right_angle
10443 let syntax = ClassnameTypeSpecifier {
10444 classname_keyword;
10445 classname_left_angle;
10446 classname_type;
10447 classname_trailing_comma;
10448 classname_right_angle;
10449 } in
10450 let value = ValueBuilder.value_from_syntax syntax in
10451 make syntax value
10453 let make_field_specifier
10454 field_question
10455 field_name
10456 field_arrow
10457 field_type
10459 let syntax = FieldSpecifier {
10460 field_question;
10461 field_name;
10462 field_arrow;
10463 field_type;
10464 } in
10465 let value = ValueBuilder.value_from_syntax syntax in
10466 make syntax value
10468 let make_field_initializer
10469 field_initializer_name
10470 field_initializer_arrow
10471 field_initializer_value
10473 let syntax = FieldInitializer {
10474 field_initializer_name;
10475 field_initializer_arrow;
10476 field_initializer_value;
10477 } in
10478 let value = ValueBuilder.value_from_syntax syntax in
10479 make syntax value
10481 let make_shape_type_specifier
10482 shape_type_keyword
10483 shape_type_left_paren
10484 shape_type_fields
10485 shape_type_ellipsis
10486 shape_type_right_paren
10488 let syntax = ShapeTypeSpecifier {
10489 shape_type_keyword;
10490 shape_type_left_paren;
10491 shape_type_fields;
10492 shape_type_ellipsis;
10493 shape_type_right_paren;
10494 } in
10495 let value = ValueBuilder.value_from_syntax syntax in
10496 make syntax value
10498 let make_shape_expression
10499 shape_expression_keyword
10500 shape_expression_left_paren
10501 shape_expression_fields
10502 shape_expression_right_paren
10504 let syntax = ShapeExpression {
10505 shape_expression_keyword;
10506 shape_expression_left_paren;
10507 shape_expression_fields;
10508 shape_expression_right_paren;
10509 } in
10510 let value = ValueBuilder.value_from_syntax syntax in
10511 make syntax value
10513 let make_tuple_expression
10514 tuple_expression_keyword
10515 tuple_expression_left_paren
10516 tuple_expression_items
10517 tuple_expression_right_paren
10519 let syntax = TupleExpression {
10520 tuple_expression_keyword;
10521 tuple_expression_left_paren;
10522 tuple_expression_items;
10523 tuple_expression_right_paren;
10524 } in
10525 let value = ValueBuilder.value_from_syntax syntax in
10526 make syntax value
10528 let make_generic_type_specifier
10529 generic_class_type
10530 generic_argument_list
10532 let syntax = GenericTypeSpecifier {
10533 generic_class_type;
10534 generic_argument_list;
10535 } in
10536 let value = ValueBuilder.value_from_syntax syntax in
10537 make syntax value
10539 let make_nullable_type_specifier
10540 nullable_question
10541 nullable_type
10543 let syntax = NullableTypeSpecifier {
10544 nullable_question;
10545 nullable_type;
10546 } in
10547 let value = ValueBuilder.value_from_syntax syntax in
10548 make syntax value
10550 let make_soft_type_specifier
10551 soft_at
10552 soft_type
10554 let syntax = SoftTypeSpecifier {
10555 soft_at;
10556 soft_type;
10557 } in
10558 let value = ValueBuilder.value_from_syntax syntax in
10559 make syntax value
10561 let make_reified_type_argument
10562 reified_type_argument_reified
10563 reified_type_argument_type
10565 let syntax = ReifiedTypeArgument {
10566 reified_type_argument_reified;
10567 reified_type_argument_type;
10568 } in
10569 let value = ValueBuilder.value_from_syntax syntax in
10570 make syntax value
10572 let make_type_arguments
10573 type_arguments_left_angle
10574 type_arguments_types
10575 type_arguments_right_angle
10577 let syntax = TypeArguments {
10578 type_arguments_left_angle;
10579 type_arguments_types;
10580 type_arguments_right_angle;
10581 } in
10582 let value = ValueBuilder.value_from_syntax syntax in
10583 make syntax value
10585 let make_type_parameters
10586 type_parameters_left_angle
10587 type_parameters_parameters
10588 type_parameters_right_angle
10590 let syntax = TypeParameters {
10591 type_parameters_left_angle;
10592 type_parameters_parameters;
10593 type_parameters_right_angle;
10594 } in
10595 let value = ValueBuilder.value_from_syntax syntax in
10596 make syntax value
10598 let make_tuple_type_specifier
10599 tuple_left_paren
10600 tuple_types
10601 tuple_right_paren
10603 let syntax = TupleTypeSpecifier {
10604 tuple_left_paren;
10605 tuple_types;
10606 tuple_right_paren;
10607 } in
10608 let value = ValueBuilder.value_from_syntax syntax in
10609 make syntax value
10611 let make_error
10612 error_error
10614 let syntax = ErrorSyntax {
10615 error_error;
10616 } in
10617 let value = ValueBuilder.value_from_syntax syntax in
10618 make syntax value
10620 let make_list_item
10621 list_item
10622 list_separator
10624 let syntax = ListItem {
10625 list_item;
10626 list_separator;
10627 } in
10628 let value = ValueBuilder.value_from_syntax syntax in
10629 make syntax value
10633 let from_function_declaration {
10634 function_attribute_spec;
10635 function_declaration_header;
10636 function_body;
10637 } = FunctionDeclaration {
10638 function_attribute_spec;
10639 function_declaration_header;
10640 function_body;
10642 let from_function_declaration_header {
10643 function_modifiers;
10644 function_keyword;
10645 function_ampersand;
10646 function_name;
10647 function_type_parameter_list;
10648 function_left_paren;
10649 function_parameter_list;
10650 function_right_paren;
10651 function_colon;
10652 function_type;
10653 function_where_clause;
10654 } = FunctionDeclarationHeader {
10655 function_modifiers;
10656 function_keyword;
10657 function_ampersand;
10658 function_name;
10659 function_type_parameter_list;
10660 function_left_paren;
10661 function_parameter_list;
10662 function_right_paren;
10663 function_colon;
10664 function_type;
10665 function_where_clause;
10667 let from_methodish_declaration {
10668 methodish_attribute;
10669 methodish_function_decl_header;
10670 methodish_function_body;
10671 methodish_semicolon;
10672 } = MethodishDeclaration {
10673 methodish_attribute;
10674 methodish_function_decl_header;
10675 methodish_function_body;
10676 methodish_semicolon;
10678 let from_anonymous_function {
10679 anonymous_attribute_spec;
10680 anonymous_static_keyword;
10681 anonymous_async_keyword;
10682 anonymous_coroutine_keyword;
10683 anonymous_function_keyword;
10684 anonymous_ampersand;
10685 anonymous_left_paren;
10686 anonymous_parameters;
10687 anonymous_right_paren;
10688 anonymous_colon;
10689 anonymous_type;
10690 anonymous_use;
10691 anonymous_body;
10692 } = AnonymousFunction {
10693 anonymous_attribute_spec;
10694 anonymous_static_keyword;
10695 anonymous_async_keyword;
10696 anonymous_coroutine_keyword;
10697 anonymous_function_keyword;
10698 anonymous_ampersand;
10699 anonymous_left_paren;
10700 anonymous_parameters;
10701 anonymous_right_paren;
10702 anonymous_colon;
10703 anonymous_type;
10704 anonymous_use;
10705 anonymous_body;
10707 let from_lambda_expression {
10708 lambda_attribute_spec;
10709 lambda_async;
10710 lambda_coroutine;
10711 lambda_signature;
10712 lambda_arrow;
10713 lambda_body;
10714 } = LambdaExpression {
10715 lambda_attribute_spec;
10716 lambda_async;
10717 lambda_coroutine;
10718 lambda_signature;
10719 lambda_arrow;
10720 lambda_body;
10722 let from_lambda_signature {
10723 lambda_left_paren;
10724 lambda_parameters;
10725 lambda_right_paren;
10726 lambda_colon;
10727 lambda_type;
10728 } = LambdaSignature {
10729 lambda_left_paren;
10730 lambda_parameters;
10731 lambda_right_paren;
10732 lambda_colon;
10733 lambda_type;
10735 let from_closure_type_specifier {
10736 closure_outer_left_paren;
10737 closure_coroutine;
10738 closure_function_keyword;
10739 closure_inner_left_paren;
10740 closure_parameter_list;
10741 closure_inner_right_paren;
10742 closure_colon;
10743 closure_return_type;
10744 closure_outer_right_paren;
10745 } = ClosureTypeSpecifier {
10746 closure_outer_left_paren;
10747 closure_coroutine;
10748 closure_function_keyword;
10749 closure_inner_left_paren;
10750 closure_parameter_list;
10751 closure_inner_right_paren;
10752 closure_colon;
10753 closure_return_type;
10754 closure_outer_right_paren;
10758 let get_function_declaration x =
10759 match x with
10760 | FunctionDeclaration {
10761 function_attribute_spec;
10762 function_declaration_header;
10763 function_body;
10764 } -> {
10765 function_attribute_spec;
10766 function_declaration_header;
10767 function_body;
10769 | _ -> failwith "get_function_declaration: not a FunctionDeclaration"
10770 let get_function_declaration_header x =
10771 match x with
10772 | FunctionDeclarationHeader {
10773 function_modifiers;
10774 function_keyword;
10775 function_ampersand;
10776 function_name;
10777 function_type_parameter_list;
10778 function_left_paren;
10779 function_parameter_list;
10780 function_right_paren;
10781 function_colon;
10782 function_type;
10783 function_where_clause;
10784 } -> {
10785 function_modifiers;
10786 function_keyword;
10787 function_ampersand;
10788 function_name;
10789 function_type_parameter_list;
10790 function_left_paren;
10791 function_parameter_list;
10792 function_right_paren;
10793 function_colon;
10794 function_type;
10795 function_where_clause;
10797 | _ -> failwith "get_function_declaration_header: not a FunctionDeclarationHeader"
10798 let get_methodish_declaration x =
10799 match x with
10800 | MethodishDeclaration {
10801 methodish_attribute;
10802 methodish_function_decl_header;
10803 methodish_function_body;
10804 methodish_semicolon;
10805 } -> {
10806 methodish_attribute;
10807 methodish_function_decl_header;
10808 methodish_function_body;
10809 methodish_semicolon;
10811 | _ -> failwith "get_methodish_declaration: not a MethodishDeclaration"
10812 let get_anonymous_function x =
10813 match x with
10814 | AnonymousFunction {
10815 anonymous_attribute_spec;
10816 anonymous_static_keyword;
10817 anonymous_async_keyword;
10818 anonymous_coroutine_keyword;
10819 anonymous_function_keyword;
10820 anonymous_ampersand;
10821 anonymous_left_paren;
10822 anonymous_parameters;
10823 anonymous_right_paren;
10824 anonymous_colon;
10825 anonymous_type;
10826 anonymous_use;
10827 anonymous_body;
10828 } -> {
10829 anonymous_attribute_spec;
10830 anonymous_static_keyword;
10831 anonymous_async_keyword;
10832 anonymous_coroutine_keyword;
10833 anonymous_function_keyword;
10834 anonymous_ampersand;
10835 anonymous_left_paren;
10836 anonymous_parameters;
10837 anonymous_right_paren;
10838 anonymous_colon;
10839 anonymous_type;
10840 anonymous_use;
10841 anonymous_body;
10843 | _ -> failwith "get_anonymous_function: not a AnonymousFunction"
10844 let get_lambda_expression x =
10845 match x with
10846 | LambdaExpression {
10847 lambda_attribute_spec;
10848 lambda_async;
10849 lambda_coroutine;
10850 lambda_signature;
10851 lambda_arrow;
10852 lambda_body;
10853 } -> {
10854 lambda_attribute_spec;
10855 lambda_async;
10856 lambda_coroutine;
10857 lambda_signature;
10858 lambda_arrow;
10859 lambda_body;
10861 | _ -> failwith "get_lambda_expression: not a LambdaExpression"
10862 let get_lambda_signature x =
10863 match x with
10864 | LambdaSignature {
10865 lambda_left_paren;
10866 lambda_parameters;
10867 lambda_right_paren;
10868 lambda_colon;
10869 lambda_type;
10870 } -> {
10871 lambda_left_paren;
10872 lambda_parameters;
10873 lambda_right_paren;
10874 lambda_colon;
10875 lambda_type;
10877 | _ -> failwith "get_lambda_signature: not a LambdaSignature"
10878 let get_closure_type_specifier x =
10879 match x with
10880 | ClosureTypeSpecifier {
10881 closure_outer_left_paren;
10882 closure_coroutine;
10883 closure_function_keyword;
10884 closure_inner_left_paren;
10885 closure_parameter_list;
10886 closure_inner_right_paren;
10887 closure_colon;
10888 closure_return_type;
10889 closure_outer_right_paren;
10890 } -> {
10891 closure_outer_left_paren;
10892 closure_coroutine;
10893 closure_function_keyword;
10894 closure_inner_left_paren;
10895 closure_parameter_list;
10896 closure_inner_right_paren;
10897 closure_colon;
10898 closure_return_type;
10899 closure_outer_right_paren;
10901 | _ -> failwith "get_closure_type_specifier: not a ClosureTypeSpecifier"
10904 end (* WithValueBuilder *)
10905 end (* WithSyntaxValue *)
10906 end (* WithToken *)