lib/rouge/lexers/ocl.rb in rouge-4.2.0 vs lib/rouge/lexers/ocl.rb in rouge-4.2.1
- old
+ new
@@ -59,12 +59,12 @@
state :root do
rule %r/\s+/m, Text
rule %r/--.*/, Comment::Single
rule %r/\d+/, Num::Integer
rule %r/'/, Str::Single, :single_string
- rule %r([->|+*/<>=~!@#%&|?^-]), Operator
+ rule %r([-|+*/<>=~!@#%&?^]), Operator
rule %r/[;:()\[\],.]/, Punctuation
- rule %r/\w[\w\d]*/ do |m|
+ rule %r/[a-zA-Z]\w*/ do |m|
if self.class.operators.include? m[0]
token Operator
elsif self.class.keywords_type.include? m[0]
token Keyword::Declaration
elsif self.class.keywords.include? m[0]