mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +00:00
Add a fail-closed Tree-sitter PowerShell lowerer (#39213)
## What changed - Add a Tree-sitter-based lowerer that converts a conservative subset of literal PowerShell commands into argument vectors. - Reject dynamic expressions, parse recovery, unsupported value conversions, directives, and source outside recognized command nodes instead of guessing their meaning. - Keep the lowerer alongside the existing production parser for later adoption. ## Testing - Add fixture-driven coverage for supported literal commands and unsupported or ambiguous syntax, including a dedicated `#requires` rejection test. GitOrigin-RevId: a6e7acc264ca40df264db4b271e38ae7d89e1ec4
This commit is contained in:
Generated
+11
@@ -4143,6 +4143,7 @@ dependencies = [
|
||||
"shlex",
|
||||
"tree-sitter",
|
||||
"tree-sitter-bash",
|
||||
"tree-sitter-powershell",
|
||||
"url",
|
||||
"which 8.0.0",
|
||||
]
|
||||
@@ -14522,6 +14523,16 @@ version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-powershell"
|
||||
version = "0.26.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3faf304d44b9ddd4a7d97804bb8de7daf564336dd5a526dc6de5b39238243022"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree_magic_mini"
|
||||
version = "3.2.2"
|
||||
|
||||
Reference in New Issue
Block a user