Skip to content

Feedback on parser for parsing durations #91

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

You must be logged in to vote
  1. There was a bug with the return type of the toChoiceParser, this has been fixed in the null-safety branch for a while: b5e85d6. Could probably be cherrypicked into older versions, but since this is potentially breaking existing code I am reluctant to release a new version.

  2. Not sure what you mean by petitparser lazily compiles itself? I don't see anything going on lazily inside your _buildX function, though there is nothing particularly expensive either and it is only called once when the final variable is read first. Dart initializes final top-level variables lazily on the first read.

  3. Casting things in the map function shouldn't be necessary. If your function returns R the returned …

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 #91 on December 08, 2020 19:52.