コード例 #1
0
 public PatternListList(BlockType parent)
 {
     this.Parent = parent;
 }
コード例 #2
0
ファイル: Row.cs プロジェクト: BradFuller/pspplayer
 /// <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;
 }
コード例 #3
0
ファイル: Language.cs プロジェクト: BradFuller/pspplayer
        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);
            }
        }
コード例 #4
0
ファイル: Row.cs プロジェクト: BradFuller/pspplayer
 /// <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;
 }