タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

tree-sitterに関するmizdraのブックマーク (1)

  • How to write a linter using tree-sitter in an hour

    This article was discussed on Hacker News. This is a continuation of my last post on how to write a tree-sitter grammar in an afternoon. Building on the grammar we wrote, now we’re going to write a linter for Imp, and it’s even easier! The final result clocks in less than 60 SLOC and can be found here. Recall that tree-sitter is an incremental parser generator. That is, you give it a description o

    mizdra
    mizdra 2023/07/16
    tree-sitter の query 機能を使い、構文ツリーに対するパターンマッチをして linter を作る話。tree-sitter に乗っかることで、構文エラーのあるコードを処理可能で、応答性の高い linter を自然に実装できる。面白かった。
  • 1