Textmate Grammar Python

Ruff Checked with mypy pre-commit CI/CD readthedocs

A lexer and tokenizer for grammar files as defined by TextMate and used in VSCode, implemented in Python.

Textmate grammars are made for vscode-texmate, allowing for syntax highlighting in VSCode after tokenization. This presents textmate-grammar-python with a large list of potentially supported languages.

flowchart LR G[grammar file] C[code] PY("`textmate-grammar-**python**`") JS("`vscode-textmate **js**`") T[tokens] click JS "https://github.com/microsoft/vscode-textmate" C --> PY C --> JS G -.-> PY G -.-> JS PY --> T JS --> T

Index

Sources