public override IEnumerable <Parser> Children(ParserChildrenArgs args) { var items = new Parser[] { start, end, line }.Where(r => r != null); var childItems = items.SelectMany(r => r.Children(args)); return(items.Concat(childItems)); }
public override IEnumerable<Parser> Children(ParserChildrenArgs args) { if (Inner != null && args.Push(this)) { yield return Inner; foreach (var child in Inner.Children(args)) { yield return child; } args.Pop(); } }
public override IEnumerable <Parser> Children(ParserChildrenArgs args) { if (Inner != null && args.Push(this)) { yield return(Inner); foreach (var child in Inner.Children(args)) { yield return(child); } args.Pop(); } }
public override IEnumerable<Parser> Children(ParserChildrenArgs args) { if (args.Push(this)) { var items = Items.Where(r => r != null); foreach (var item in items) { yield return item; foreach (var child in item.Children(args)) { yield return child; } } args.Pop(); } }
public override IEnumerable <Parser> Children(ParserChildrenArgs args) { if (args.Push(this)) { var items = Items.Where(r => r != null); foreach (var item in items) { yield return(item); foreach (var child in item.Children(args)) { yield return(child); } } args.Pop(); } }
public override IEnumerable<Parser> Children(ParserChildrenArgs args) { if (args.Push(this)) { for (int i = 0; i < Items.Count; i++) { var item = Items[i]; if (item == null) continue; yield return item; foreach (var child in item.Children(args)) { yield return child; } } args.Pop(); } }
public override IEnumerable<Parser> Children(ParserChildrenArgs args) { var items = new Parser[] { Start, End, Line }.Where(r => r != null); var childItems = items.SelectMany(r => r.Children(args)); return items.Concat(childItems); }