示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#4
0
 public bool IsSame(BTSource a)
 {
     return(this.btSource == a);
 }
示例#5
0
 public SourceInfo(BTSource a)
 {
     btSource = a;
 }