[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] TLA+ tree-sitter grammar updates



The parser update has been rolled out (modulo some frontend caching) and you should be able to see highlighting in snippets now if they're marked with tla.

Andrew

On Wednesday, July 13, 2022 at 2:58:52 PM UTC-4 Andrew Helwer wrote:
I've updated the parser to parse snippets without an enclosing module, and also spent a bunch of time improving the highlighting queries. Emailed my github contact to roll out the changes to github itself; hopefully should happen within a week. Unsure what the github support reply is about, maybe some internal disconnect.

Andrew

On Wednesday, July 13, 2022 at 2:05:49 PM UTC-4 Markus Alexander Kuppe wrote:
Github support notified me that this issue has been fixed.

Markus

> On Jul 3, 2022, at 9:08 AM, Andrew Helwer <andrew...@xxxxxxxxx> wrote:
>
> Yeah Markus pointed this out to me a couple months back. Originally the plan was to keep using the regex highlighter for snippets for this reason, but I guess that was overlooked when this was enabled. I think what I will do is modify the grammar to parse TLA+ snippets that aren’t contained within module start/end markers. This will mean the grammar accepts invalid TLA+ but it already does that in a few cases (tree-sitter grammars are permissive by design) so no big deal. Then I will email github contacts to update it (this feature is still not publicly available unless you know somebody).
>
> Andrew
> On Sunday, July 3, 2022 at 10:24:51 AM UTC-4 Markus Alexander Kuppe wrote:
> Yes, snippets broke when the new grammar rolled out. I reported [1] a bug, but nothing has happened.
>
> Markus
>
> [1] https://support.github.com/contact/bug-report
>
> > On Jul 2, 2022, at 8:44 PM, Willy Schultz <will...@xxxxxxxxx> wrote:
> >
> > Did Github's switch over to the tree-sitter grammar affect the way Markdown code snippets of TLA+ are highlighted? It seems that now TLA+ snippets in Markdown aren't highlighted unless they are contained within a full module e.g see here. I could be mistaken, but I seem to recall that in past these snippet blocks would highlight TLA+ expressions even if they weren't enclosed within a full module definition.

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/410a97e3-f6e5-4ece-9d52-b183caa985fan%40googlegroups.com.