예제 #1
0
		public override IEnumerable<Parser> Find(ParserFindArgs args)
		{
			if (Inner != null && args.Push(this))
			{
				var ret = Inner.Find(args);
				args.Pop();
				return base.Find(args).Concat(ret);
			}
			return base.Find(args);
		}
예제 #2
0
파일: ListParser.cs 프로젝트: HaKDMoDz/eStd
		public override IEnumerable<Parser> Find(ParserFindArgs args)
		{
			if (args.Push(this)) 
			{
				foreach (var item in base.Find(args))
				{
					yield return item;
				}
				foreach (var item in Items)
				{
					if (item != null)
					{
						foreach (var  child in item.Find(args))
							yield return child;
					}
				}
				//ret = ret.Concat(Items.Where(r => r != null).SelectMany(r => r.Find(args)).ToArray());
				args.Pop();
			}
			//return ret;
		}