XamlX icon indicating copy to clipboard operation
XamlX copied to clipboard

Feature/use guilabs parser

Open ShadowDancer opened this issue 4 years ago • 4 comments

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

ShadowDancer avatar Sep 07 '20 20:09 ShadowDancer

@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.

ShadowDancer avatar Nov 26 '20 21:11 ShadowDancer

Move the parser itself to a separate assembly and we can merge

kekekeks avatar Nov 26 '20 21:11 kekekeks

Done

ShadowDancer avatar Dec 09 '20 22:12 ShadowDancer

I think this PR can help a lot in solving this problem https://github.com/AvaloniaUI/AvaloniaVS/issues/225 . Why not merge it?

workgroupengineering avatar Nov 24 '21 11:11 workgroupengineering