void IParserNodeVisitor.VisitSequence(ParserNode.Sequence sequence) { if (_currState.PrevNode == sequence.Parent || (sequence.Parent == null && _currState.PrevNode.Parent != sequence)) // null for graph root { _currState = _currState.EnterNode(sequence.Childs[0]); } else if (_currState.PrevNode.Parent == sequence) { var index = _currState.PrevNode.IndexInParentList + 1; if (index < sequence.Childs.Count && !_currState.LastTerminalFailed.Value) { _currState = _currState.EnterNode(sequence.Childs[index]); } else { _currState = _currState.ExitNode(); } } else { throw new InvalidOperationException(); } }
public void VisitSequence(ParserNode.Sequence sequence) { this.LogLine("{0}", sequence); _v.VisitSequence(sequence); }
void IParserNodeVisitor.VisitSequence(ParserNode.Sequence sequence) { this.PrintNode(sequence); }