AdguardTeam / AdguardTeam/VscodeAdblockSyntax

More thorough testing of TMLanguage

Open
#133 1 comment 0 reactions 1 assignee Claimed by @maximtop View on GitHub
Priority: P4
Dominant language
TypeScript
Stars
88
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Tester should throw an error if the TMLanguage file is not structured correctly or if any regular expression is syntactically incorrect.
For both scenarios, the error message should be explicit and include the specific location of the error, indicated by row and column numbers.

In practice, incorrect TMLanguage is usually simply ignored and tokenization does not work.

For details on the TMLanguage structure, refer to: https://macromates.com/manual/en/language_grammars

Here's an example of an invalid regular expression:
```yaml
match: |-
(?x)
(##) # we often match separators, but in this case, first # in the separator considered as a comment - so we got an unbalanced parenthesis error
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.