public override bool Match(IParserState p) { p.CreateNode(sLabel); // Used just to make sure the position is restored int pos = p.GetPos(); bool result = FirstChild.Match(p); if (result) { p.CompleteNode(); } else { p.AbandonNode(); // As-sure that the position is restored Debug.Assert(p.GetPos() == pos); } return(result); }
public override bool Match(IParserState p) { p.CreateNode(sLabel); // Used just to make sure the position is restored int pos = p.GetPos(); bool result = FirstChild.Match(p); if (result) { p.CompleteNode(); } else { p.AbandonNode(); // As-sure that the position is restored Debug.Assert(p.GetPos() == pos); } return result; }