lib/rouge/lexers/c.rb in rouge-0.2.0 vs lib/rouge/lexers/c.rb in rouge-0.2.1

- old
+ new

@@ -3,10 +3,12 @@ class C < RegexLexer tag 'c' filenames '*.c', '*.h', '*.idc' mimetypes 'text/x-chdr', 'text/x-csrc' + desc "The C programming language" + # optional comment or whitespace ws = %r((?:\s|//.*?\n|/[*].*?[*]/)+) id = /[a-zA-Z_][a-zA-Z0-9_]*/ keywords = %w( @@ -53,9 +55,10 @@ rule /(?:#{keywords_type.join('|')})\b/, 'Keyword.Type' rule /(?:_{0,2}inline|naked|restrict|thread|typename)\b/, 'Keyword.Reserved' rule /__(?:#{__reserved.join('|')})\b/, 'Keyword.Reserved' rule /(?:true|false|NULL)\b/, 'Name.Builtin' rule id, 'Name' + rule /\s+/m, 'Text' end state :case do rule /:/, 'Punctuation', :pop! mixin :statements