Esempio n. 1
0
        public override void VisitFSharpFile(IFSharpFile fsFile)
        {
            fsFile.TokenBuffer = fsFile.ActualTokenBuffer; // todo: remove this when/if a proper lexer is implemented
            var sourceFile  = fsFile.GetSourceFile();
            var fileKind    = GetFSharpFileKind(fsFile);
            var hasPairFile = myCheckerService.HasPairFile(sourceFile);

            Builder.CreateProjectFilePart(new FSharpProjectFilePart(sourceFile, fileKind, hasPairFile));

            foreach (var declaration in fsFile.DeclarationsEnumerable)
            {
                var qualifiers = declaration.LongIdentifier.Qualifiers;
                foreach (var qualifier in qualifiers)
                {
                    var qualifierName = qualifier.GetText().RemoveBackticks();
                    Builder.StartPart(new QualifiedNamespacePart(qualifier.GetTreeStartOffset(), Builder.Intern(qualifierName)));
                }

                declaration.Accept(this);

                foreach (var _ in qualifiers)
                {
                    Builder.EndPart();
                }
            }
        }
        public override void VisitFSharpFile(IFSharpFile fsFile)
        {
            var sourceFile = fsFile.GetSourceFile();

            if (sourceFile == null)
            {
                return;
            }

            var fileKind    = GetFSharpFileKind(fsFile);
            var hasPairFile = myCheckerService.HasPairFile(sourceFile);

            Builder.CreateProjectFilePart(new FSharpProjectFilePart(sourceFile, fileKind, hasPairFile));

            foreach (var declaration in fsFile.DeclarationsEnumerable)
            {
                var qualifiers = declaration.LongIdentifier.Qualifiers;
                foreach (var qualifier in qualifiers)
                {
                    var qualifierName = qualifier.GetText().RemoveBackticks();
                    Builder.StartPart(new QualifiedNamespacePart(qualifier.GetTreeStartOffset(), Builder.Intern(qualifierName)));
                }

                declaration.Accept(this);

                foreach (var _ in qualifiers)
                {
                    Builder.EndPart();
                }
            }
        }
Esempio n. 3
0
        public override void VisitFSharpFile(IFSharpFile fsFile)
        {
            var sourceFile = fsFile.GetSourceFile();

            if (sourceFile == null)
            {
                return;
            }

            var fileKind    = GetFSharpFileKind(fsFile);
            var hasPairFile = myCheckerService.HasPairFile(sourceFile);

            Builder.CreateProjectFilePart(new FSharpProjectFilePart(sourceFile, fileKind, hasPairFile));

            foreach (var declaration in fsFile.DeclarationsEnumerable)
            {
                declaration.Accept(this);
            }
        }