NR.IParser ParseFile(string fileContent) { NR.IParser parser = NR.ParserFactory.CreateParser(language, new StringReader(fileContent)); parser.Parse(); if (parser.Errors.Count > 0) { ShowSourceCodeErrors(parser.Errors.ErrorOutput); parser.Dispose(); return(null); } else { return(parser); } }
protected virtual Dictionary <PossibleTypeReference, object> FindPossibleTypeReferences(string fileContent) { NR.IParser parser = ParseFile(fileContent); if (parser == null) { return(null); } else { FindPossibleTypeReferencesVisitor visitor = new FindPossibleTypeReferencesVisitor(); parser.CompilationUnit.AcceptVisitor(visitor, null); parser.Dispose(); return(visitor.list); } }