Skip to content

Added parsing context variables #166

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

Merged
merged 4 commits into from
Jun 10, 2021
Merged

Added parsing context variables #166

merged 4 commits into from
Jun 10, 2021

Conversation

Rzial
Copy link
Contributor

@Rzial Rzial commented Jun 3, 2021

Hi, I've made a local fork of this repo because I needed some features that are not currently available.

This PR adds a $parent and a $root variable while parsing each structure to be able to reference fields (or use them on callbacks). Context variables are available on .array(), .choice(), .nest() and .pointer() methods. This PR should close #10

You can find more documentation on the README.md

I've also corrected some methods signatures that are wrong

@keichi
Copy link
Owner

keichi commented Jun 4, 2021

Thanks @Rzial! I will take a look.

@keichi
Copy link
Owner

keichi commented Jun 6, 2021

The changes look good to me, but can you add tests for $parent and $root?

@keichi
Copy link
Owner

keichi commented Jun 10, 2021

Looks good, thanks!

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.

Using variables from parent scope in a 'choice'
2 participants