private void MatchOption( OptionParser pMatch, ParserResult pr, ref IArgument expectedArg, ref IItem expectedArgItem) { IOption option = pMatch.Done( ); pr.Set(option); expectedArgItem = option; expectedArg = null; SetNextExpectedArg(option, pr, ref expectedArg, ref expectedArgItem); }
private void MatchFlag( FlagParser pMatch, ParserResult pr, ref IArgument expectedArg, ref IItem expectedArgItem) { List <IItem> items = pMatch.Done( ).ToList( ); foreach (IItem item in items) { pr.Set(item); } expectedArgItem = items.Last( ); expectedArg = null; SetNextExpectedArg(items.Last( ), pr, ref expectedArg, ref expectedArgItem); }