Whiteknight / ParserObjects

C# library for parser combinators
https://whiteknight.github.io/ParserObjects
Apache License 2.0
6 stars 0 forks source link

MatchAny()does not accept string argument #201

Closed Whiteknight closed 8 months ago

Whiteknight commented 9 months ago
public static IParser<char, char> MatchAny(ICollection<char> possibilities)

This method (and presumably the NotMatchAny variant) cannot take a string argument:

MatchAny("abcd")

There's also this method here, which has the same name and might be causing conflicts:

public static IParser<char, string> MatchAny(IEnumerable<string> patterns)

We should rename these to MatchAnyString or MatchAnyChar and make sure to add plenty of tests for proper usage.

Whiteknight commented 8 months ago

This is done in master now, along several tests