lf-lang / vscode-lingua-franca

Lingua Franca extension for Visual Studio Code
Other
4 stars 3 forks source link

Linguist support #91

Closed jesslin02 closed 1 year ago

jesslin02 commented 1 year ago
jesslin02 commented 1 year ago

linguist analysis of grammar regex errors in the lflang.tmLanguage.json file: see issue 92

lhstrh commented 1 year ago

I noticed that the checks pass even though there is an explicit reference to the TextMate file that wasn't updated. The reason is that we don't have regression tests for highlighting. Since the TextMate file needs refactoring, this seems like an opportune time for adding tests for it. Adding it to the description of the PR...

petervdonovan commented 1 year ago

Since the TextMate file needs refactoring, this seems like an opportune time for adding tests for it.

See our website code highlighter for an example of how to write TypeScript code that uses our TextMate grammar to tokenize an arbitrary piece of LF code. That should not be hard to turn into a mocha/chai test (we use these frameworks instead of junit because junit does not integrate well with VS Code's recommended integration test workflow). Examples of such tests are in the src/test directory