Skip to content

Parsing escape characters #72

Answered by renggli
duncanmak asked this question in Q&A
Discussion options

You must be logged in to vote

I think the problem is here: (ref(characterNoString) | ref(string_)).star().flatten(). flatten returns the consumed sub-string, so it ignores the decoded characters you return.

Probably something like ... .star().map((s) => s.join()) is what you want ...

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by renggli
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #72 on December 08, 2020 19:55.