public bool EndParsing(TokenPair tokenPair) { if (tokenPair.Current.Type != LexicalType.EndOfInput) { LogTokenPair(tokenPair, $"{nameof( EndParsing )} called before end of command line text", LogEventLevel.Error); return(false); } if (_current == null) { _options !.SpuriousValues.Add(tokenPair.Previous.Text); return(true); } return(AssignToOption(tokenPair)); }
public bool ProcessText(TokenPair tokenPair) { if (_current == null) { _options !.SpuriousValues.Add(tokenPair.Current.Text); } else { if (_current.Key == null) { _current.Key = tokenPair.Current.Text; } else { _current.Values.Add(tokenPair.Current.Text); } } return(true); }