XamlX
XamlX copied to clipboard
Feature/use guilabs parser
What does the pull request do?
This PR changes praser from XDocument to Microsoft.GuiLabs.Xml
Further improvements are required to make it usable in language server.
The only thing I haven't tested are error line numbers, but as I am going to add diagnostics to avalonia extension, so it will be obvious if it is wrong.
Checklist
- [X ] Added unit tests (if possible)? (I've duplicated unittests for legacy and new parser, to show that these parsers are the same).
I am unable to run bencharks, it errors out :( This branch has test which can be used to compare AST created by old and new compiler: https://github.com/ShadowDancer/XamlX/tree/guilabs_tester
Breaking changes
I think there are no breaking changes, I've analyzed multiple projects I have access to and after this PR produced syntax tree is equal to old one.
Fixed issues
#24
@kekekeks any thoughts on this PR? As development on this repo continues solving conflicts will be more and more problematic, as this PR replaces whole parser, so any change in parser will affect this PR.
I think this is really important addition to Avalonia as together with error reporting (separate PR) it will let language server to report errors as you type, by parsing stuff in background.
Move the parser itself to a separate assembly and we can merge
Done
I think this PR can help a lot in solving this problem https://github.com/AvaloniaUI/AvaloniaVS/issues/225 . Why not merge it?