AdguardTeam / AdguardTeam/VscodeAdblockSyntax

More thorough testing of TMLanguage

Ouverte
#133 1 commentaire 0 réactions 1 personne assignée Réclamée par @maximtop Voir sur GitHub
Priority: P4
Langage dominant
TypeScript
Étoiles
88
Forks
8
Métriques de merge des PR
Aucune PR mergée en 30 j

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
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.