public bool Interpret(Context context) { var tryInterpret = _digit == ExpressionBuilder.ALPHANUM; if ((tryInterpret || context.MoveNext()) && char.IsDigit(context.Current())) { context.Feed(); return true; } if (tryInterpret) return false; context.Failed(); return false; }
public bool Interpret(Context context) { var tryInterpret = _mask == ExpressionBuilder.ALPHANUM; var notFinished = (tryInterpret || context.MoveNext()); if (notFinished && char.IsLetter(context.Current())) { context.Feed(); return true; } if (tryInterpret) return false; context.Failed(); return false; }