-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Project doesn't contain enough examples #3
Comments
This is a good suggestion. I certainly need to revisit this at some point. Read about red-green trees here:
Parser is a manually written top-down recursive descent. Unfortunately the parser isn't written really well, the scanner is not separate from the parser, so you can't just scan tokens easily without involving the parser. This is a limitation of how the Roslyn VB parser was written. XPath is not supported at all and I haven't even been thinking about it at all. It may be easy to add, or it may be super difficult, I don't know. I have no plans to investigate XPath. It is OK to use the list of error codes, it's under the Apache 2.0 license. I want to implement modification/mutation/deletion, because it's a useful feature. XLinq has it really convenient. However there's a design choice I'll have to make.
I'll think about it later. |
Hi, I want to modify the syntax tree. I've seen that there is already a SyntaxRewriter that I could use to "modify" the tree. Is there a reason why this class is internal? Or do you plan in the near future to implement any kind of modification mechanism as you described above? Thx in advance |
Hi, first of all apologies that the modification story is not there yet. We just don't have the time to think through the modification story. We do hope to get to it eventually but this is a side project with low priority for us right now. I guess the simplest thing you can do is based on a syntax tree prepare a list of text edits to modify the source and then just do a full reparse of the text. I know this is terrible from performance standpoint but you'll be guaranteed a fresh, clean and correct tree every time. We've taken shortcuts to get things going with the current model and we're not sure the syntax rewriter will even work with the hacks we made (Start, FullWidth, Parent etc). You can of course fork the library and try making it public to see if it works, which I honestly doubt. So for now the suggestion is: generate text edits and do full reparse for modification scenarios. We'll get to the proper modification support eventually, I just don't know when. |
This project looks really nice, but I agree to the big disadvantage of missing documentation. My problems:
After maybe 3 hours of experimenting I give up. I "just" wanted to do do a simple thing, but I can't get it without more information. It's very sad. This great library is hard to use for newcomers, because of missing documentation. |
there is no gh-pages orphan git branch, and it may help to figure out, how this library work.
Questions which I have:
The text was updated successfully, but these errors were encountered: