예제 #1
0
		public Block Block(BlockType type, string name = null, params SyntaxTreeNode[] children)
		{
			_last = null;

			var builder = new BlockBuilder();
			builder.Type = type;
			builder.Name = name;

			foreach (var child in children)
			{
				builder.Children.Add(child);
			}

			return builder.Build();
		}
예제 #2
0
파일: Block.cs 프로젝트: furesoft/FuManchu
		/// <summary>
		/// Initialises a new instance of <see cref="Block"/>
		/// </summary>
		/// <param name="source">The source block builder.</param>
		public Block(BlockBuilder source)
			: this(source.Type, source.Name, source.Children, source.Descriptor)
		{
			source.Reset();
		}