Exemplo n.º 1
0
        protected override IEnumerable <ParseStep> GetSuccessParseStep(IRegexEngine engine, State initialState)
        {
            var matchedText = engine.Input.Substring(initialState.Index, engine.State.Index - initialState.Index);

            engine.AddCapture(Number, initialState.Index, matchedText);
            yield return(ParseStep.Capture(this, matchedText, Number, initialState, engine.State));

            yield return(ParseStep.Pass(this, matchedText, initialState, engine.State));

            yield return(ParseStep.Break(this));
        }