Upgrade to Pro — share decks privately, control downloads, hide ads and more …

なぜtree-sitter-rubyの日本語シンボルはシンタックスハイライトされないのか

Avatar for ItoJum ItoJum
July 02, 2026
5

 なぜtree-sitter-rubyの日本語シンボルはシンタックスハイライトされないのか

Avatar for ItoJum

ItoJum

July 02, 2026

More Decks by ItoJum

Transcript

  1. tree-sitter • 構文解析ライブラリ • 使われているところ ◦ GitHub ◦ Zed ◦

    コーディングエージェント(Claude Code, Codex等) tree-sitter-rubyは、tree-sitterのRuby文法ライブラリ tree-sitterのロゴ https://github.com/tree-sitter
  2. 原因(たぶん) 文字 codepoint 下位バイト 一致する禁止文字 言 U+5200 0x00 \0 儀

    Ux5100 0x00 \0 一 U+4E00 0x00 \0 最 U+6700 0x00 \0 • 禁止文字の判定メソッドがUnicodeをchar(8bit)に切り詰めて いた • マルチバイト文字の下位バイトが Rubyのシンボルの禁止文 字に一致したとき 、エラーを出していた