MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / buildParsedCommandFromRoot

Function buildParsedCommandFromRoot

src/utils/bash/ParsedCommand.ts:255–268  ·  view source on GitHub ↗
(
  command: string,
  root: Node,
)

Source from the content-addressed store, hash-verified

253 * ParsedCommand.parse would do.
254 */
255export function buildParsedCommandFromRoot(
256 command: string,
257 root: Node,
258): IParsedCommand {
259 const pipePositions = extractPipePositions(root)
260 const redirectionNodes = extractRedirectionNodes(root)
261 const analysis = analyzeCommand(root, command)
262 return new TreeSitterParsedCommand(
263 command,
264 pipePositions,
265 redirectionNodes,
266 analysis,
267 )
268}
269
270async function doParse(command: string): Promise<IParsedCommand | null> {
271 if (!command) return null

Callers 2

doParseFunction · 0.85

Calls 3

extractPipePositionsFunction · 0.85
extractRedirectionNodesFunction · 0.85
analyzeCommandFunction · 0.85

Tested by

no test coverage detected