void IRuleExpressionVisitor.VisitCheckNot(RuleExpression.CheckNot checkNot) { if (_currContext.invocationCount == 0) { _currContext = _currContext.ForChildExpression(checkNot.Child); } else if (_currContext.invocationCount == 1) { if (_currContext.childEntries.node == null || _currContext.childEntries.prev != null) { throw new InvalidOperationException(); } _currContext = _currContext.ForParentExpression(new ParserNode.CheckNot( _currContext.rule, _currContext.expression, _currContext.childEntries.node )); } else { throw new InvalidOperationException(); } }