void AfterMatchListener.OnResultRequested(Action <MutableGrammarBlock> blockTaker) { baseListener.OnResultRequested( (gBlock) => { foreach (var meta in parent.metas) { gBlock.AddMetaInfo(meta); } blockTaker(gBlock); } ); }
void AfterMatchListener.OnResultRequested(Action <MutableGrammarBlock> blockTaker) { var mClusterGBlock = new StdMutableClusterGBlock(); MutableGrammarBlock lastBlock = null; baseAMatchLis.OnResultRequested( (gBlock) => mClusterGBlock.subBlocks.Add(lastBlock = gBlock) ); if (mClusterGBlock.subBlocks.Count == 1) { blockTaker(lastBlock); } else if (mClusterGBlock.subBlocks.Count > 1) { blockTaker(mClusterGBlock); } }