Beispiel #1
0
        public static bool HasCompilationErros(BTSource[] texts, BTSource text)
        {
            bool     hasErrors = false;
            BTLCache btlCache  = Fetch(texts);

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == text)
                {
                    hasErrors = btlCache.exceptions[i] != null;
                }
            }
            return(hasErrors);
        }
Beispiel #2
0
        public static BTLParser.Node[] GetBTLRoots(BTSource[] texts, BTSource text)
        {
            BTLParser.Node[] roots    = null;
            BTLCache         btlCache = Fetch(texts);

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == text)
                {
                    roots = btlCache.rootSets[i];
                }
            }
            return(roots);
        }
Beispiel #3
0
        public static BTLTokenizer.Token[] GetBTLTokens(BTSource[] texts, BTSource text)
        {
            BTLTokenizer.Token[] tokens   = null;
            BTLCache             btlCache = Fetch(texts);

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == text && i < btlCache.tokenSets.Length)
                {
                    tokens = btlCache.tokenSets[i];
                }
            }
            return(tokens);
        }
Beispiel #4
0
 public bool IsSame(BTSource a)
 {
     return(this.btSource == a);
 }
Beispiel #5
0
 public SourceInfo(BTSource a)
 {
     btSource = a;
 }