lib/rouge/lexers/rust.rb in rouge-1.1.0 vs lib/rouge/lexers/rust.rb in rouge-1.2.0
- old
+ new
@@ -85,11 +85,11 @@
rule /[*!@~&+%^<>=-]/, Operator
rule /([.]\s*)?#{id}(?=\s*[(])/m, Name::Function
rule /[.]\s*#{id}/, Name::Property
rule /(#{id})(::)/m do
- group Name::Namespace; group Punctuation
+ groups Name::Namespace, Punctuation
end
# macros
rule /\bmacro_rules!/, Name::Decorator, :macro_rules
rule /#{id}!/, Name::Decorator, :macro
@@ -107,16 +107,16 @@
state :macro do
mixin :has_literals
rule /[\[{(]/ do |m|
@macro_delims[delim_map[m[0]]] += 1
- debug { " macro_delims: #{@macro_delims.inspect}" }
+ puts " macro_delims: #{@macro_delims.inspect}" if @debug
token Punctuation
end
rule /[\]})]/ do |m|
@macro_delims[m[0]] -= 1
- debug { " macro_delims: #{@macro_delims.inspect}" }
+ puts " macro_delims: #{@macro_delims.inspect}" if @debug
pop! if macro_closed?
token Punctuation
end
# same as the rule in root, but don't push another macro state