Report tracing event "trying" after all pattern match predicates.

This commit is contained in:
Fedor Isakov 2019-04-19 10:14:25 +02:00
parent 15dce5cf43
commit cc1a98fa6d
1 changed files with 2 additions and 1 deletions

View File

@ -158,13 +158,14 @@ class Controller(
private fun processMatch(inState: ProcessingState, match: MatchRule) : ProcessingState {
val context = Context(inState, match.logicalContext())
trace.trying(match)
// invoke matched pattern predicates
for (prd in match.patternPredicates()) {
if (!tellPredicate(prd, context)) break
}
trace.trying(match)
// check guard
for (gprd in match.rule().guard()) {
if (!askPredicate(gprd, context)) break