MCPcopy Index your code
hub / github.com/idank/explainshell / visitnodeend

Method visitnodeend

explainshell/matcher.py:349–362  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

347 self.compound_stack.append("until")
348
349 def visitnodeend(self, node):
350 if node.kind == "command":
351 # it's possible for visitcommand/end to be called without a command
352 # group being pushed if it contains only redirect nodes
353 if len(self.group_stack) > 1:
354 logger.info("visitnodeend %r, groups %d", node, len(self.group_stack))
355
356 while self.group_stack[-1][0] is not node:
357 logger.info("popping groups that are a result of nested commands")
358 self.endcommand()
359 self.endcommand()
360 elif node.kind in ("if", "for", "while", "until"):
361 kind = self.compound_stack.pop()
362 assert kind == node.kind
363
364 def startcommand(self, commandnode, parts, endword, addgroup=True):
365 logger.info(

Callers

nothing calls this directly

Calls 1

endcommandMethod · 0.95

Tested by

no test coverage detected