Attempts to find a parser for the provided sequence of tokens.
(parts)
| 328 | |
| 329 | |
| 330 | def 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 | |
| 340 | Macros = {x.name(): x for x in [Usermod(), Resolve(), Passwd(), Useradd(), Chacs(), Userdel(), Chcred(), Thecard()]} |
nothing calls this directly
no test coverage detected
searching dependent graphs…