public RuleResult(bool success, TokenStreamIndex index, int stepCount, TokenStreamSpan match) { IsSuccess = success; Index = index; StepCount = stepCount; Match = match; }
internal RuleState(IRuleRef rule, TokenStreamIndex index, IRuleOperations coroutines, RuleState <TNode>?parent) { Rule = (IRuleRef <TNode>)rule; Result = new CoroutineResult <RuleResult>(); NodeContext = new NodeContext <TNode>(); Parent = parent; RuleContext = new RuleContext(Rule, index, coroutines); Iterator = rule.Grab(RuleContext).GetEnumerator(); }
public TokenStreamSpan Until(TokenStreamIndex end) { if (end.Index < Index) { throw new IndexOutOfRangeException(); } return(new TokenStreamSpan(Stream, Index, end.Index)); }