Sha256: b50ff721c5137ece4544be820d9aea5fb1bbaf025574e438fac040d88976a043

Contents?: true

Size: 509 Bytes

Versions: 19

Compression:

Stored size: 509 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 /".*?"/, 'Literal.String.Double'
        rule /'.*?'/, 'Literal.String.Single'
        rule /[a-z]\w*/i, 'Name'
        rule /\d+/, 'Literal.Number'
        rule /[^\d\w#"']+/, 'Text'
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rouge-0.4.0 lib/rouge/lexers/conf.rb
rouge-0.3.10 lib/rouge/lexers/conf.rb
rouge-0.3.9 lib/rouge/lexers/conf.rb
rouge-0.3.8 lib/rouge/lexers/conf.rb
rouge-0.3.7 lib/rouge/lexers/conf.rb
rouge-0.3.6 lib/rouge/lexers/conf.rb
rouge-0.3.5 lib/rouge/lexers/conf.rb
rouge-0.3.4 lib/rouge/lexers/conf.rb
rouge-0.3.3 lib/rouge/lexers/conf.rb
rouge-0.3.2 lib/rouge/lexers/conf.rb
rouge-0.3.1 lib/rouge/lexers/conf.rb
rouge-0.3.0 lib/rouge/lexers/conf.rb
rouge-0.2.15 lib/rouge/lexers/conf.rb
rouge-0.2.14 lib/rouge/lexers/conf.rb
rouge-0.2.13 lib/rouge/lexers/conf.rb
rouge-0.2.12 lib/rouge/lexers/conf.rb
rouge-0.2.11 lib/rouge/lexers/conf.rb
rouge-0.2.10 lib/rouge/lexers/conf.rb
rouge-0.2.9 lib/rouge/lexers/conf.rb