Exemplo n.º 1
0
 public PatternListList(BlockType parent)
 {
     this.Parent = parent;
 }
Exemplo n.º 2
0
 /// <summary>
 /// For public use only
 /// </summary>
 /// <param name="BlockType"></param>
 /// <param name="StartWord"></param>
 /// <param name="IgnoreStartWord"></param>
 /// <returns></returns>
 public Word FindRightWordByBlockType(BlockType BlockType, Word StartWord, bool IgnoreStartWord)
 {
     int i = StartWord.Index;
     if (IgnoreStartWord)
         i++;
     Word w = null;
     while (i < mWords.Count)
     {
         w = this[i];
         if (w.Segment.BlockType == BlockType && w.Type != WordType.xtSpace && w.Type != WordType.xtTab)
         {
             return w;
         }
         i++;
     }
     return null;
 }
Exemplo n.º 3
0
        private void FillBlocks(BlockType bt)
        {
            if (bt == null)
                return;

            if (_Blocks[bt] != null)
                return;

            _Blocks[bt] = bt;

            foreach (BlockType btc in bt.ChildBlocks)
            {
                FillBlocks(btc);
            }
            foreach (Scope sc in bt.ScopePatterns)
            {
                FillBlocks(sc.SpawnBlockOnEnd);
                FillBlocks(sc.SpawnBlockOnStart);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// For public use only
 /// </summary>
 /// <param name="BlockType"></param>
 /// <param name="StartWord"></param>
 /// <param name="IgnoreStartWord"></param>
 /// <returns></returns>
 public Word FindLeftWordByBlockType(BlockType BlockType, Word StartWord, bool IgnoreStartWord)
 {
     int i = StartWord.Index;
     if (IgnoreStartWord)
         i--;
     Word w = null;
     while (i >= 0)
     {
         w = this[i];
         if (w.Segment.BlockType == BlockType && w.Type != WordType.xtSpace && w.Type != WordType.xtTab)
         {
             return w;
         }
         i--;
     }
     return null;
 }