public ParsedPackagePart GetPackageBody(string filePath) { IParseTree tree = Analyzer.RunUpperCase(filePath); PackageBodyVisitor visitor = new PackageBodyVisitor(); ParsedPackagePart packageBody = visitor.Visit(tree); return(packageBody); }
private async Task <ParsedPackagePart> GetPart(string path, bool allowNationalChars) { return(await Task.Run(() => { var visitor = new PackageBodyVisitor(); var tree = Analyzer.RunUpperCase(path, allowNationalChars); if (tree.exception != null) { throw tree.exception; } var packagePart = visitor.Visit(tree); return packagePart; })); }