Tree Sitter: Add update-language-info script and resulting data.

Review Request #14514 — Created July 26, 2025 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

This change adds a script that loads information about supported
languages from a tree-sitter-language-pack checkout. This creates a
file, reviewboard/treesitter/_languages.py, which has two mappings,
MIME_TYPE_TO_LANGUAGE and FILE_SUFFIX_TO_LANGUAGES, which are used
for determining the tree sitter language name to use for a given file.

The compiled grammars that are shipped in tree-sitter-language-pack
don't include any of the grammar metadata, so this script will go into a
a checkout and grab the filename suffixes. This also fetches the
"first_line_regex" key, although that is not currently used for
detection.

Ran script to create the _languages.py file.

Commits

Files