public ISassStylesheet Parse(IParsingRequest request)
        {
            var tokens = Tokenize(request);
            var stream = CreateTokenStream(tokens, new ParsingRequestExecutionContext(request));
            var itemFactory = new ItemFactory(new DefaultSassItemFactory());

            var stylesheet = new Stylesheet();
            if (stylesheet.Parse(itemFactory, request.Text, stream) && !request.IsCancelled)
            {
                stylesheet.Freeze();

                foreach (var import in stylesheet.Children.OfType<SassImportDirective>())
                    import.ResolveImports(request.Text, request.Document, DocumentManager);

                foreach (var reference in ResolveReferences(stylesheet))
                    reference.ResolveImports(request.Text, request.Document, DocumentManager);

                return stylesheet;
            }

            return null;
        }
 IEnumerable<FileReferenceTag> ResolveReferences(Stylesheet stylesheet)
 {
     return stylesheet
         .Children.OfType<XmlDocumentationComment>()
         .SelectMany(x => x.Children.OfType<FileReferenceTag>());
 }