aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/php
diff options
context:
space:
mode:
authorDaniel S Poulin2022-01-30 02:04:36 +0000
committerGitHub2022-01-30 02:04:36 +0000
commite2833b58533f3991fa68061a21486b1322239fe3 (patch)
treeb04c2db042737114e9b105d252e98f5979a45d15 /runtime/queries/php
parent333c2949c2b036f8aafa77be2286eb3c135ea269 (diff)
Add textobjects queries for php (#1601)
* Add textobjects queries for php * Missing EOL fix * Update generated docs after adding textobjects to php
Diffstat (limited to 'runtime/queries/php')
-rw-r--r--runtime/queries/php/textobjects.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/runtime/queries/php/textobjects.scm b/runtime/queries/php/textobjects.scm
new file mode 100644
index 00000000..04ffefd2
--- /dev/null
+++ b/runtime/queries/php/textobjects.scm
@@ -0,0 +1,30 @@
+(class_declaration
+ body: (_) @class.inside) @class.around
+
+(interface_declaration
+ body: (_) @class.inside) @class.around
+
+(trait_declaration
+ body: (_) @class.inside) @class.around
+
+(enum_declaration
+ body: (_) @class.inside) @class.around
+
+(function_definition
+ body: (_) @function.inside) @function.around
+
+(method_declaration
+ body: (_) @function.inside) @function.around
+
+(arrow_function
+ body: (_) @function.inside) @function.around
+
+(anonymous_function_creation_expression
+ body: (_) @function.inside) @function.around
+
+(formal_parameters
+ [
+ (simple_parameter)
+ (variadic_parameter)
+ (property_promotion_parameter)
+ ] @parameter.inside)