From: Michael D. Lowis Date: Wed, 28 Jun 2017 01:19:40 +0000 (-0400) Subject: added rudimentary ruby highlighting X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7755b9ebe7e75cadd0e4634eab5e6fdf626bf037;p=projs%2Ftide.git added rudimentary ruby highlighting --- diff --git a/tide-hl b/tide-hl index 59f545e..3ec9d0c 100755 --- a/tide-hl +++ b/tide-hl @@ -135,7 +135,20 @@ language "C" do end language "Ruby" do + keywords = Set.new %w[ + if not then else elsif end def do exit nil + goto break return continue case default switch while for + ] + + range start=/%[qQrilwWs]\[/, stop=/\]/, :String match /#.*$/, :Comment + match /"(\\"|[^"\n])*"/, :String + match /'(\\'|[^'\n])*'/, :String + match /\/(\\\/|[^\/\n])*\//, :String + match /[A-Z][0-9a-zA-Z_]*/, :Type + match_sets /[a-z_][0-9a-zA-Z_]*/, :Keyword => keywords + match /0x[0-9a-fA-F]+/, :Number + match /[0-9]+/, :Number end #-------------------------------------------------------------------------------