Skip to content

SKalt/tree-sitter-tcl

Repository files navigation

tree-sitter-tcl

A tree-sitter grammar for TCL.

Status

  • lexing
    • substitutions
      • dollar substitutions: tested
      • bracket subsitutions: tested
      • escape characters: parsed, but not tested
    • array references
    • double-quote strings
  • parsing: complete. Everything's a word.
    • commands
  • highlighting: WIP
  • locals: WIP
  • tagging: WIP

Contributing

Please do! Until 2023, I'll try to review PRs with comprehensive comments and tests.

To contribute a feature or bugfix,

  • create an issue to get an idea of whether this repo's the right place for the work
  • fork &/ branch off of main
  • write conventional commits
  • make sure either the tests are passing or no new tests are failing prior to submitting a PR

I'd vaguely like to write a TCL language server, but I'm not sure I'll get to it in 2022. I ironically don't use tcl myself.

Design notes

This grammar speculatively parses all words rather than hardcoding the core language constructs and deriving which words should be recursively parsed. This trades off faster parsing for more difficult semantic analysis and a cruder grammar API for queries and syntax highlighting.

About

draft tree-sitter grammar for TCL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published