Пример #1
0
 public NTriplesParser(ILexer lexer, CommonIdentifierIntern commonIdentifierIntern)
 {
     this.commonIdentifierIntern = commonIdentifierIntern;
     this.originalLexer = lexer;
     this.myCheckForInterrupt = new SeldomInterruptChecker();
     this.setLexer(new NTriplesFilteringLexer(lexer));
 }
Пример #2
0
 public NTriplesParser(ILexer lexer, CommonIdentifierIntern commonIdentifierIntern)
 {
     this.commonIdentifierIntern = commonIdentifierIntern;
     this.originalLexer          = lexer;
     this.myCheckForInterrupt    = new SeldomInterruptChecker();
     this.setLexer(new NTriplesFilteringLexer(lexer));
 }
Пример #3
0
 public NTriplesLanguageService(
     PsiLanguageType psiLanguageType, IConstantValueService constantValueService, CommonIdentifierIntern commonIdentifierIntern)
     : base(psiLanguageType, constantValueService)
 {
     this.commonIdentifierIntern = commonIdentifierIntern;
     //this.formatter = formatter;
 }
Пример #4
0
 public PsiLanguageService(PsiLanguageType psiLanguageType,
                           IConstantValueService constantValueService, PsiCodeFormatter formatter, CommonIdentifierIntern commonIdentifierIntern)
     : base(psiLanguageType, constantValueService)
 {
     myFormatter = formatter;
     myCommonIdentifierIntern = commonIdentifierIntern;
 }
Пример #5
0
 public LexParser(ILexer lexer, CommonIdentifierIntern commonIdentifierIntern)
 {
     myCheckForInterrupt      = new SeldomInterruptChecker();
     myOriginalLexer          = lexer;
     myCommonIdentifierIntern = commonIdentifierIntern;
     myLexer = new FilteringLexLexer(lexer);
     myLexer.Start();
 }
Пример #6
0
        public PsiParser(ILexer lexer, CommonIdentifierIntern commonIdentifierIntern)
        {
            myCheckForInterrupt      = new SeldomInterruptChecker();
            myOriginalLexer          = lexer;
            myCommonIdentifierIntern = commonIdentifierIntern;
            var tokenBuffer = new TokenBuffer(lexer);

            myLexer = new FilteringPsiLexer(tokenBuffer.CreateLexer());
            myLexer.Start();
        }
Пример #7
0
        public CgParser([NotNull] ILexer <int> originalLexer, CommonIdentifierIntern intern)
        {
            myOriginalLexer = originalLexer;
            myIntern        = intern;

            SetLexer(myOriginalLexer);

            myPreProcessor = new CgPreProcessor();
            myPreProcessor.Run(myOriginalLexer, this, new SeldomInterruptChecker());

            SetLexer(new CgFilteringLexer(myOriginalLexer, myPreProcessor));
        }
Пример #8
0
        public ShaderLabParser([NotNull] ILexer <int> lexer, CommonIdentifierIntern intern)
        {
            myOriginalLexer = lexer;
            myIntern        = intern;

            // Create the pre-processor elements, using the unfiltered lexer, so we'll see the
            // preprocessor tokens!
            SetLexer(myOriginalLexer);
            myPreProcessor = new ShaderLabPreProcessor();
            myPreProcessor.Run(myOriginalLexer, this, new SeldomInterruptChecker());

            // Reset the lexer to the beginning, and use the filtered lexer. Pass in the
            // preprocessor, so we can filter on CG_CONTENT and CG_END when they're used
            // for include blocks (they're not filtered tokens normally)
            SetLexer(new ShaderLabFilteringLexer(lexer, myPreProcessor));
        }
Пример #9
0
        public NitraFile(IPsiSourceFile sourceFile, CommonIdentifierIntern commonIdentifierIntern)
        {
            _sourceFile = sourceFile;
              this.ReferenceProvider = new NitraReferenceProvider();

              var regex = new Regex(@"(\w(\w|\d)+)");
              var text = sourceFile.Document.GetText();
              var matchs = regex.Matches(text);
              var prev = 0;
              foreach (Match match in matchs)
              {
            var spaceLen = match.Index - prev;
            if (spaceLen > 0)
              this.AddChild(_nitraProject.AddWhitespace(sourceFile, text, prev, spaceLen));

            this.AddChild(_nitraProject.Add(sourceFile, text, match.Index, match.Length));
            prev = match.Index + match.Length;
              }
              var len = this.GetTextLength();
        }
Пример #10
0
        public NitraFile(IPsiSourceFile sourceFile, CommonIdentifierIntern commonIdentifierIntern)
        {
            _sourceFile            = sourceFile;
            this.ReferenceProvider = new NitraReferenceProvider();

            var regex  = new Regex(@"(\w(\w|\d)+)");
            var text   = sourceFile.Document.GetText();
            var matchs = regex.Matches(text);
            var prev   = 0;

            foreach (Match match in matchs)
            {
                var spaceLen = match.Index - prev;
                if (spaceLen > 0)
                {
                    this.AddChild(_nitraProject.AddWhitespace(sourceFile, text, prev, spaceLen));
                }

                this.AddChild(_nitraProject.Add(sourceFile, text, match.Index, match.Length));
                prev = match.Index + match.Length;
            }
            var len = this.GetTextLength();
        }
Пример #11
0
 public CgInjectedPsiProvider(CommonIdentifierIntern intern)
 {
     myIntern = intern;
 }
Пример #12
0
 public ShaderLabParser([NotNull] ILexer <int> lexer, CommonIdentifierIntern intern)
 {
     myOriginalLexer = lexer;
     myIntern        = intern;
     SetLexer(new ShaderLabFilteringLexer(lexer));
 }
Пример #13
0
 public ShaderLabLanguageService(ShaderLabLanguage psiLanguageType, IConstantValueService constantValueService, CommonIdentifierIntern commonIdentifierIntern, ShaderLabCodeFormatter codeFormatter)
     : base(psiLanguageType, constantValueService)
 {
     myCommonIdentifierIntern = commonIdentifierIntern;
     myCodeFormatter          = codeFormatter;
 }
Пример #14
0
        public AttributedTypesCache(Lifetime lifetime, IDependencyStore dependencyStore, IShellLocks shellLocks, IPsiConfiguration psiConfiguration, IPersistentIndexManager persistentIndexManager, CommonIdentifierIntern identifierIntern, AttributedTypesCacheBuilder builder, ISolution solution, IShellLocks locks, IPsiFiles psiFiles)
        {
            myShellLocks             = shellLocks;
            myPersistentIndexManager = persistentIndexManager;
            Builder    = builder;
            myLocks    = locks;
            myPsiFiles = psiFiles;

            var solutionCacheFolder = psiConfiguration.SolutionCachesConfiguration.GetSolutionCacheFolder(solution);

            myCacheFile = solutionCacheFolder.Combine(IMAGE_FILE);
        }
Пример #15
0
 public Parser(ILexer lexer, IPsiSourceFile sourceFile, CommonIdentifierIntern commonIdentifierIntern)
     : base(lexer, commonIdentifierIntern)
 {
     SourceFile = sourceFile;
 }
 public JsonNewLanguageService(PsiLanguageType psiLanguageType, IConstantValueService constantValueService, CommonIdentifierIntern intern)
     : base(psiLanguageType, constantValueService)
 {
     myIntern = intern;
 }
Пример #17
0
 public Parser(ILexer lexer, IPsiSourceFile sourceFile, CommonIdentifierIntern commonIdentifierIntern)
 {
     _sourceFile             = sourceFile;
     _commonIdentifierIntern = commonIdentifierIntern;
 }
Пример #18
0
 public DslLanguageService(
     PsiLanguageType lexLanguageType, IConstantValueService constantValueService, CommonIdentifierIntern commonIdentifierIntern)
     : base(lexLanguageType, constantValueService)
 {
     _commonIdentifierIntern = commonIdentifierIntern;
 }
Пример #19
0
 public Parser(ILexer lexer, IPsiSourceFile sourceFile, CommonIdentifierIntern commonIdentifierIntern)
 {
     _sourceFile = sourceFile;
     _commonIdentifierIntern = commonIdentifierIntern;
 }
Пример #20
0
 public ShaderLabLanguageService(ShaderLabLanguage psiLanguageType, IConstantValueService constantValueService, CommonIdentifierIntern commonIdentifierIntern)
     : base(psiLanguageType, constantValueService)
 {
     myCommonIdentifierIntern = commonIdentifierIntern;
 }
Пример #21
0
 public DslLanguageService(
     PsiLanguageType lexLanguageType, IConstantValueService constantValueService, CommonIdentifierIntern commonIdentifierIntern)
     : base(lexLanguageType, constantValueService)
 {
     _commonIdentifierIntern = commonIdentifierIntern;
 }