Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for constructors in nested parsers #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dwimberger
Copy link

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.

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.
@lammas
Copy link

lammas commented Apr 10, 2016

Are there any plans on merging this? I'd very much like to use binary-parser, but having this fixed is critical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants