void gazelle_gatherFulfillments(L lines, L list_out, O... _) { Int maxEntries = cast optPar maxEntries(_); Flag cancel = cast optPar cancel(_); GazelleEvalContext ctx = cast optPar ctx(_); if (ctx == null) ctx = dm_gazelle_stdEvalContext(dm_gazelle_rulesOnFacts()); for (GazelleLine line : lines) pcall { for (GazelleTree t : gazelle_getChildren(GazelleTree(ctx, line.text))) pcall { if (flagIsUp(cancel) || maxEntries != null && l(list_out) >= maxEntries) ret with print("Cancel"); list_out.add(nu GazelleFulfillment( line := t.parent.line, varMap := struct(t.varMap()), rule := t.ruleID(), matchedRuleStruct := struct(t.mr), context := "discord msg " + line.msgID)); } } }