Module: Rouge::Lexers

Defined in:
lib/rouge/lexer.rb,
lib/rouge/lexers/c.rb,
lib/rouge/lexers/r.rb,
lib/rouge/lexers/go.rb,
lib/rouge/lexers/io.rb,
lib/rouge/lexers/vb.rb,
lib/rouge/lexers/cpp.rb,
lib/rouge/lexers/css.rb,
lib/rouge/lexers/erb.rb,
lib/rouge/lexers/ini.rb,
lib/rouge/lexers/lua.rb,
lib/rouge/lexers/php.rb,
lib/rouge/lexers/qml.rb,
lib/rouge/lexers/sed.rb,
lib/rouge/lexers/sml.rb,
lib/rouge/lexers/sql.rb,
lib/rouge/lexers/tcl.rb,
lib/rouge/lexers/tex.rb,
lib/rouge/lexers/xml.rb,
lib/rouge/lexers/conf.rb,
lib/rouge/lexers/diff.rb,
lib/rouge/lexers/haml.rb,
lib/rouge/lexers/html.rb,
lib/rouge/lexers/http.rb,
lib/rouge/lexers/java.rb,
lib/rouge/lexers/llvm.rb,
lib/rouge/lexers/make.rb,
lib/rouge/lexers/perl.rb,
lib/rouge/lexers/ruby.rb,
lib/rouge/lexers/rust.rb,
lib/rouge/lexers/sass.rb,
lib/rouge/lexers/scss.rb,
lib/rouge/lexers/toml.rb,
lib/rouge/lexers/viml.rb,
lib/rouge/lexers/yaml.rb,
lib/rouge/lexers/nginx.rb,
lib/rouge/lexers/ocaml.rb,
lib/rouge/lexers/scala.rb,
lib/rouge/lexers/shell.rb,
lib/rouge/lexers/swift.rb,
lib/rouge/lexers/csharp.rb,
lib/rouge/lexers/elixir.rb,
lib/rouge/lexers/erlang.rb,
lib/rouge/lexers/factor.rb,
lib/rouge/lexers/groovy.rb,
lib/rouge/lexers/matlab.rb,
lib/rouge/lexers/prolog.rb,
lib/rouge/lexers/puppet.rb,
lib/rouge/lexers/python.rb,
lib/rouge/lexers/racket.rb,
lib/rouge/lexers/scheme.rb,
lib/rouge/lexers/clojure.rb,
lib/rouge/lexers/gherkin.rb,
lib/rouge/lexers/haskell.rb,
lib/rouge/lexers/markdown.rb,
lib/rouge/lexers/smalltalk.rb,
lib/rouge/lexers/handlebars.rb,
lib/rouge/lexers/javascript.rb,
lib/rouge/lexers/moonscript.rb,
lib/rouge/lexers/plain_text.rb,
lib/rouge/lexers/properties.rb,
lib/rouge/lexers/common_lisp.rb,
lib/rouge/lexers/objective_c.rb,
lib/rouge/lexers/sass/common.rb,
lib/rouge/lexers/apple_script.rb,
lib/rouge/lexers/coffeescript.rb,
lib/rouge/lexers/lua/builtins.rb,
lib/rouge/lexers/php/builtins.rb,
lib/rouge/lexers/viml/keywords.rb,
lib/rouge/lexers/matlab/builtins.rb,
lib/rouge/lexers/gherkin/keywords.rb,
lib/rouge/lexers/literate_haskell.rb,
lib/rouge/lexers/literate_coffeescript.rb

Defined Under Namespace

Classes: AppleScript, C, CSS, CSharp, Clojure, Coffeescript, CommonLisp, Conf, Cpp, Diff, ERB, Elixir, Erlang, Factor, Gherkin, Go, Groovy, HTML, HTTP, Haml, Handlebars, Haskell, INI, IO, JSON, Java, Javascript, LLVM, LiterateCoffeescript, LiterateHaskell, Lua, Make, Markdown, Matlab, Moonscript, Nginx, OCaml, ObjectiveC, PHP, Perl, PlainText, Prolog, Properties, Puppet, Python, Qml, R, Racket, Ruby, Rust, SML, SQL, Sass, SassCommon, Scala, Scheme, Scss, Sed, Shell, Smalltalk, Swift, TCL, TOML, TeX, VimL, VisualBasic, XML, YAML

Class Method Summary collapse

Class Method Details

.load_const(const_name, relpath) ⇒ Object


428
429
430
431
432
433
# File 'lib/rouge/lexer.rb', line 428

def self.load_const(const_name, relpath)
  return if const_defined?(const_name)

  root = Pathname.new(__FILE__).dirname.join('lexers')
  load root.join(relpath)
end