/// <summary> /// Compile the action into rules. Should not be called unless successfully validated. /// </summary> public bool Compile(RuleTable rules, List <Flag> flags, CancellationToken cancel) { FindData[] parts; if (!Body.Compile(rules, out parts, flags, cancel)) { return(false); } if (myComprData == null) { rules.CompileRule(HeadTerm, HeadType, parts, Head, Body, configurationContext); } else { rules.CompileRule(rules.MkComprHead(myComprData, HeadTerm), Index.FalseValue, parts, Head, Body, configurationContext); } return(true); }