datalust / superpower

A C# parser construction toolkit with high-quality error reporting
Apache License 2.0
1.07k stars 99 forks source link

Fix TextSpan.Equals() so that reference equality and length are considered #66

Closed nblumhardt closed 5 years ago

nblumhardt commented 5 years ago

The primary purpose of TextSpan.Equals() is in comparing remainders when determining whether a parser consumed input. The implementation and doc/intention diverge, this is what should be considered, but we'll have to be on the lookout for parsers broken by this subtle change (shouldn't be many, if any).

Fixes #64.