Hayblock public code

code = open("code.txt","r").read.split("\n") doing = 0 module = "" command = "" params = [] showerrors = True

logs = [] ram = [] vars = {} imported = [] posmodules = ["sys"]

def log(message): logs.append(f"At line {doing + 1}: {message}")

def error(type,message): log(f"Error at line {doing + 1}: Error of type {type}: {message}") if showerrors: print(f"Error at line {doing + 1}:\n Error of type {type}:\n  {message}")

str0to9 = ["0","1","2","3","4","5","6","7","8","9"]

def isNumber(tocheck): hasdecimals = False for i in range(len(str(tocheck))): if not str(tocheck)[i] in str0to9: if str(tocheck)[i] == ".": hasdecimals = True else: return "nan" if hasdecimals: return "decimal" else: return "whole" def checkType(tocheck): if f"{tocheck[0]}{tocheck[len(tocheck) - 1]}" == "\"\"": return ["string",tocheck[1:len(tocheck) - 1],"firm"] elif tocheck == "true": return ["boolean","true","firm"] elif tocheck == "false": return ["boolean","false","firm"] elif isNumber(tocheck) == "whole": return ["number",tocheck,"whole"] elif isNumber(tocheck) == "decimal": return ["number",tocheck,"decimal"] else: return ["invalid","invalid","firm"]
 * 1) Start main code

while len(code) > doing: if len(code[doing].replace(" ","")) < 1: log("A blank line has been skipped over.") doing += 1 elif f"{code[doing][0]}{code[doing][1]}" == "#-": log("A comment has been skipped over.") doing += 1 else: params = code[doing].split(".") try: module = params.pop(0) except IndexError: error("IncompleteFunction","No module is found.") try: command = params.pop(0) except IndexError: error("IncompleteFunction","No command is found.") if module in imported:

if module == "sys": print("SYSYSYSYSYSSYSYS") elif module == "import": if command in imported: error("InvalidModule",f"Module {command} can't be imported again because it is already imported.") elif command in posmodules: imported.append(command) else: error("InvalidModule",f"Module {command} can't be imported because it doesn't exist.") elif module in posmodules: error("InvalidModule",f"Module {module} is not imported.") else: error("InvalidModule",f"Module {module} is not imported and doesn't exist.") doing += 1