From 567674ae7af5e950164cbfc6e58eba87d301fc67 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Mon, 22 May 2023 19:44:12 +0800 Subject: [PATCH] remove command/tree --- Difficult_Rocket/command/tree.py | 74 -------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 Difficult_Rocket/command/tree.py diff --git a/Difficult_Rocket/command/tree.py b/Difficult_Rocket/command/tree.py deleted file mode 100644 index d4b5684..0000000 --- a/Difficult_Rocket/command/tree.py +++ /dev/null @@ -1,74 +0,0 @@ -# ------------------------------- -# Difficult Rocket -# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com -# All rights reserved -# ------------------------------- - -""" -writen by shenjackyuanjie -mail: 3695888@qq.com -github: @shenjackyuanjie -gitee: @shenjackyuanjie -""" - -from Difficult_Rocket import DR_runtime -from Difficult_Rocket.command import line - -COMMAND = 'command' -SUB_COMMAND = 'sub_command' -INFO = 'info' -RUN = 'run' - -DR_command = { - 'name': 'DR-root', - 'version': DR_runtime.DR_version, - INFO: 'DR的自带命令解析树', - COMMAND: { - INFO: '这里是DR的根命令节点', - RUN: None, - SUB_COMMAND: { - 'stop': { - INFO: '退出游戏', - RUN: None - }, - 'fps': { - INFO: 'FPS相关命令', - RUN: None, - SUB_COMMAND: { - 'log': { - INFO: '输出FPS信息', - RUN: None - }, - 'min': { - INFO: '输出一段时间内最小fps', - RUN: None - }, - 'max': { - INFO: '输出一段时间内最大FPS', - RUN: None - } - } - }, - 'default': { - INFO: '重置一些设置' - } - } - } -} - -""" -abc abc -> abc() -abc a abc -> bbb() -abc -> help('abc') -""" - - -# TODO 给爷做了他 - - -class CommandTree: - def __init__(self, command_tree_dict): - self.command_tree_dict = command_tree_dict - - def parse(self, command: [line.CommandText, str]): - pass