MCPcopy
hub / github.com/tinode/chat / parse_macro

Function parse_macro

tn-cli/macros.py:330–337  ·  view source on GitHub ↗

Attempts to find a parser for the provided sequence of tokens.

(parts)

Source from the content-addressed store, hash-verified

328
329
330def parse_macro(parts):
331 """Attempts to find a parser for the provided sequence of tokens."""
332 global Macros
333 # parts[0] is the command.
334 macro = Macros.get(parts[0])
335 if not macro:
336 return None
337 return macro.parser
338
339
340Macros = {x.name(): x for x in [Usermod(), Resolve(), Passwd(), Useradd(), Chacs(), Userdel(), Chcred(), Thecard()]}

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…