Esempio n. 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]);
        }
Esempio n. 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);
			}
		}
Esempio n. 3
0
File: Row.cs Progetto: 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;
		}
Esempio n. 4
0
File: Row.cs Progetto: 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;
		}
Esempio n. 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];
        }
Esempio n. 6
0
		public PatternListList(BlockType parent)
		{
			this.Parent = parent;
		}
Esempio n. 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];
 }
Esempio n. 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);
              }
        }
Esempio n. 9
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="parent"></param>
		public ScopeCollection(BlockType parent)
		{
			Parent = parent;
		}