(lines)
| 49 | |
| 50 | |
| 51 | def parse_commands(lines): |
| 52 | parsed_commands = [] |
| 53 | for line in lines: |
| 54 | args = re.match(r".*Register\((.*)\);", line) |
| 55 | if args is None or "CFGFLAG_" not in args[1]: |
| 56 | continue |
| 57 | parsed = parse_arguments(args[1], num=6, name="command") |
| 58 | flags = parse_flags(parsed[2], f"command '{parsed[0]}'") |
| 59 | parsed_commands.append({"name": parsed[0], "flags": flags, "arguments": parsed[1], "description": parsed[5]}) |
| 60 | parsed_commands.sort(key=lambda command: command["name"]) |
| 61 | return parsed_commands |
| 62 | |
| 63 | |
| 64 | def parse_settings(lines): |
no test coverage detected