Add support for constructors in nested parsers#24
Open
dwimberger wants to merge 3 commits intokeichi:masterfrom
Open
Add support for constructors in nested parsers#24dwimberger wants to merge 3 commits intokeichi:masterfrom
dwimberger wants to merge 3 commits intokeichi:masterfrom
Conversation
Beginning to add the possibilities of nested parser constructors. In the original version, nested parsers ignore the create(constructorFn).
Differentiate the constructor for the main parser from nested parsers without constructor.
Added docs for adding constructors to nested parsers.
|
Are there any plans on merging this? I'd very much like to use binary-parser, but having this fixed is critical. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently there is no support for nested parsers that are using constructors.
However this would be nice to have to be able and call methods or prototype methods on the parsed objects (main and nested).
This pull request is just a quick solution that shows it could be done. It is most likely not the best way to get it done, but it maybe it helps to spark a better idea and to add the functionality to the existing code base.