Sha256: 4661ed13a34e8e47b23bac5c90dd88d382642d6f9f8fd3138d72c6feab1c01ae

Contents?: true

Size: 466 Bytes

Versions: 14

Compression:

Stored size: 466 Bytes

Contents

module Rouge
  module Lexers
    class Conf < RegexLexer
      tag 'conf'
      aliases 'config', 'configuration'

      desc 'A generic lexer for configuration files'
      filenames '*.conf', '*.config'

      # short and sweet
      state :root do
        rule /#.*?\n/, Comment
        rule /".*?"/, Str::Double
        rule /'.*?'/, Str::Single
        rule /[a-z]\w*/i, Name
        rule /\d+/, Num
        rule /[^\d\w#"']+/, Text
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rouge-1.5.0 lib/rouge/lexers/conf.rb
rouge-1.4.0 lib/rouge/lexers/conf.rb
rouge-1.3.4 lib/rouge/lexers/conf.rb
rouge-1.3.3 lib/rouge/lexers/conf.rb
rouge-1.3.2 lib/rouge/lexers/conf.rb
rouge-1.3.1 lib/rouge/lexers/conf.rb
rouge-1.3.0 lib/rouge/lexers/conf.rb
rouge-1.2.0 lib/rouge/lexers/conf.rb
rouge-1.1.0 lib/rouge/lexers/conf.rb
rouge-0.5.4 lib/rouge/lexers/conf.rb
rouge-0.5.3 lib/rouge/lexers/conf.rb
rouge-0.5.2 lib/rouge/lexers/conf.rb
rouge-0.5.1 lib/rouge/lexers/conf.rb
rouge-0.5.0 lib/rouge/lexers/conf.rb