Ripper

A parser based syntax highlighter
Masataka Kuwabara • May 31, 2018 • Sendai, Miyagi, Japan

| It has an elegant syntax that is natural to read and easy to write.
| https://www.ruby-lang.org/en/

Definitely. The syntax is elegant. But it is too complex sometimes. So, syntax highlighters for Ruby are difficult and easy to break.
For example, probably your editor cannot correctly highlight `????::?:`, `% %s%% %%%%` or `def end(def:def def;end)end` (They are **valid** Ruby programs!).
Yeah, it is edge cases. In real cases, some syntax highlighter cannot correctly highlight a here document.

I'll talk a robust syntax highlighter for Ruby, it is Iro gem and Iro.vim. The highlighter never break since it uses Ripper to highlight code.

RubyKaigi 2018 https://rubykaigi.org/2018/presentations/p_ck_

RubyKaigi 2018

Explore all talks recorded at RubyKaigi 2018
+62