Skip to content

Conversation

miguel76
Copy link

Expose two new functions (parse and compileParsed) for each step of the
compile process.
So that a user of the library may, if needed, transform the parse tree
before translating and compiling it into a function.

Expose two new functions (parse and compileParsed) for each step of the
compile process.
So that a user of the library may, if needed, transform the parse tree
before translating and compiling it into a function.
@dfilatov
Copy link
Owner

@miguel76 Could you clarify cases when you have to transform parsed tree?

@miguel76
Copy link
Author

The case for which I thought it was for using jspath against JSON-LD.
JSON-LD is expressed in JSON but the data model is richer. So it makes sense for a parse engine to expose things not directly expressed in the JSON data, like property values derived from other property values. Some of this could be done by "path rewriting".

Generally speaking, I think that it makes sense to expose the parse tree to use the jspath syntax for different contexts. For example on streaming JSON data.

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.

2 participants