int? IMatch.Match(SourcePosn sourcePosn) { var length = sourcePosn.Match(Target); if (length != null) OnMatch(sourcePosn.SubString(0, length.Value)); else OnMismatch?.Invoke(); return length; }
int? IMatch.Match(SourcePosn sourcePosn) { var length = _data.Match(sourcePosn); if(length == null) return null; var value = sourcePosn.SubString(0, length.Value); var funcResult = _func(value).Match(sourcePosn + length.Value); return funcResult == null ? null : length.Value + funcResult; }