From d062c874bd0d83a67473bb9d321b99d0b66f0fdb Mon Sep 17 00:00:00 2001 From: Christian Nicolai Date: Thu, 11 Aug 2011 22:53:32 +0200 Subject: [PATCH] Allow ? and ! in Ruby identifiers From the spec ? and ! are only allow at the _end_ of _method_ names. The current highlighter accepts ? and ! in _all_ identifiers (since they could be e.g. method calls), too. --- ruby.jsf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruby.jsf b/ruby.jsf index 0c155ad..cb70803 100644 --- a/ruby.jsf +++ b/ruby.jsf @@ -397,7 +397,9 @@ done "attr_writer" kw "module_function" kw done - "a-zA-Z0-9_" ident + # allowing ?! is not nearly correct but fixes more than + # it destructs + "a-zA-Z0-9_?!" ident :kw Keyword * rest noeat