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

なぜtree-sitter-rubyの日本語シンボルはハイライトされないのか ~敗北編~

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for ItoJum ItoJum
July 09, 2026
14

なぜtree-sitter-rubyの日本語シンボルはハイライトされないのか ~敗北編~

Avatar for ItoJum

ItoJum

July 09, 2026

More Decks by ItoJum

Transcript

  1. tree-sitter • 構文解析ライブラリ • 使われているところ ◦ エディタ(Zed, Neovim, Emacs?) ◦

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

    Ux6C60 0x60 ` 罠 U+7F60 0x60 ` 遠 U+9060 0x60 ` • 禁止文字の判定メソッドがUnicodeをchar(8bit)に切り詰めて いた • マルチバイト文字の下位バイトが Rubyのシンボルの禁止文 字に一致したとき 、エラーを出していた 5