https://lezer.codemirror.net/

Lezer (the Dutch word for reader, pronounced like “laser”) provides a parser generator that outputs JavaScript modules, which can be loaded to parse code into a non-abstract syntax tree. This tree can then be used to do highlighting and basic semantic analysis.

Voir aussi tree-sitter.