jlelong / vscode-latex-basics

LaTeX grammars for Visual Studio Code
MIT License
19 stars 10 forks source link

Refactor language embedding support #31

Closed jlelong closed 2 years ago

jlelong commented 2 years ago

To ease maintenance of the grammar syntax, this PR introduces a js script to automatically generate the rules for minted and code blocks. These rules have to be duplicated every time a new embedded language is supported leading to a very long and hard to maintain grammar file.

First, this PR adds tests for (almost) every supported embedded language using the old grammar. Then, the grammar is generated using the new script and we can check that there is no change in the resulting grammar.

As a by-product, this PR closes #24.