Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new and awesome grammar, suitable for ST, VSCode, docs and beyond!
Fully covers Tact 1.3.0 🚀 My refactoring kept those goals in mind: 1. Grammar should work with docs, which feature lots of small snippets without the full context of a regular Tact file 2. Grammar should work with Sublime, VSCode and Monaco editor (VSCode's underlying editor). 3. Grammar should properly highlight the "happy path", when the referenced code can be checked by Tact compiler. After all, this is a TextMate grammar, which operates on sequences of RegExes. And thus, it's nigh-impossible and mostly pointless to cover all cases and match up to Ohm's grammer even when one really tries (see 5k+ lines of terse RegEx in TypeScript's TextMate grammar). We just need the "happy path" to work. P.S.: Ironically enough, common advice for parsing HTML with regular expressions is: "Please, don't!", while 80% of all HTML highlighting out there is done with them :) Closes #1 Closes #2
- Loading branch information