Implement stringsSepBy1 parser#4
Conversation
Doc/src/reference-charparsers.txt
Outdated
| ``] | ||
| [ | ||
| `stringsSepBy sp sep` parses *zero* or more occurrences of `sp` separated by `sep` | ||
| `stringsSepBy p sep` parses *zero* or more occurrences of `p` separated by `sep` |
There was a problem hiding this comment.
Note that in addition to documenting the stringsSepBy1 parser, I also fixed a small inconsistency in the stringsSepBy documentation.
|
Thank you for your pull request. I will have time to work on this towards the end of the next week. |
|
Robin, the PR looks good! Could you add the (I'm working with @neoeinstein on modernizing the VS solution and the build system, see #5, which will hopefully also make things easier for Ionide users.) |
Also fix an inconsistency in docs: `p` should be `sp` in the documentation of stringsSepBy (and ...By1) so that they match the names used in the .fsi signature file.
|
Done. I also reversed my decision about changing the This should now be ready for you to merge and add the unit tests. |
This would fix #3.
I tried to write unit tests as well as implement the function, but I couldn't figure out how the existing
stringsSepByunit tests work in order to add a set ofstringsSepBy1tests (just likestringsSepBybut rejecting the case where the first parser doesn't match even a single time). Besides which, it wasn't immediately obvious to me how to get the code compiling on my Linux development box with VS Code + Ionide, so I couldn't have run the unit tests even if I had written them.So I'm afraid you'll have to write the unit tests and make sure my code is correct before merging it in. But it's a very straightforward change, and I could copy the logic from
manyStringsImpljust above. So I'm pretty sure that it's correct, I just couldn't prove it with unit tests.