ParseInformation ParseTypeScriptFile(string fileName, ITextBuffer fileContent, TypeScriptProject project)
        {
            var parser                  = new TypeScriptParser(new LanguageServiceNullLogger());
            var projectContent          = new TypeScriptProjectContent(project);
            List <TypeScriptFile> files = project.GetTypeScriptFiles().ToList();
            ICompilationUnit      unit  = parser.Parse(projectContent, fileName, fileContent, files);

            return(new ParseInformation(unit));
        }
        Task CreateParseTypeScriptFileTask(CodeEditor editor)
        {
            ITextBuffer       fileContent = editor.DocumentAdapter.CreateSnapshot();
            TypeScriptProject project     = TypeScriptService.GetProjectForFile(editor.FileName);

            return(Task
                   .Factory
                   .StartNew(() => ParseTypeScriptFile(editor.FileName, fileContent, project))
                   .ContinueWith(task => UpdateParseInformation(task.Result), TaskScheduler.FromCurrentSynchronizationContext()));
        }
 ParseInformation ParseTypeScriptFile(string fileName, ITextBuffer fileContent, TypeScriptProject project)
 {
     var parser = new TypeScriptParser(new LanguageServiceNullLogger());
     var projectContent = new TypeScriptProjectContent(project);
     List<TypeScriptFile> files = project.GetTypeScriptFiles().ToList();
     ICompilationUnit unit = parser.Parse(projectContent, fileName, fileContent, files);
     return new ParseInformation(unit);
 }
 ParseInformation ParseTypeScriptFile(string fileName, ITextBuffer fileContent)
 {
     var parser = new TypeScriptParser(new LanguageServiceNullLogger());
     var projectContent = new DefaultProjectContent();
     ICompilationUnit unit = parser.Parse(projectContent, fileName, fileContent);
     return new ParseInformation(unit);
 }