public static void Execute(string fileName) { CurrentFile = fileName; if (!File.Exists(fileName)) { throw new BaseException("Cannot execute COWFILE '" + fileName + "', it doesn't exist"); } if (!fileName.EndsWith(".cf")) { throw new BaseException("Cannot execute file '" + fileName + "', it doesn't the cowfile extension (.cf)"); } Executor.Execute(Lexer.Parse(new CowConfig.ReadConfig(fileName).GetLines(), 0, false, false)); }
public static void Execute(string[] lines) { CurrentFile = ""; Executor.Execute(Lexer.Parse(lines.ToList())); }