This is a tracking issue for integrating a tree-sitter based parser into various parts of Pyret. Tree-sitter provides a nice opportunity to reduce duplication and fragmentation of parsing and highlighting across different platforms.
Currently there are:
- a custom stream parser defined for CodeMirror 5
- a simple TextMate grammar for the VSCode extension
- Emacs mode + basic syntax highlighting
- limited regex keyword highlighting for (n)vim
- the official pyret-lang parser
Currently code.pyret.org cannot upgrade to CodeMirror 6 since streaming based parsers are no longer supported. CodeMirror 6 officially supports Lezer which is inspired by tree-sitter, but doesn't support a custom scanner (which tree-sitter does support, and is needed for Pyret's whitespace sensitivity).
Steps:
This is a tracking issue for integrating a tree-sitter based parser into various parts of Pyret. Tree-sitter provides a nice opportunity to reduce duplication and fragmentation of parsing and highlighting across different platforms.
Currently there are:
Currently code.pyret.org cannot upgrade to CodeMirror 6 since streaming based parsers are no longer supported. CodeMirror 6 officially supports Lezer which is inspired by tree-sitter, but doesn't support a custom scanner (which tree-sitter does support, and is needed for Pyret's whitespace sensitivity).
Steps: