ast-grep-py 0.39.4__tar.gz → 0.39.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ast-grep-py might be problematic. Click here for more details.
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/Cargo.lock +100 -106
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/Cargo.toml +6 -6
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/PKG-INFO +1 -1
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/match_tree/match_node.rs +1 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/match_tree/strictness.rs +14 -2
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/Cargo.toml +2 -2
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/Cargo.toml +2 -2
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/src/py_node.rs +3 -3
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/pyproject.toml +1 -1
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/README.md +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/ast_grep_py/__init__.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/ast_grep_py/ast_grep_py.pyi +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/ast_grep_py/py.typed +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/Cargo.toml +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/check_var.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/combined.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/fixer.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/label.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/lib.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/maybe.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/deserialize_env.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/mod.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/nth_child.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/range.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/referent_rule.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/relational_rule.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/selector.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule/stop_by.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule_collection.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule_config.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/rule_core.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/transform/mod.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/transform/parse.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/transform/rewrite.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/transform/string_case.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/config/src/transform/trans.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/Cargo.toml +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/language.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/lib.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/match_tree/mod.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/matcher/kind.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/matcher/node_match.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/matcher/pattern.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/matcher/text.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/matcher.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/meta_var.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/node.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/ops.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/pinned.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/replacer/indent.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/replacer/structural.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/replacer/template.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/replacer.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/source.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/tree_sitter/mod.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/core/src/tree_sitter/traversal.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/dynamic/Cargo.toml +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/dynamic/src/custom_lang.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/dynamic/src/lib.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/bash.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/cpp.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/csharp.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/css.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/elixir.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/go.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/haskell.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/hcl.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/html.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/json.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/kotlin.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/lib.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/lua.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/nix.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/parsers.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/php.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/python.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/ruby.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/rust.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/scala.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/solidity.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/swift.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/language/src/yaml.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/README.md +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/ast_grep_py/__init__.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/ast_grep_py/ast_grep_py.pyi +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/ast_grep_py/py.typed +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/src/lib.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/src/py_lang.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/src/range.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/src/unicode_position.rs +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/tests/test_fix.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/tests/test_range.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/tests/test_register_lang.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/tests/test_rule.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/tests/test_simple.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/tests/test_traversal.py +0 -0
- {ast_grep_py-0.39.4 → ast_grep_py-0.39.5}/crates/pyo3/tests/test_wrong_usage.py +0 -0
|
@@ -87,9 +87,9 @@ dependencies = [
|
|
|
87
87
|
|
|
88
88
|
[[package]]
|
|
89
89
|
name = "anyhow"
|
|
90
|
-
version = "1.0.
|
|
90
|
+
version = "1.0.99"
|
|
91
91
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
|
-
checksum = "
|
|
92
|
+
checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"
|
|
93
93
|
|
|
94
94
|
[[package]]
|
|
95
95
|
name = "assert_cmd"
|
|
@@ -109,7 +109,7 @@ dependencies = [
|
|
|
109
109
|
|
|
110
110
|
[[package]]
|
|
111
111
|
name = "ast-grep"
|
|
112
|
-
version = "0.39.
|
|
112
|
+
version = "0.39.5"
|
|
113
113
|
dependencies = [
|
|
114
114
|
"ansi_term",
|
|
115
115
|
"anyhow",
|
|
@@ -143,7 +143,7 @@ dependencies = [
|
|
|
143
143
|
|
|
144
144
|
[[package]]
|
|
145
145
|
name = "ast-grep-config"
|
|
146
|
-
version = "0.39.
|
|
146
|
+
version = "0.39.5"
|
|
147
147
|
dependencies = [
|
|
148
148
|
"ast-grep-core",
|
|
149
149
|
"bit-set",
|
|
@@ -152,24 +152,24 @@ dependencies = [
|
|
|
152
152
|
"schemars",
|
|
153
153
|
"serde",
|
|
154
154
|
"serde_yaml",
|
|
155
|
-
"thiserror 2.0.
|
|
155
|
+
"thiserror 2.0.16",
|
|
156
156
|
"tree-sitter-typescript",
|
|
157
157
|
]
|
|
158
158
|
|
|
159
159
|
[[package]]
|
|
160
160
|
name = "ast-grep-core"
|
|
161
|
-
version = "0.39.
|
|
161
|
+
version = "0.39.5"
|
|
162
162
|
dependencies = [
|
|
163
163
|
"bit-set",
|
|
164
164
|
"regex",
|
|
165
|
-
"thiserror 2.0.
|
|
165
|
+
"thiserror 2.0.16",
|
|
166
166
|
"tree-sitter",
|
|
167
167
|
"tree-sitter-typescript",
|
|
168
168
|
]
|
|
169
169
|
|
|
170
170
|
[[package]]
|
|
171
171
|
name = "ast-grep-dynamic"
|
|
172
|
-
version = "0.39.
|
|
172
|
+
version = "0.39.5"
|
|
173
173
|
dependencies = [
|
|
174
174
|
"ast-grep-core",
|
|
175
175
|
"ignore",
|
|
@@ -177,13 +177,13 @@ dependencies = [
|
|
|
177
177
|
"serde",
|
|
178
178
|
"serde_yaml",
|
|
179
179
|
"target-triple",
|
|
180
|
-
"thiserror 2.0.
|
|
180
|
+
"thiserror 2.0.16",
|
|
181
181
|
"tree-sitter",
|
|
182
182
|
]
|
|
183
183
|
|
|
184
184
|
[[package]]
|
|
185
185
|
name = "ast-grep-language"
|
|
186
|
-
version = "0.39.
|
|
186
|
+
version = "0.39.5"
|
|
187
187
|
dependencies = [
|
|
188
188
|
"ast-grep-core",
|
|
189
189
|
"ignore",
|
|
@@ -218,22 +218,25 @@ dependencies = [
|
|
|
218
218
|
|
|
219
219
|
[[package]]
|
|
220
220
|
name = "ast-grep-lsp"
|
|
221
|
-
version = "0.39.
|
|
221
|
+
version = "0.39.5"
|
|
222
222
|
dependencies = [
|
|
223
223
|
"anyhow",
|
|
224
224
|
"ast-grep-config",
|
|
225
225
|
"ast-grep-core",
|
|
226
226
|
"ast-grep-language",
|
|
227
227
|
"dashmap",
|
|
228
|
+
"futures",
|
|
228
229
|
"serde",
|
|
229
230
|
"serde_json",
|
|
230
231
|
"tokio",
|
|
232
|
+
"tokio-stream",
|
|
233
|
+
"tokio-util",
|
|
231
234
|
"tower-lsp-server",
|
|
232
235
|
]
|
|
233
236
|
|
|
234
237
|
[[package]]
|
|
235
238
|
name = "ast-grep-napi"
|
|
236
|
-
version = "0.39.
|
|
239
|
+
version = "0.39.5"
|
|
237
240
|
dependencies = [
|
|
238
241
|
"ast-grep-config",
|
|
239
242
|
"ast-grep-core",
|
|
@@ -249,7 +252,7 @@ dependencies = [
|
|
|
249
252
|
|
|
250
253
|
[[package]]
|
|
251
254
|
name = "ast-grep-py"
|
|
252
|
-
version = "0.39.
|
|
255
|
+
version = "0.39.5"
|
|
253
256
|
dependencies = [
|
|
254
257
|
"anyhow",
|
|
255
258
|
"ast-grep-config",
|
|
@@ -366,9 +369,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
|
|
366
369
|
|
|
367
370
|
[[package]]
|
|
368
371
|
name = "clap"
|
|
369
|
-
version = "4.5.
|
|
372
|
+
version = "4.5.47"
|
|
370
373
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
371
|
-
checksum = "
|
|
374
|
+
checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931"
|
|
372
375
|
dependencies = [
|
|
373
376
|
"clap_builder",
|
|
374
377
|
"clap_derive",
|
|
@@ -376,9 +379,9 @@ dependencies = [
|
|
|
376
379
|
|
|
377
380
|
[[package]]
|
|
378
381
|
name = "clap_builder"
|
|
379
|
-
version = "4.5.
|
|
382
|
+
version = "4.5.47"
|
|
380
383
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
381
|
-
checksum = "
|
|
384
|
+
checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6"
|
|
382
385
|
dependencies = [
|
|
383
386
|
"anstream",
|
|
384
387
|
"anstyle",
|
|
@@ -388,18 +391,18 @@ dependencies = [
|
|
|
388
391
|
|
|
389
392
|
[[package]]
|
|
390
393
|
name = "clap_complete"
|
|
391
|
-
version = "4.5.
|
|
394
|
+
version = "4.5.57"
|
|
392
395
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
393
|
-
checksum = "
|
|
396
|
+
checksum = "4d9501bd3f5f09f7bbee01da9a511073ed30a80cd7a509f1214bb74eadea71ad"
|
|
394
397
|
dependencies = [
|
|
395
398
|
"clap",
|
|
396
399
|
]
|
|
397
400
|
|
|
398
401
|
[[package]]
|
|
399
402
|
name = "clap_derive"
|
|
400
|
-
version = "4.5.
|
|
403
|
+
version = "4.5.47"
|
|
401
404
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
402
|
-
checksum = "
|
|
405
|
+
checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c"
|
|
403
406
|
dependencies = [
|
|
404
407
|
"heck",
|
|
405
408
|
"proc-macro2",
|
|
@@ -459,9 +462,9 @@ dependencies = [
|
|
|
459
462
|
|
|
460
463
|
[[package]]
|
|
461
464
|
name = "crokey"
|
|
462
|
-
version = "1.
|
|
465
|
+
version = "1.3.0"
|
|
463
466
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
464
|
-
checksum = "
|
|
467
|
+
checksum = "51360853ebbeb3df20c76c82aecf43d387a62860f1a59ba65ab51f00eea85aad"
|
|
465
468
|
dependencies = [
|
|
466
469
|
"crokey-proc_macros",
|
|
467
470
|
"crossterm 0.29.0",
|
|
@@ -472,9 +475,9 @@ dependencies = [
|
|
|
472
475
|
|
|
473
476
|
[[package]]
|
|
474
477
|
name = "crokey-proc_macros"
|
|
475
|
-
version = "1.
|
|
478
|
+
version = "1.3.0"
|
|
476
479
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
477
|
-
checksum = "
|
|
480
|
+
checksum = "3bf1a727caeb5ee5e0a0826a97f205a9cf84ee964b0b48239fef5214a00ae439"
|
|
478
481
|
dependencies = [
|
|
479
482
|
"crossterm 0.29.0",
|
|
480
483
|
"proc-macro2",
|
|
@@ -582,32 +585,16 @@ dependencies = [
|
|
|
582
585
|
"winapi",
|
|
583
586
|
]
|
|
584
587
|
|
|
585
|
-
[[package]]
|
|
586
|
-
name = "ctor"
|
|
587
|
-
version = "0.4.2"
|
|
588
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
589
|
-
checksum = "a4735f265ba6a1188052ca32d461028a7d1125868be18e287e756019da7607b5"
|
|
590
|
-
dependencies = [
|
|
591
|
-
"ctor-proc-macro 0.0.5",
|
|
592
|
-
"dtor 0.0.6",
|
|
593
|
-
]
|
|
594
|
-
|
|
595
588
|
[[package]]
|
|
596
589
|
name = "ctor"
|
|
597
590
|
version = "0.5.0"
|
|
598
591
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
599
592
|
checksum = "67773048316103656a637612c4a62477603b777d91d9c62ff2290f9cde178fdb"
|
|
600
593
|
dependencies = [
|
|
601
|
-
"ctor-proc-macro
|
|
602
|
-
"dtor
|
|
594
|
+
"ctor-proc-macro",
|
|
595
|
+
"dtor",
|
|
603
596
|
]
|
|
604
597
|
|
|
605
|
-
[[package]]
|
|
606
|
-
name = "ctor-proc-macro"
|
|
607
|
-
version = "0.0.5"
|
|
608
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
609
|
-
checksum = "4f211af61d8efdd104f96e57adf5e426ba1bc3ed7a4ead616e15e5881fd79c4d"
|
|
610
|
-
|
|
611
598
|
[[package]]
|
|
612
599
|
name = "ctor-proc-macro"
|
|
613
600
|
version = "0.0.6"
|
|
@@ -670,30 +657,15 @@ dependencies = [
|
|
|
670
657
|
"litrs",
|
|
671
658
|
]
|
|
672
659
|
|
|
673
|
-
[[package]]
|
|
674
|
-
name = "dtor"
|
|
675
|
-
version = "0.0.6"
|
|
676
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
677
|
-
checksum = "97cbdf2ad6846025e8e25df05171abfb30e3ababa12ee0a0e44b9bbe570633a8"
|
|
678
|
-
dependencies = [
|
|
679
|
-
"dtor-proc-macro 0.0.5",
|
|
680
|
-
]
|
|
681
|
-
|
|
682
660
|
[[package]]
|
|
683
661
|
name = "dtor"
|
|
684
662
|
version = "0.1.0"
|
|
685
663
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
686
664
|
checksum = "e58a0764cddb55ab28955347b45be00ade43d4d6f3ba4bf3dc354e4ec9432934"
|
|
687
665
|
dependencies = [
|
|
688
|
-
"dtor-proc-macro
|
|
666
|
+
"dtor-proc-macro",
|
|
689
667
|
]
|
|
690
668
|
|
|
691
|
-
[[package]]
|
|
692
|
-
name = "dtor-proc-macro"
|
|
693
|
-
version = "0.0.5"
|
|
694
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
695
|
-
checksum = "7454e41ff9012c00d53cf7f475c5e3afa3b91b7c90568495495e8d9bf47a1055"
|
|
696
|
-
|
|
697
669
|
[[package]]
|
|
698
670
|
name = "dtor-proc-macro"
|
|
699
671
|
version = "0.0.6"
|
|
@@ -719,7 +691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
719
691
|
checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e"
|
|
720
692
|
dependencies = [
|
|
721
693
|
"libc",
|
|
722
|
-
"windows-sys 0.
|
|
694
|
+
"windows-sys 0.59.0",
|
|
723
695
|
]
|
|
724
696
|
|
|
725
697
|
[[package]]
|
|
@@ -754,6 +726,7 @@ checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
|
|
|
754
726
|
dependencies = [
|
|
755
727
|
"futures-channel",
|
|
756
728
|
"futures-core",
|
|
729
|
+
"futures-executor",
|
|
757
730
|
"futures-io",
|
|
758
731
|
"futures-sink",
|
|
759
732
|
"futures-task",
|
|
@@ -776,6 +749,17 @@ version = "0.3.31"
|
|
|
776
749
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
777
750
|
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
|
|
778
751
|
|
|
752
|
+
[[package]]
|
|
753
|
+
name = "futures-executor"
|
|
754
|
+
version = "0.3.31"
|
|
755
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
756
|
+
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
|
|
757
|
+
dependencies = [
|
|
758
|
+
"futures-core",
|
|
759
|
+
"futures-task",
|
|
760
|
+
"futures-util",
|
|
761
|
+
]
|
|
762
|
+
|
|
779
763
|
[[package]]
|
|
780
764
|
name = "futures-io"
|
|
781
765
|
version = "0.3.31"
|
|
@@ -1116,13 +1100,13 @@ dependencies = [
|
|
|
1116
1100
|
|
|
1117
1101
|
[[package]]
|
|
1118
1102
|
name = "napi"
|
|
1119
|
-
version = "3.2.
|
|
1103
|
+
version = "3.2.4"
|
|
1120
1104
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1121
|
-
checksum = "
|
|
1105
|
+
checksum = "fc1d56eed08a179e1c5bedb1613c58e882087cec97fcaa7788cc42366335a41d"
|
|
1122
1106
|
dependencies = [
|
|
1123
1107
|
"anyhow",
|
|
1124
1108
|
"bitflags 2.9.0",
|
|
1125
|
-
"ctor
|
|
1109
|
+
"ctor",
|
|
1126
1110
|
"napi-build",
|
|
1127
1111
|
"napi-sys",
|
|
1128
1112
|
"nohash-hasher",
|
|
@@ -1139,12 +1123,12 @@ checksum = "dcae8ad5609d14afb3a3b91dee88c757016261b151e9dcecabf1b2a31a6cab14"
|
|
|
1139
1123
|
|
|
1140
1124
|
[[package]]
|
|
1141
1125
|
name = "napi-derive"
|
|
1142
|
-
version = "3.2.
|
|
1126
|
+
version = "3.2.4"
|
|
1143
1127
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1144
|
-
checksum = "
|
|
1128
|
+
checksum = "3a9ad4169931359f24cc9ad3fae4ab272f0390c59f7a764f7719b1b8a3dde1af"
|
|
1145
1129
|
dependencies = [
|
|
1146
1130
|
"convert_case 0.8.0",
|
|
1147
|
-
"ctor
|
|
1131
|
+
"ctor",
|
|
1148
1132
|
"napi-derive-backend",
|
|
1149
1133
|
"proc-macro2",
|
|
1150
1134
|
"quote",
|
|
@@ -1153,9 +1137,9 @@ dependencies = [
|
|
|
1153
1137
|
|
|
1154
1138
|
[[package]]
|
|
1155
1139
|
name = "napi-derive-backend"
|
|
1156
|
-
version = "2.1.
|
|
1140
|
+
version = "2.1.4"
|
|
1157
1141
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1158
|
-
checksum = "
|
|
1142
|
+
checksum = "55a014314cb458d5832b4fc7d0041764ac136396447303d95e3fa0a5ea7cf5d3"
|
|
1159
1143
|
dependencies = [
|
|
1160
1144
|
"convert_case 0.8.0",
|
|
1161
1145
|
"proc-macro2",
|
|
@@ -1312,9 +1296,9 @@ dependencies = [
|
|
|
1312
1296
|
|
|
1313
1297
|
[[package]]
|
|
1314
1298
|
name = "pyo3"
|
|
1315
|
-
version = "0.
|
|
1299
|
+
version = "0.26.0"
|
|
1316
1300
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1317
|
-
checksum = "
|
|
1301
|
+
checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383"
|
|
1318
1302
|
dependencies = [
|
|
1319
1303
|
"anyhow",
|
|
1320
1304
|
"indoc",
|
|
@@ -1330,19 +1314,18 @@ dependencies = [
|
|
|
1330
1314
|
|
|
1331
1315
|
[[package]]
|
|
1332
1316
|
name = "pyo3-build-config"
|
|
1333
|
-
version = "0.
|
|
1317
|
+
version = "0.26.0"
|
|
1334
1318
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1335
|
-
checksum = "
|
|
1319
|
+
checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f"
|
|
1336
1320
|
dependencies = [
|
|
1337
|
-
"once_cell",
|
|
1338
1321
|
"target-lexicon",
|
|
1339
1322
|
]
|
|
1340
1323
|
|
|
1341
1324
|
[[package]]
|
|
1342
1325
|
name = "pyo3-ffi"
|
|
1343
|
-
version = "0.
|
|
1326
|
+
version = "0.26.0"
|
|
1344
1327
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1345
|
-
checksum = "
|
|
1328
|
+
checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105"
|
|
1346
1329
|
dependencies = [
|
|
1347
1330
|
"libc",
|
|
1348
1331
|
"pyo3-build-config",
|
|
@@ -1350,9 +1333,9 @@ dependencies = [
|
|
|
1350
1333
|
|
|
1351
1334
|
[[package]]
|
|
1352
1335
|
name = "pyo3-macros"
|
|
1353
|
-
version = "0.
|
|
1336
|
+
version = "0.26.0"
|
|
1354
1337
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1355
|
-
checksum = "
|
|
1338
|
+
checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded"
|
|
1356
1339
|
dependencies = [
|
|
1357
1340
|
"proc-macro2",
|
|
1358
1341
|
"pyo3-macros-backend",
|
|
@@ -1362,9 +1345,9 @@ dependencies = [
|
|
|
1362
1345
|
|
|
1363
1346
|
[[package]]
|
|
1364
1347
|
name = "pyo3-macros-backend"
|
|
1365
|
-
version = "0.
|
|
1348
|
+
version = "0.26.0"
|
|
1366
1349
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1367
|
-
checksum = "
|
|
1350
|
+
checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf"
|
|
1368
1351
|
dependencies = [
|
|
1369
1352
|
"heck",
|
|
1370
1353
|
"proc-macro2",
|
|
@@ -1375,9 +1358,9 @@ dependencies = [
|
|
|
1375
1358
|
|
|
1376
1359
|
[[package]]
|
|
1377
1360
|
name = "pythonize"
|
|
1378
|
-
version = "0.
|
|
1361
|
+
version = "0.26.0"
|
|
1379
1362
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1380
|
-
checksum = "
|
|
1363
|
+
checksum = "11e06e4cff9be2bbf2bddf28a486ae619172ea57e79787f856572878c62dcfe2"
|
|
1381
1364
|
dependencies = [
|
|
1382
1365
|
"pyo3",
|
|
1383
1366
|
"serde",
|
|
@@ -1429,9 +1412,9 @@ dependencies = [
|
|
|
1429
1412
|
|
|
1430
1413
|
[[package]]
|
|
1431
1414
|
name = "regex"
|
|
1432
|
-
version = "1.11.
|
|
1415
|
+
version = "1.11.2"
|
|
1433
1416
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1434
|
-
checksum = "
|
|
1417
|
+
checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
|
|
1435
1418
|
dependencies = [
|
|
1436
1419
|
"aho-corasick",
|
|
1437
1420
|
"memchr",
|
|
@@ -1478,7 +1461,7 @@ dependencies = [
|
|
|
1478
1461
|
"errno",
|
|
1479
1462
|
"libc",
|
|
1480
1463
|
"linux-raw-sys",
|
|
1481
|
-
"windows-sys 0.
|
|
1464
|
+
"windows-sys 0.59.0",
|
|
1482
1465
|
]
|
|
1483
1466
|
|
|
1484
1467
|
[[package]]
|
|
@@ -1566,9 +1549,9 @@ dependencies = [
|
|
|
1566
1549
|
|
|
1567
1550
|
[[package]]
|
|
1568
1551
|
name = "serde_json"
|
|
1569
|
-
version = "1.0.
|
|
1552
|
+
version = "1.0.143"
|
|
1570
1553
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1571
|
-
checksum = "
|
|
1554
|
+
checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
|
|
1572
1555
|
dependencies = [
|
|
1573
1556
|
"indexmap",
|
|
1574
1557
|
"itoa",
|
|
@@ -1708,15 +1691,15 @@ checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790"
|
|
|
1708
1691
|
|
|
1709
1692
|
[[package]]
|
|
1710
1693
|
name = "tempfile"
|
|
1711
|
-
version = "3.
|
|
1694
|
+
version = "3.21.0"
|
|
1712
1695
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1713
|
-
checksum = "
|
|
1696
|
+
checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e"
|
|
1714
1697
|
dependencies = [
|
|
1715
1698
|
"fastrand",
|
|
1716
1699
|
"getrandom",
|
|
1717
1700
|
"once_cell",
|
|
1718
1701
|
"rustix",
|
|
1719
|
-
"windows-sys 0.
|
|
1702
|
+
"windows-sys 0.59.0",
|
|
1720
1703
|
]
|
|
1721
1704
|
|
|
1722
1705
|
[[package]]
|
|
@@ -1730,9 +1713,9 @@ dependencies = [
|
|
|
1730
1713
|
|
|
1731
1714
|
[[package]]
|
|
1732
1715
|
name = "termimad"
|
|
1733
|
-
version = "0.
|
|
1716
|
+
version = "0.34.0"
|
|
1734
1717
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1735
|
-
checksum = "
|
|
1718
|
+
checksum = "68ff5ca043d65d4ea43b65cdb4e3aba119657d0d12caf44f93212ec3168a8e20"
|
|
1736
1719
|
dependencies = [
|
|
1737
1720
|
"coolor",
|
|
1738
1721
|
"crokey",
|
|
@@ -1740,7 +1723,7 @@ dependencies = [
|
|
|
1740
1723
|
"lazy-regex",
|
|
1741
1724
|
"minimad",
|
|
1742
1725
|
"serde",
|
|
1743
|
-
"thiserror 2.0.
|
|
1726
|
+
"thiserror 2.0.16",
|
|
1744
1727
|
"unicode-width 0.1.14",
|
|
1745
1728
|
]
|
|
1746
1729
|
|
|
@@ -1773,11 +1756,11 @@ dependencies = [
|
|
|
1773
1756
|
|
|
1774
1757
|
[[package]]
|
|
1775
1758
|
name = "thiserror"
|
|
1776
|
-
version = "2.0.
|
|
1759
|
+
version = "2.0.16"
|
|
1777
1760
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1778
|
-
checksum = "
|
|
1761
|
+
checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
|
|
1779
1762
|
dependencies = [
|
|
1780
|
-
"thiserror-impl 2.0.
|
|
1763
|
+
"thiserror-impl 2.0.16",
|
|
1781
1764
|
]
|
|
1782
1765
|
|
|
1783
1766
|
[[package]]
|
|
@@ -1793,9 +1776,9 @@ dependencies = [
|
|
|
1793
1776
|
|
|
1794
1777
|
[[package]]
|
|
1795
1778
|
name = "thiserror-impl"
|
|
1796
|
-
version = "2.0.
|
|
1779
|
+
version = "2.0.16"
|
|
1797
1780
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1798
|
-
checksum = "
|
|
1781
|
+
checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
|
|
1799
1782
|
dependencies = [
|
|
1800
1783
|
"proc-macro2",
|
|
1801
1784
|
"quote",
|
|
@@ -1839,11 +1822,22 @@ dependencies = [
|
|
|
1839
1822
|
"syn",
|
|
1840
1823
|
]
|
|
1841
1824
|
|
|
1825
|
+
[[package]]
|
|
1826
|
+
name = "tokio-stream"
|
|
1827
|
+
version = "0.1.17"
|
|
1828
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1829
|
+
checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
|
|
1830
|
+
dependencies = [
|
|
1831
|
+
"futures-core",
|
|
1832
|
+
"pin-project-lite",
|
|
1833
|
+
"tokio",
|
|
1834
|
+
]
|
|
1835
|
+
|
|
1842
1836
|
[[package]]
|
|
1843
1837
|
name = "tokio-util"
|
|
1844
|
-
version = "0.7.
|
|
1838
|
+
version = "0.7.16"
|
|
1845
1839
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1846
|
-
checksum = "
|
|
1840
|
+
checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5"
|
|
1847
1841
|
dependencies = [
|
|
1848
1842
|
"bytes",
|
|
1849
1843
|
"futures-core",
|
|
@@ -1863,9 +1857,9 @@ dependencies = [
|
|
|
1863
1857
|
|
|
1864
1858
|
[[package]]
|
|
1865
1859
|
name = "toml_edit"
|
|
1866
|
-
version = "0.23.
|
|
1860
|
+
version = "0.23.4"
|
|
1867
1861
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1868
|
-
checksum = "
|
|
1862
|
+
checksum = "7211ff1b8f0d3adae1663b7da9ffe396eabe1ca25f0b0bee42b0da29a9ddce93"
|
|
1869
1863
|
dependencies = [
|
|
1870
1864
|
"indexmap",
|
|
1871
1865
|
"toml_datetime",
|
|
@@ -2092,9 +2086,9 @@ dependencies = [
|
|
|
2092
2086
|
|
|
2093
2087
|
[[package]]
|
|
2094
2088
|
name = "tree-sitter-javascript"
|
|
2095
|
-
version = "0.
|
|
2089
|
+
version = "0.25.0"
|
|
2096
2090
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2097
|
-
checksum = "
|
|
2091
|
+
checksum = "68204f2abc0627a90bdf06e605f5c470aa26fdcb2081ea553a04bdad756693f5"
|
|
2098
2092
|
dependencies = [
|
|
2099
2093
|
"cc",
|
|
2100
2094
|
"tree-sitter-language",
|
|
@@ -2148,9 +2142,9 @@ dependencies = [
|
|
|
2148
2142
|
|
|
2149
2143
|
[[package]]
|
|
2150
2144
|
name = "tree-sitter-php"
|
|
2151
|
-
version = "0.
|
|
2145
|
+
version = "0.24.2"
|
|
2152
2146
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2153
|
-
checksum = "
|
|
2147
|
+
checksum = "0d8c17c3ab69052c5eeaa7ff5cd972dd1bc25d1b97ee779fec391ad3b5df5592"
|
|
2154
2148
|
dependencies = [
|
|
2155
2149
|
"cc",
|
|
2156
2150
|
"tree-sitter-language",
|
|
@@ -2334,7 +2328,7 @@ version = "0.1.9"
|
|
|
2334
2328
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2335
2329
|
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
|
2336
2330
|
dependencies = [
|
|
2337
|
-
"windows-sys 0.
|
|
2331
|
+
"windows-sys 0.59.0",
|
|
2338
2332
|
]
|
|
2339
2333
|
|
|
2340
2334
|
[[package]]
|
|
@@ -7,7 +7,7 @@ resolver = "2"
|
|
|
7
7
|
lto = true
|
|
8
8
|
|
|
9
9
|
[workspace.package]
|
|
10
|
-
version = "0.39.
|
|
10
|
+
version = "0.39.5"
|
|
11
11
|
authors = ["Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>"]
|
|
12
12
|
edition = "2021"
|
|
13
13
|
license = "MIT"
|
|
@@ -18,11 +18,11 @@ rust-version = "1.79"
|
|
|
18
18
|
readme = "README.md"
|
|
19
19
|
|
|
20
20
|
[workspace.dependencies]
|
|
21
|
-
ast-grep-core = { path = "crates/core", version = "0.39.
|
|
22
|
-
ast-grep-config = { path = "crates/config", version = "0.39.
|
|
23
|
-
ast-grep-dynamic = { path = "crates/dynamic", version = "0.39.
|
|
24
|
-
ast-grep-language = { path = "crates/language", version = "0.39.
|
|
25
|
-
ast-grep-lsp = { path = "crates/lsp", version = "0.39.
|
|
21
|
+
ast-grep-core = { path = "crates/core", version = "0.39.5", default-features = false }
|
|
22
|
+
ast-grep-config = { path = "crates/config", version = "0.39.5" }
|
|
23
|
+
ast-grep-dynamic = { path = "crates/dynamic", version = "0.39.5" }
|
|
24
|
+
ast-grep-language = { path = "crates/language", version = "0.39.5" }
|
|
25
|
+
ast-grep-lsp = { path = "crates/lsp", version = "0.39.5" }
|
|
26
26
|
|
|
27
27
|
bit-set = { version = "0.8.0" }
|
|
28
28
|
ignore = { version = "0.4.22" }
|
|
@@ -46,6 +46,15 @@ impl MatchStrictness {
|
|
|
46
46
|
M::Signature => false,
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
fn should_skip_comment(&self) -> bool {
|
|
51
|
+
use MatchStrictness as M;
|
|
52
|
+
match self {
|
|
53
|
+
M::Cst | M::Smart | M::Ast => false,
|
|
54
|
+
M::Relaxed | M::Signature | M::Template => true,
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
pub(crate) fn match_terminal(
|
|
50
59
|
&self,
|
|
51
60
|
is_named: bool,
|
|
@@ -62,16 +71,19 @@ impl MatchStrictness {
|
|
|
62
71
|
if is_kind_matched && (!is_named || text == candidate.text()) {
|
|
63
72
|
return MatchOneNode::MatchedBoth;
|
|
64
73
|
}
|
|
74
|
+
if self.should_skip_comment() && skip_comment(candidate) {
|
|
75
|
+
return MatchOneNode::SkipCandidate;
|
|
76
|
+
}
|
|
65
77
|
let (skip_goal, skip_candidate) = match self {
|
|
66
78
|
M::Cst => (false, false),
|
|
67
79
|
M::Smart => (false, !candidate.is_named()),
|
|
68
80
|
M::Ast => (!is_named, !candidate.is_named()),
|
|
69
|
-
M::Relaxed => (!is_named,
|
|
81
|
+
M::Relaxed => (!is_named, !candidate.is_named()),
|
|
70
82
|
M::Signature => {
|
|
71
83
|
if is_kind_matched {
|
|
72
84
|
return MatchOneNode::MatchedBoth;
|
|
73
85
|
}
|
|
74
|
-
(!is_named,
|
|
86
|
+
(!is_named, !candidate.is_named())
|
|
75
87
|
}
|
|
76
88
|
M::Template => {
|
|
77
89
|
if text == candidate.text() {
|
|
@@ -26,13 +26,13 @@ tree-sitter-elixir = { version = "0.3.0", optional = true }
|
|
|
26
26
|
tree-sitter-go = { version = "0.23.0", optional = true }
|
|
27
27
|
tree-sitter-haskell = { version = "0.23.0", optional = true }
|
|
28
28
|
tree-sitter-html = { version = "0.23.0", optional = true }
|
|
29
|
-
tree-sitter-javascript = { version = "0.
|
|
29
|
+
tree-sitter-javascript = { version = "0.25.0", optional = true }
|
|
30
30
|
tree-sitter-java = { version = "0.23.0", optional = true }
|
|
31
31
|
tree-sitter-json = { version = "0.23.0", optional = true }
|
|
32
32
|
tree-sitter-kotlin = { version = "0.4.0", optional = true, package = "tree-sitter-kotlin-sg" }
|
|
33
33
|
tree-sitter-lua = { version = "0.2.0", optional = true }
|
|
34
34
|
tree-sitter-nix = { version = "0.3.0", optional = true }
|
|
35
|
-
tree-sitter-php = { version = "0.
|
|
35
|
+
tree-sitter-php = { version = "0.24.0", optional = true }
|
|
36
36
|
tree-sitter-python = { version = "0.23.0", optional = true }
|
|
37
37
|
tree-sitter-ruby = { version = "0.23.0", optional = true }
|
|
38
38
|
tree-sitter-rust = { version = "0.24.0", optional = true }
|
|
@@ -23,8 +23,8 @@ ast-grep-config.workspace = true
|
|
|
23
23
|
ast-grep-language.workspace = true
|
|
24
24
|
ast-grep-dynamic.workspace = true
|
|
25
25
|
anyhow.workspace = true
|
|
26
|
-
pyo3 = { version = "0.
|
|
27
|
-
pythonize = { version = "0.
|
|
26
|
+
pyo3 = { version = "0.26.0", optional = true, features = ["anyhow", "py-clone"] }
|
|
27
|
+
pythonize = { version = "0.26.0", optional = true }
|
|
28
28
|
serde.workspace = true
|
|
29
29
|
|
|
30
30
|
# uncomment default features when developing pyo3
|
|
@@ -29,7 +29,7 @@ unsafe impl Send for SgNode {}
|
|
|
29
29
|
impl SgNode {
|
|
30
30
|
/*---------- Node Inspection ----------*/
|
|
31
31
|
fn range(&self) -> Range {
|
|
32
|
-
Python::
|
|
32
|
+
Python::attach(|py| {
|
|
33
33
|
let root = self.root.bind(py);
|
|
34
34
|
let root = root.borrow();
|
|
35
35
|
Range::from(&self.inner, &root.position)
|
|
@@ -254,7 +254,7 @@ impl SgNode {
|
|
|
254
254
|
/*---------- Edit ----------*/
|
|
255
255
|
fn replace(&self, text: &str) -> Edit {
|
|
256
256
|
let byte_range = self.inner.range();
|
|
257
|
-
Python::
|
|
257
|
+
Python::attach(|py| {
|
|
258
258
|
let root = self.root.bind(py);
|
|
259
259
|
let root = root.borrow();
|
|
260
260
|
let start_pos = root.position.byte_to_char(byte_range.start);
|
|
@@ -271,7 +271,7 @@ impl SgNode {
|
|
|
271
271
|
edits.sort_by_key(|edit| edit.start_pos);
|
|
272
272
|
let mut new_content = String::new();
|
|
273
273
|
let old_content = self.text();
|
|
274
|
-
let converted: Vec<_> = Python::
|
|
274
|
+
let converted: Vec<_> = Python::attach(move |py| {
|
|
275
275
|
let root = self.root.bind(py);
|
|
276
276
|
let root = root.borrow();
|
|
277
277
|
let conv = &root.position;
|
|
@@ -5,7 +5,7 @@ build-backend = "maturin"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ast-grep-py"
|
|
7
7
|
requires-python = ">=3.8"
|
|
8
|
-
version = "0.39.
|
|
8
|
+
version = "0.39.5"
|
|
9
9
|
description = "Structural Search and Rewrite code at large scale using precise AST pattern."
|
|
10
10
|
authors = [{ name = "Herrington Darkholme", email = "2883231+HerringtonDarkholme@users.noreply.github.com" }]
|
|
11
11
|
maintainers = [{ name = "Herrington Darkholme", email = "2883231+HerringtonDarkholme@users.noreply.github.com" }]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|