lib/rouge/lexers/haskell.rb in rouge-0.0.13 vs lib/rouge/lexers/haskell.rb in rouge-0.0.14
- old
+ new
@@ -36,9 +36,16 @@
rule /{-/, 'Comment.Multiline', :comment
rule /[^-{}]+/, 'Comment.Multiline'
rule /[-{}]/, 'Comment.Multiline'
end
+ state :comment_preproc do
+ rule /-}/, 'Comment.Preproc', :pop!
+ rule /{-/, 'Comment.Preproc', :comment
+ rule /[^-{}]+/, 'Comment.Preproc'
+ rule /[-{}]/, 'Comment.Preproc'
+ end
+
state :root do
mixin :basic
rule /\bimport\b/, 'Keyword.Reserved', :import
rule /\bmodule\b/, 'Keyword.Reserved', :module