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

render AST into string - possible enhancement? #62

Open
vwegert opened this issue Mar 13, 2023 · 2 comments
Open

render AST into string - possible enhancement? #62

vwegert opened this issue Mar 13, 2023 · 2 comments

Comments

@vwegert
Copy link

vwegert commented Mar 13, 2023

For an upcoming project, I need to parse a set of existing XPath expressions, make some changes to individual parts (like renaming variable or function references), render the expression as a string again and replace the original.
From my experiments, I believe that XPath2.Net will handle the parsing step just fine. I'd probably need some additional methods to make the changes and render the expression.

  1. Does this functionality already exist - did I miss something?
  2. If not - would you be interested in a PR with the additions once I'm done?
@StefH
Copy link
Owner

StefH commented Mar 13, 2023

Hello @vwegert ,

  1. I don't know, I'll have to search the code.
  2. If this is just an addition, and will not break any functionality or decrease the test coverage, I will surely accept a PR.

@vwegert
Copy link
Author

vwegert commented Apr 5, 2023

A quick update: I have examined the code further and have not found any provisions to render the AST back to string form. I've made some progress in that regard and am already able to render most of the AST elements. I'm currently struggling with the path elements - and I believe I have encountered an issue already covered in issue #7: parsing "/foo/bar" and "foo/bar" yields the exact same AST...

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

No branches or pull requests

2 participants