Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More thorough testing of TMLanguage #133

Open
scripthunter7 opened this issue Apr 2, 2024 · 0 comments
Open

More thorough testing of TMLanguage #133

scripthunter7 opened this issue Apr 2, 2024 · 0 comments
Assignees

Comments

@scripthunter7
Copy link
Member

scripthunter7 commented Apr 2, 2024

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:

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 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants