TextMateSharp icon indicating copy to clipboard operation
TextMateSharp copied to clipboard

Support for XML Plist grammars?

Open arvindshmicrosoft opened this issue 4 years ago • 1 comments
trafficstars

Firstly - thank you for this project!

From what I can see thus far, the grammar needs to be the JSON format only, is that right? Do you have any plans to implement support for the XML Plist grammar similar to what exists in tm4e?

I realize there is a workaround to convert those XML grammars to JSON, so this is a good-to-have feature, albeit lower priority.

Once again, thanks!

arvindshmicrosoft avatar Jul 04 '21 18:07 arvindshmicrosoft

Hi yep, at this moment only JSON grammars are supported.

The tm4e implementation uses an XML SAX parser, which notifies start/end when a node is being read.

I didn't find an easy way to do that in dotnet, but I didn't investigate too much because I only needed JSON support.

Supporting PList format should be straightforward using a SAX-based dotnet XML parser, and writing something similar to this, based on parsing XML contents: https://github.com/danipen/TextMateSharp/blob/master/src/TextMateSharp/Internal/Parser/Json/JSONPListParser.cs

danipen avatar Jul 04 '21 18:07 danipen