diff --git a/Config/_bpp_parsing.py b/Config/_bpp_parsing.py index 358455f..45db3ac 100644 --- a/Config/_bpp_parsing.py +++ b/Config/_bpp_parsing.py @@ -148,12 +148,7 @@ def run_bpp_program(code, p_args, author, runner, channel): type_list = [int, float, str, list] - db = Database() - - debug_start = timenow() - - if channel.id == 990307784690135060: debug_values += "\nDEBUG INFO:\n" - + db = Database() match = re.finditer("(?i)\[global var \w*?\]", code) found_vars = [] for var in match: @@ -165,14 +160,7 @@ def run_bpp_program(code, p_args, author, runner, channel): for v in v_list: v_value = type_list[v[2]](v[1]) - tag_globals[v[0]] = [v_value, str(v[3]), False] - - debug_elapsed = timenow()-debug_start - - if channel.id == 990307784690135060: debug_values += f"{debug_elapsed}\n"+"\n".join([f"{k}: {v}" for k,v in tag_globals.items()]) - - - + tag_globals[v[0]] = [v_value, str(v[3]), False] def var_type(v): try: @@ -250,8 +238,6 @@ def evaluate_result(k): else: if (v_name,) not in db.get_entries("b++2variables", columns=["name"]): raise NameError(f"No global variable by the name {safe_cut(v_name)} defined") - - if channel.id == 990307784690135060: debug_values += f"\n{v_name}" v_list = db.get_entries("b++2variables", columns=["name", "value", "type", "owner"]) v_value, v_type, v_owner = [v[1:4] for v in v_list if v[0] == v_name][0] @@ -289,7 +275,6 @@ def evaluate_result(k): if type(v) == list: v = express_array(v) results.append(v) - debug_start = timenow() for v_name, value in tag_globals.items(): if not value[2]: continue v_value = value[0] @@ -310,9 +295,6 @@ def evaluate_result(k): "b++2variables", entry={"value": str(v_value), "type": var_type(v_value)}, conditions={"name": v_name}) - - debug_elapsed = timenow()-debug_start - if channel.id == 990307784690135060: debug_values += f"{debug_elapsed}\n" output = output.replace("{}", "\t").replace("{", "{{").replace("}", "}}").replace("\t", "{}")