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

Method visitoperator

explainshell/matcher.py:204–217  ·  view source on GitHub ↗
(self, node, op)

Source from the content-addressed store, hash-verified

202 )
203
204 def visitoperator(self, node, op):
205 helptext = None
206 if self.compound_stack:
207 curr_compound = self.compound_stack[-1]
208 helptext = help_constants.COMPOUND_RESERVED_WORDS.get(
209 curr_compound, {}
210 ).get(op)
211
212 if not helptext:
213 helptext = help_constants.OPERATORS[op]
214
215 self.groups[0].results.append(
216 MatchResult(node.pos[0], node.pos[1], helptext, None, {"kind": "operator"})
217 )
218
219 def visitpipe(self, node, pipe):
220 self.groups[0].results.append(

Callers

nothing calls this directly

Calls 1

MatchResultClass · 0.85

Tested by

no test coverage detected