StefH / XPath2.Net

Lightweight XPath2 for .NET
Microsoft Public License
36 stars 14 forks source link

Expose the AST? #35

Closed binarycow closed 4 years ago

binarycow commented 4 years ago

Hello! I would like to use your library in my application, but I have a requirement to access the AST. I was hoping you could help.

I can think of three options...

  1. I fork your repo, make the necessary changes, and ensure my fork stays in sync with the main repo
  2. In the main repo, change the AST (and related types) to public - this will expose them for everyone.
  3. In the main repo, put all the code from the XPath2 assembly into a shared project. I'd use git subtree to include your repo in my main project repo. I'd reference the shared project, and it would bring your code into my assembly. This lets me access internal types, without exposing them to all consumers of the assembly (as option #2 would do)
StefH commented 4 years ago

Hello @binarycow,

I think that in this case option 2 would be easiest.

Updating the version from the NuGet to 1.1.0 would make sense.

And adding an extra class comment on all classes like:

/// <summary>
/// This class is used by XPath.Net internally. It isn't intended for use in application code.
/// </summary>
public abstract class AbstractNode : IEnumerable<AbstractNode>
StefH commented 4 years ago

@binarycow Do you want to create a PR for this?

binarycow commented 4 years ago

Sure, I'll submit a PR

binarycow commented 4 years ago

https://github.com/StefH/XPath2.Net/pull/37

@StefH