public ScriptProgram CompileScript(string startFilename, List<string> fileNames) { var rv = new ScriptProgram(); rv.AddMainScript(LoadAndParseFile(rv, startFilename)); foreach(var f in fileNames) { var node = LoadAndParseFile(rv, f); rv.AddScript(node); } return rv; }
public ScriptProgram CompileProgram(List <string> scripts) { var rv = new ScriptProgram(); foreach (var f in scripts) { var node = scriptParser.ParseScript(rv, f); if (rv.Scripts.Count() == 0) { rv.AddScript(node); } else { rv.AddMainScript(node); } } return(rv); }