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(); }
/// <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(); }