Example #1
0
        //done
        private BlockType GetBlock(string Name)
        {
            if (_Blocks[Name] == null)
            {
                Fireball.Syntax.BlockType b = new Fireball.Syntax.BlockType(_Language);
                _Blocks.Add(Name, b);
            }

            return((BlockType)_Blocks[Name]);
        }
Example #2
0
		private void FillBlocks(BlockType blockType)
		{
			if (blockType==null)
				return;

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

			_Blocks[blockType]=blockType;

			foreach (BlockType current in blockType.ChildBlocks)
			{
				FillBlocks(current);
			}
			foreach (Scope current in blockType.ScopePatterns)
			{
				FillBlocks(current.SpawnBlockOnEnd);
				FillBlocks(current.SpawnBlockOnStart);
			}
		}
Example #3
0
File: Row.cs Project: viticm/pap2
		/// <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;
		}
Example #4
0
File: Row.cs Project: viticm/pap2
		/// <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;
		}
Example #5
0
        //done
        private BlockType GetBlock(string Name)
        {
            if (_Blocks[Name] == null)
            {
                Fireball.Syntax.BlockType b = new Fireball.Syntax.BlockType(_Language);
                _Blocks.Add(Name, b);
            }

            return (BlockType)_Blocks[Name];
        }
Example #6
0
		public PatternListList(BlockType parent)
		{
			this.Parent = parent;
		}
Example #7
0
 //done
 private BlockType GetBlock(string Name)
 {
     if (_Blocks.ContainsKey(Name) == false)
     {
         Fireball.Syntax.BlockType b = new Fireball.Syntax.BlockType(_Language);
         _Blocks.Add(Name, b);
     }
     return (BlockType)_Blocks[Name];
 }
Example #8
0
        private void FillBlocks(BlockType blockType)
        {
            if (blockType == null)
            return;

              if (_Blocks.ContainsKey(blockType) == true )
            return;
              else
            _Blocks.Add(blockType, blockType);

              foreach (BlockType current in blockType.ChildBlocks)
              {
            FillBlocks(current);
              }
              foreach (Scope current in blockType.ScopePatterns)
              {
            FillBlocks(current.SpawnBlockOnEnd);
            FillBlocks(current.SpawnBlockOnStart);
              }
        }
Example #9
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="parent"></param>
		public ScopeCollection(BlockType parent)
		{
			Parent = parent;
		}