nano-max-hub 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/nano-max-hub.gemspec +12 -0
- data/rouge-5.0.0/Gemfile +48 -0
- data/rouge-5.0.0/LICENSE +187 -0
- data/rouge-5.0.0/bin/rougify +17 -0
- data/rouge-5.0.0/lib/rouge/cli.rb +527 -0
- data/rouge-5.0.0/lib/rouge/demos/abap +32 -0
- data/rouge-5.0.0/lib/rouge/demos/actionscript +4 -0
- data/rouge-5.0.0/lib/rouge/demos/ada +26 -0
- data/rouge-5.0.0/lib/rouge/demos/apache +21 -0
- data/rouge-5.0.0/lib/rouge/demos/apex +9 -0
- data/rouge-5.0.0/lib/rouge/demos/apiblueprint +33 -0
- data/rouge-5.0.0/lib/rouge/demos/applescript +2 -0
- data/rouge-5.0.0/lib/rouge/demos/armasm +12 -0
- data/rouge-5.0.0/lib/rouge/demos/augeas +16 -0
- data/rouge-5.0.0/lib/rouge/demos/awk +4 -0
- data/rouge-5.0.0/lib/rouge/demos/batchfile +3 -0
- data/rouge-5.0.0/lib/rouge/demos/bbcbasic +6 -0
- data/rouge-5.0.0/lib/rouge/demos/bibtex +12 -0
- data/rouge-5.0.0/lib/rouge/demos/bicep +10 -0
- data/rouge-5.0.0/lib/rouge/demos/biml +38 -0
- data/rouge-5.0.0/lib/rouge/demos/bpf +7 -0
- data/rouge-5.0.0/lib/rouge/demos/brainfuck +5 -0
- data/rouge-5.0.0/lib/rouge/demos/brightscript +6 -0
- data/rouge-5.0.0/lib/rouge/demos/bsl +7 -0
- data/rouge-5.0.0/lib/rouge/demos/c +8 -0
- data/rouge-5.0.0/lib/rouge/demos/ceylon +7 -0
- data/rouge-5.0.0/lib/rouge/demos/cfscript +18 -0
- data/rouge-5.0.0/lib/rouge/demos/cisco_ios +19 -0
- data/rouge-5.0.0/lib/rouge/demos/clean +6 -0
- data/rouge-5.0.0/lib/rouge/demos/clojure +5 -0
- data/rouge-5.0.0/lib/rouge/demos/cmake +7 -0
- data/rouge-5.0.0/lib/rouge/demos/cmhg +8 -0
- data/rouge-5.0.0/lib/rouge/demos/cobol +103 -0
- data/rouge-5.0.0/lib/rouge/demos/codeowners +6 -0
- data/rouge-5.0.0/lib/rouge/demos/coffeescript +5 -0
- data/rouge-5.0.0/lib/rouge/demos/common_lisp +1 -0
- data/rouge-5.0.0/lib/rouge/demos/conf +4 -0
- data/rouge-5.0.0/lib/rouge/demos/console +6 -0
- data/rouge-5.0.0/lib/rouge/demos/cpp +8 -0
- data/rouge-5.0.0/lib/rouge/demos/crystal +45 -0
- data/rouge-5.0.0/lib/rouge/demos/csharp +5 -0
- data/rouge-5.0.0/lib/rouge/demos/css +4 -0
- data/rouge-5.0.0/lib/rouge/demos/csvs +8 -0
- data/rouge-5.0.0/lib/rouge/demos/cuda +11 -0
- data/rouge-5.0.0/lib/rouge/demos/cypher +5 -0
- data/rouge-5.0.0/lib/rouge/demos/cython +6 -0
- data/rouge-5.0.0/lib/rouge/demos/d +16 -0
- data/rouge-5.0.0/lib/rouge/demos/dafny +16 -0
- data/rouge-5.0.0/lib/rouge/demos/dart +6 -0
- data/rouge-5.0.0/lib/rouge/demos/datastudio +20 -0
- data/rouge-5.0.0/lib/rouge/demos/diff +7 -0
- data/rouge-5.0.0/lib/rouge/demos/digdag +19 -0
- data/rouge-5.0.0/lib/rouge/demos/docker +9 -0
- data/rouge-5.0.0/lib/rouge/demos/dot +5 -0
- data/rouge-5.0.0/lib/rouge/demos/dylan +8 -0
- data/rouge-5.0.0/lib/rouge/demos/ecl +17 -0
- data/rouge-5.0.0/lib/rouge/demos/eex +1 -0
- data/rouge-5.0.0/lib/rouge/demos/eiffel +30 -0
- data/rouge-5.0.0/lib/rouge/demos/elixir +1 -0
- data/rouge-5.0.0/lib/rouge/demos/elm +4 -0
- data/rouge-5.0.0/lib/rouge/demos/email +11 -0
- data/rouge-5.0.0/lib/rouge/demos/epp +4 -0
- data/rouge-5.0.0/lib/rouge/demos/erb +1 -0
- data/rouge-5.0.0/lib/rouge/demos/erlang +7 -0
- data/rouge-5.0.0/lib/rouge/demos/escape +3 -0
- data/rouge-5.0.0/lib/rouge/demos/factor +5 -0
- data/rouge-5.0.0/lib/rouge/demos/fluent +13 -0
- data/rouge-5.0.0/lib/rouge/demos/fortran +22 -0
- data/rouge-5.0.0/lib/rouge/demos/freefem +16 -0
- data/rouge-5.0.0/lib/rouge/demos/fsharp +12 -0
- data/rouge-5.0.0/lib/rouge/demos/gdscript +18 -0
- data/rouge-5.0.0/lib/rouge/demos/ghc-cmm +23 -0
- data/rouge-5.0.0/lib/rouge/demos/ghc-core +26 -0
- data/rouge-5.0.0/lib/rouge/demos/gherkin +17 -0
- data/rouge-5.0.0/lib/rouge/demos/gjs +23 -0
- data/rouge-5.0.0/lib/rouge/demos/glsl +14 -0
- data/rouge-5.0.0/lib/rouge/demos/go +7 -0
- data/rouge-5.0.0/lib/rouge/demos/gradle +10 -0
- data/rouge-5.0.0/lib/rouge/demos/graphql +17 -0
- data/rouge-5.0.0/lib/rouge/demos/groovy +9 -0
- data/rouge-5.0.0/lib/rouge/demos/gts +36 -0
- data/rouge-5.0.0/lib/rouge/demos/hack +5 -0
- data/rouge-5.0.0/lib/rouge/demos/haml +5 -0
- data/rouge-5.0.0/lib/rouge/demos/handlebars +7 -0
- data/rouge-5.0.0/lib/rouge/demos/haskell +6 -0
- data/rouge-5.0.0/lib/rouge/demos/haxe +4 -0
- data/rouge-5.0.0/lib/rouge/demos/hcl +7 -0
- data/rouge-5.0.0/lib/rouge/demos/hlsl +20 -0
- data/rouge-5.0.0/lib/rouge/demos/hocon +8 -0
- data/rouge-5.0.0/lib/rouge/demos/hql +5 -0
- data/rouge-5.0.0/lib/rouge/demos/html +8 -0
- data/rouge-5.0.0/lib/rouge/demos/http +14 -0
- data/rouge-5.0.0/lib/rouge/demos/hylang +10 -0
- data/rouge-5.0.0/lib/rouge/demos/idlang +8 -0
- data/rouge-5.0.0/lib/rouge/demos/idris +13 -0
- data/rouge-5.0.0/lib/rouge/demos/iecst +21 -0
- data/rouge-5.0.0/lib/rouge/demos/igorpro +9 -0
- data/rouge-5.0.0/lib/rouge/demos/ini +4 -0
- data/rouge-5.0.0/lib/rouge/demos/io +11 -0
- data/rouge-5.0.0/lib/rouge/demos/irb +4 -0
- data/rouge-5.0.0/lib/rouge/demos/irb_output +2 -0
- data/rouge-5.0.0/lib/rouge/demos/isabelle +16 -0
- data/rouge-5.0.0/lib/rouge/demos/isbl +4 -0
- data/rouge-5.0.0/lib/rouge/demos/j +12 -0
- data/rouge-5.0.0/lib/rouge/demos/janet +3 -0
- data/rouge-5.0.0/lib/rouge/demos/java +5 -0
- data/rouge-5.0.0/lib/rouge/demos/javascript +1 -0
- data/rouge-5.0.0/lib/rouge/demos/jinja +9 -0
- data/rouge-5.0.0/lib/rouge/demos/jsl +3 -0
- data/rouge-5.0.0/lib/rouge/demos/json +1 -0
- data/rouge-5.0.0/lib/rouge/demos/json-doc +1 -0
- data/rouge-5.0.0/lib/rouge/demos/json5 +12 -0
- data/rouge-5.0.0/lib/rouge/demos/jsonnet +28 -0
- data/rouge-5.0.0/lib/rouge/demos/jsp +29 -0
- data/rouge-5.0.0/lib/rouge/demos/jsx +17 -0
- data/rouge-5.0.0/lib/rouge/demos/julia +11 -0
- data/rouge-5.0.0/lib/rouge/demos/kick_assembler +14 -0
- data/rouge-5.0.0/lib/rouge/demos/kotlin +3 -0
- data/rouge-5.0.0/lib/rouge/demos/lasso +12 -0
- data/rouge-5.0.0/lib/rouge/demos/lean +8 -0
- data/rouge-5.0.0/lib/rouge/demos/liquid +10 -0
- data/rouge-5.0.0/lib/rouge/demos/literate_coffeescript +3 -0
- data/rouge-5.0.0/lib/rouge/demos/literate_haskell +7 -0
- data/rouge-5.0.0/lib/rouge/demos/livescript +15 -0
- data/rouge-5.0.0/lib/rouge/demos/llvm +20 -0
- data/rouge-5.0.0/lib/rouge/demos/lua +12 -0
- data/rouge-5.0.0/lib/rouge/demos/lustre +6 -0
- data/rouge-5.0.0/lib/rouge/demos/lutin +18 -0
- data/rouge-5.0.0/lib/rouge/demos/m68k +16 -0
- data/rouge-5.0.0/lib/rouge/demos/magik +6 -0
- data/rouge-5.0.0/lib/rouge/demos/make +6 -0
- data/rouge-5.0.0/lib/rouge/demos/markdown +4 -0
- data/rouge-5.0.0/lib/rouge/demos/mason +22 -0
- data/rouge-5.0.0/lib/rouge/demos/mathematica +8 -0
- data/rouge-5.0.0/lib/rouge/demos/matlab +6 -0
- data/rouge-5.0.0/lib/rouge/demos/meson +10 -0
- data/rouge-5.0.0/lib/rouge/demos/minizinc +23 -0
- data/rouge-5.0.0/lib/rouge/demos/mojo +10 -0
- data/rouge-5.0.0/lib/rouge/demos/moonscript +16 -0
- data/rouge-5.0.0/lib/rouge/demos/mosel +10 -0
- data/rouge-5.0.0/lib/rouge/demos/msgtrans +4 -0
- data/rouge-5.0.0/lib/rouge/demos/mxml +22 -0
- data/rouge-5.0.0/lib/rouge/demos/nasm +26 -0
- data/rouge-5.0.0/lib/rouge/demos/nesasm +11 -0
- data/rouge-5.0.0/lib/rouge/demos/nginx +5 -0
- data/rouge-5.0.0/lib/rouge/demos/nial +35 -0
- data/rouge-5.0.0/lib/rouge/demos/nim +27 -0
- data/rouge-5.0.0/lib/rouge/demos/nix +19 -0
- data/rouge-5.0.0/lib/rouge/demos/objective_c +18 -0
- data/rouge-5.0.0/lib/rouge/demos/objective_cpp +17 -0
- data/rouge-5.0.0/lib/rouge/demos/ocaml +12 -0
- data/rouge-5.0.0/lib/rouge/demos/ocl +4 -0
- data/rouge-5.0.0/lib/rouge/demos/openedge +4 -0
- data/rouge-5.0.0/lib/rouge/demos/opentype_feature_file +5 -0
- data/rouge-5.0.0/lib/rouge/demos/p4 +99 -0
- data/rouge-5.0.0/lib/rouge/demos/pascal +14 -0
- data/rouge-5.0.0/lib/rouge/demos/pdf +29 -0
- data/rouge-5.0.0/lib/rouge/demos/perl +5 -0
- data/rouge-5.0.0/lib/rouge/demos/php +3 -0
- data/rouge-5.0.0/lib/rouge/demos/plaintext +1 -0
- data/rouge-5.0.0/lib/rouge/demos/plist +11 -0
- data/rouge-5.0.0/lib/rouge/demos/plsql +2 -0
- data/rouge-5.0.0/lib/rouge/demos/pony +17 -0
- data/rouge-5.0.0/lib/rouge/demos/postscript +9 -0
- data/rouge-5.0.0/lib/rouge/demos/powershell +13 -0
- data/rouge-5.0.0/lib/rouge/demos/praat +26 -0
- data/rouge-5.0.0/lib/rouge/demos/prolog +9 -0
- data/rouge-5.0.0/lib/rouge/demos/prometheus +9 -0
- data/rouge-5.0.0/lib/rouge/demos/properties +7 -0
- data/rouge-5.0.0/lib/rouge/demos/protobuf +5 -0
- data/rouge-5.0.0/lib/rouge/demos/puppet +6 -0
- data/rouge-5.0.0/lib/rouge/demos/python +6 -0
- data/rouge-5.0.0/lib/rouge/demos/q +8 -0
- data/rouge-5.0.0/lib/rouge/demos/qml +9 -0
- data/rouge-5.0.0/lib/rouge/demos/r +8 -0
- data/rouge-5.0.0/lib/rouge/demos/racket +24 -0
- data/rouge-5.0.0/lib/rouge/demos/reasonml +12 -0
- data/rouge-5.0.0/lib/rouge/demos/rego +8 -0
- data/rouge-5.0.0/lib/rouge/demos/rescript +26 -0
- data/rouge-5.0.0/lib/rouge/demos/rml +33 -0
- data/rouge-5.0.0/lib/rouge/demos/robot_framework +27 -0
- data/rouge-5.0.0/lib/rouge/demos/rocq +16 -0
- data/rouge-5.0.0/lib/rouge/demos/ruby +9 -0
- data/rouge-5.0.0/lib/rouge/demos/rust +12 -0
- data/rouge-5.0.0/lib/rouge/demos/sas +13 -0
- data/rouge-5.0.0/lib/rouge/demos/sass +3 -0
- data/rouge-5.0.0/lib/rouge/demos/scala +3 -0
- data/rouge-5.0.0/lib/rouge/demos/scheme +4 -0
- data/rouge-5.0.0/lib/rouge/demos/scss +5 -0
- data/rouge-5.0.0/lib/rouge/demos/sed +4 -0
- data/rouge-5.0.0/lib/rouge/demos/shell +2 -0
- data/rouge-5.0.0/lib/rouge/demos/sieve +10 -0
- data/rouge-5.0.0/lib/rouge/demos/slice +10 -0
- data/rouge-5.0.0/lib/rouge/demos/slim +17 -0
- data/rouge-5.0.0/lib/rouge/demos/smalltalk +6 -0
- data/rouge-5.0.0/lib/rouge/demos/smarty +11 -0
- data/rouge-5.0.0/lib/rouge/demos/sml +4 -0
- data/rouge-5.0.0/lib/rouge/demos/sparql +6 -0
- data/rouge-5.0.0/lib/rouge/demos/sqf +14 -0
- data/rouge-5.0.0/lib/rouge/demos/sql +1 -0
- data/rouge-5.0.0/lib/rouge/demos/ssh +4 -0
- data/rouge-5.0.0/lib/rouge/demos/stan +13 -0
- data/rouge-5.0.0/lib/rouge/demos/stata +14 -0
- data/rouge-5.0.0/lib/rouge/demos/supercollider +11 -0
- data/rouge-5.0.0/lib/rouge/demos/svelte +29 -0
- data/rouge-5.0.0/lib/rouge/demos/swift +5 -0
- data/rouge-5.0.0/lib/rouge/demos/systemd +4 -0
- data/rouge-5.0.0/lib/rouge/demos/syzlang +15 -0
- data/rouge-5.0.0/lib/rouge/demos/syzprog +8 -0
- data/rouge-5.0.0/lib/rouge/demos/tap +5 -0
- data/rouge-5.0.0/lib/rouge/demos/tcl +1 -0
- data/rouge-5.0.0/lib/rouge/demos/terraform +16 -0
- data/rouge-5.0.0/lib/rouge/demos/tex +1 -0
- data/rouge-5.0.0/lib/rouge/demos/thrift +15 -0
- data/rouge-5.0.0/lib/rouge/demos/toml +9 -0
- data/rouge-5.0.0/lib/rouge/demos/tsx +17 -0
- data/rouge-5.0.0/lib/rouge/demos/ttcn3 +6 -0
- data/rouge-5.0.0/lib/rouge/demos/tulip +13 -0
- data/rouge-5.0.0/lib/rouge/demos/turtle +26 -0
- data/rouge-5.0.0/lib/rouge/demos/twig +9 -0
- data/rouge-5.0.0/lib/rouge/demos/typescript +1 -0
- data/rouge-5.0.0/lib/rouge/demos/vala +8 -0
- data/rouge-5.0.0/lib/rouge/demos/vb +4 -0
- data/rouge-5.0.0/lib/rouge/demos/vcl +12 -0
- data/rouge-5.0.0/lib/rouge/demos/velocity +9 -0
- data/rouge-5.0.0/lib/rouge/demos/verilog +27 -0
- data/rouge-5.0.0/lib/rouge/demos/veryl +24 -0
- data/rouge-5.0.0/lib/rouge/demos/vhdl +23 -0
- data/rouge-5.0.0/lib/rouge/demos/viml +14 -0
- data/rouge-5.0.0/lib/rouge/demos/vue +11 -0
- data/rouge-5.0.0/lib/rouge/demos/wollok +11 -0
- data/rouge-5.0.0/lib/rouge/demos/xml +2 -0
- data/rouge-5.0.0/lib/rouge/demos/xojo +14 -0
- data/rouge-5.0.0/lib/rouge/demos/xpath +2 -0
- data/rouge-5.0.0/lib/rouge/demos/xquery +22 -0
- data/rouge-5.0.0/lib/rouge/demos/yaml +4 -0
- data/rouge-5.0.0/lib/rouge/demos/yang +17 -0
- data/rouge-5.0.0/lib/rouge/demos/zig +6 -0
- data/rouge-5.0.0/lib/rouge/eager.rb +3 -0
- data/rouge-5.0.0/lib/rouge/formatter.rb +112 -0
- data/rouge-5.0.0/lib/rouge/formatters/html.rb +64 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_debug.rb +16 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_inline.rb +30 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_legacy.rb +56 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_legacy_table.rb +57 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_line_highlighter.rb +31 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_line_table.rb +56 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_linewise.rb +31 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_pygments.rb +23 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_table.rb +77 -0
- data/rouge-5.0.0/lib/rouge/formatters/null.rb +20 -0
- data/rouge-5.0.0/lib/rouge/formatters/terminal256.rb +198 -0
- data/rouge-5.0.0/lib/rouge/formatters/terminal_truecolor.rb +37 -0
- data/rouge-5.0.0/lib/rouge/formatters/tex.rb +92 -0
- data/rouge-5.0.0/lib/rouge/guesser.rb +57 -0
- data/rouge-5.0.0/lib/rouge/guessers/disambiguation.rb +172 -0
- data/rouge-5.0.0/lib/rouge/guessers/filename.rb +27 -0
- data/rouge-5.0.0/lib/rouge/guessers/glob_mapping.rb +45 -0
- data/rouge-5.0.0/lib/rouge/guessers/mimetype.rb +16 -0
- data/rouge-5.0.0/lib/rouge/guessers/modeline.rb +46 -0
- data/rouge-5.0.0/lib/rouge/guessers/source.rb +31 -0
- data/rouge-5.0.0/lib/rouge/guessers/util.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexer.rb +556 -0
- data/rouge-5.0.0/lib/rouge/lexers/abap/builtins.rb +187 -0
- data/rouge-5.0.0/lib/rouge/lexers/abap.rb +132 -0
- data/rouge-5.0.0/lib/rouge/lexers/actionscript.rb +196 -0
- data/rouge-5.0.0/lib/rouge/lexers/ada.rb +162 -0
- data/rouge-5.0.0/lib/rouge/lexers/apache/keywords.rb +16 -0
- data/rouge-5.0.0/lib/rouge/lexers/apache.rb +84 -0
- data/rouge-5.0.0/lib/rouge/lexers/apex.rb +128 -0
- data/rouge-5.0.0/lib/rouge/lexers/apiblueprint.rb +49 -0
- data/rouge-5.0.0/lib/rouge/lexers/apple_script.rb +370 -0
- data/rouge-5.0.0/lib/rouge/lexers/armasm.rb +145 -0
- data/rouge-5.0.0/lib/rouge/lexers/augeas.rb +93 -0
- data/rouge-5.0.0/lib/rouge/lexers/awk.rb +162 -0
- data/rouge-5.0.0/lib/rouge/lexers/batchfile.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/bbcbasic.rb +112 -0
- data/rouge-5.0.0/lib/rouge/lexers/bibtex.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/bicep.rb +111 -0
- data/rouge-5.0.0/lib/rouge/lexers/biml.rb +70 -0
- data/rouge-5.0.0/lib/rouge/lexers/bpf.rb +118 -0
- data/rouge-5.0.0/lib/rouge/lexers/brainfuck.rb +54 -0
- data/rouge-5.0.0/lib/rouge/lexers/brightscript.rb +146 -0
- data/rouge-5.0.0/lib/rouge/lexers/bsl.rb +82 -0
- data/rouge-5.0.0/lib/rouge/lexers/c.rb +204 -0
- data/rouge-5.0.0/lib/rouge/lexers/ceylon.rb +96 -0
- data/rouge-5.0.0/lib/rouge/lexers/cfscript.rb +154 -0
- data/rouge-5.0.0/lib/rouge/lexers/cisco_ios.rb +83 -0
- data/rouge-5.0.0/lib/rouge/lexers/clean.rb +156 -0
- data/rouge-5.0.0/lib/rouge/lexers/clojure.rb +113 -0
- data/rouge-5.0.0/lib/rouge/lexers/cmake.rb +218 -0
- data/rouge-5.0.0/lib/rouge/lexers/cmhg.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/cobol.rb +137 -0
- data/rouge-5.0.0/lib/rouge/lexers/codeowners.rb +30 -0
- data/rouge-5.0.0/lib/rouge/lexers/coffeescript.rb +215 -0
- data/rouge-5.0.0/lib/rouge/lexers/common_lisp.rb +346 -0
- data/rouge-5.0.0/lib/rouge/lexers/conf.rb +25 -0
- data/rouge-5.0.0/lib/rouge/lexers/console.rb +196 -0
- data/rouge-5.0.0/lib/rouge/lexers/cpp.rb +102 -0
- data/rouge-5.0.0/lib/rouge/lexers/crystal.rb +435 -0
- data/rouge-5.0.0/lib/rouge/lexers/csharp.rb +118 -0
- data/rouge-5.0.0/lib/rouge/lexers/css.rb +337 -0
- data/rouge-5.0.0/lib/rouge/lexers/csvs.rb +44 -0
- data/rouge-5.0.0/lib/rouge/lexers/cuda.rb +35 -0
- data/rouge-5.0.0/lib/rouge/lexers/cypher.rb +116 -0
- data/rouge-5.0.0/lib/rouge/lexers/cython.rb +127 -0
- data/rouge-5.0.0/lib/rouge/lexers/d.rb +177 -0
- data/rouge-5.0.0/lib/rouge/lexers/dafny.rb +128 -0
- data/rouge-5.0.0/lib/rouge/lexers/dart.rb +108 -0
- data/rouge-5.0.0/lib/rouge/lexers/datastudio.rb +138 -0
- data/rouge-5.0.0/lib/rouge/lexers/diff.rb +47 -0
- data/rouge-5.0.0/lib/rouge/lexers/digdag.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/docker.rb +55 -0
- data/rouge-5.0.0/lib/rouge/lexers/dot.rb +70 -0
- data/rouge-5.0.0/lib/rouge/lexers/dylan.rb +109 -0
- data/rouge-5.0.0/lib/rouge/lexers/ecl.rb +175 -0
- data/rouge-5.0.0/lib/rouge/lexers/eex.rb +52 -0
- data/rouge-5.0.0/lib/rouge/lexers/eiffel.rb +65 -0
- data/rouge-5.0.0/lib/rouge/lexers/elixir.rb +158 -0
- data/rouge-5.0.0/lib/rouge/lexers/elm.rb +90 -0
- data/rouge-5.0.0/lib/rouge/lexers/email.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/epp.rb +51 -0
- data/rouge-5.0.0/lib/rouge/lexers/erb.rb +53 -0
- data/rouge-5.0.0/lib/rouge/lexers/erlang.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/escape.rb +58 -0
- data/rouge-5.0.0/lib/rouge/lexers/factor.rb +303 -0
- data/rouge-5.0.0/lib/rouge/lexers/fluent.rb +74 -0
- data/rouge-5.0.0/lib/rouge/lexers/fortran.rb +178 -0
- data/rouge-5.0.0/lib/rouge/lexers/freefem.rb +240 -0
- data/rouge-5.0.0/lib/rouge/lexers/fsharp.rb +120 -0
- data/rouge-5.0.0/lib/rouge/lexers/gdscript.rb +171 -0
- data/rouge-5.0.0/lib/rouge/lexers/ghc_cmm.rb +340 -0
- data/rouge-5.0.0/lib/rouge/lexers/ghc_core.rb +152 -0
- data/rouge-5.0.0/lib/rouge/lexers/gherkin/keywords.rb +23 -0
- data/rouge-5.0.0/lib/rouge/lexers/gherkin.rb +142 -0
- data/rouge-5.0.0/lib/rouge/lexers/gjs.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/glsl/builtins.rb +17 -0
- data/rouge-5.0.0/lib/rouge/lexers/glsl.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/go.rb +177 -0
- data/rouge-5.0.0/lib/rouge/lexers/gradle.rb +38 -0
- data/rouge-5.0.0/lib/rouge/lexers/graphql.rb +261 -0
- data/rouge-5.0.0/lib/rouge/lexers/groovy.rb +119 -0
- data/rouge-5.0.0/lib/rouge/lexers/gts.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/hack.rb +47 -0
- data/rouge-5.0.0/lib/rouge/lexers/haml.rb +226 -0
- data/rouge-5.0.0/lib/rouge/lexers/handlebars.rb +91 -0
- data/rouge-5.0.0/lib/rouge/lexers/haskell.rb +207 -0
- data/rouge-5.0.0/lib/rouge/lexers/haxe.rb +265 -0
- data/rouge-5.0.0/lib/rouge/lexers/hcl.rb +166 -0
- data/rouge-5.0.0/lib/rouge/lexers/hlsl.rb +166 -0
- data/rouge-5.0.0/lib/rouge/lexers/hocon.rb +86 -0
- data/rouge-5.0.0/lib/rouge/lexers/hql.rb +135 -0
- data/rouge-5.0.0/lib/rouge/lexers/html.rb +141 -0
- data/rouge-5.0.0/lib/rouge/lexers/http.rb +87 -0
- data/rouge-5.0.0/lib/rouge/lexers/hylang.rb +93 -0
- data/rouge-5.0.0/lib/rouge/lexers/idlang.rb +312 -0
- data/rouge-5.0.0/lib/rouge/lexers/idris.rb +210 -0
- data/rouge-5.0.0/lib/rouge/lexers/iecst.rb +92 -0
- data/rouge-5.0.0/lib/rouge/lexers/igorpro/builtins.rb +1530 -0
- data/rouge-5.0.0/lib/rouge/lexers/igorpro.rb +193 -0
- data/rouge-5.0.0/lib/rouge/lexers/ini.rb +56 -0
- data/rouge-5.0.0/lib/rouge/lexers/io.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/irb.rb +73 -0
- data/rouge-5.0.0/lib/rouge/lexers/isabelle.rb +251 -0
- data/rouge-5.0.0/lib/rouge/lexers/isbl.rb +61 -0
- data/rouge-5.0.0/lib/rouge/lexers/j.rb +244 -0
- data/rouge-5.0.0/lib/rouge/lexers/janet.rb +218 -0
- data/rouge-5.0.0/lib/rouge/lexers/java.rb +92 -0
- data/rouge-5.0.0/lib/rouge/lexers/javascript.rb +315 -0
- data/rouge-5.0.0/lib/rouge/lexers/jinja.rb +169 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsl.rb +66 -0
- data/rouge-5.0.0/lib/rouge/lexers/json.rb +72 -0
- data/rouge-5.0.0/lib/rouge/lexers/json5.rb +74 -0
- data/rouge-5.0.0/lib/rouge/lexers/json_doc.rb +26 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsonnet.rb +153 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsp.rb +119 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsx.rb +91 -0
- data/rouge-5.0.0/lib/rouge/lexers/julia.rb +293 -0
- data/rouge-5.0.0/lib/rouge/lexers/kick_assembler.rb +100 -0
- data/rouge-5.0.0/lib/rouge/lexers/kotlin.rb +150 -0
- data/rouge-5.0.0/lib/rouge/lexers/lasso/keywords.rb +20 -0
- data/rouge-5.0.0/lib/rouge/lexers/lasso.rb +212 -0
- data/rouge-5.0.0/lib/rouge/lexers/lean.rb +164 -0
- data/rouge-5.0.0/lib/rouge/lexers/liquid.rb +284 -0
- data/rouge-5.0.0/lib/rouge/lexers/literate_coffeescript.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/literate_haskell.rb +37 -0
- data/rouge-5.0.0/lib/rouge/lexers/livescript.rb +310 -0
- data/rouge-5.0.0/lib/rouge/lexers/llvm/keywords.rb +16 -0
- data/rouge-5.0.0/lib/rouge/lexers/llvm.rb +59 -0
- data/rouge-5.0.0/lib/rouge/lexers/lua/keywords.rb +26 -0
- data/rouge-5.0.0/lib/rouge/lexers/lua.rb +186 -0
- data/rouge-5.0.0/lib/rouge/lexers/lustre.rb +79 -0
- data/rouge-5.0.0/lib/rouge/lexers/lutin.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/m68k.rb +143 -0
- data/rouge-5.0.0/lib/rouge/lexers/magik.rb +127 -0
- data/rouge-5.0.0/lib/rouge/lexers/make.rb +148 -0
- data/rouge-5.0.0/lib/rouge/lexers/markdown.rb +183 -0
- data/rouge-5.0.0/lib/rouge/lexers/mason.rb +110 -0
- data/rouge-5.0.0/lib/rouge/lexers/mathematica/keywords.rb +15 -0
- data/rouge-5.0.0/lib/rouge/lexers/mathematica.rb +95 -0
- data/rouge-5.0.0/lib/rouge/lexers/matlab/keywords.rb +15 -0
- data/rouge-5.0.0/lib/rouge/lexers/matlab.rb +81 -0
- data/rouge-5.0.0/lib/rouge/lexers/meson.rb +158 -0
- data/rouge-5.0.0/lib/rouge/lexers/minizinc.rb +87 -0
- data/rouge-5.0.0/lib/rouge/lexers/mojo.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/moonscript.rb +117 -0
- data/rouge-5.0.0/lib/rouge/lexers/mosel.rb +228 -0
- data/rouge-5.0.0/lib/rouge/lexers/msgtrans.rb +26 -0
- data/rouge-5.0.0/lib/rouge/lexers/mxml.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/nasm.rb +73 -0
- data/rouge-5.0.0/lib/rouge/lexers/nesasm.rb +78 -0
- data/rouge-5.0.0/lib/rouge/lexers/nginx.rb +73 -0
- data/rouge-5.0.0/lib/rouge/lexers/nial.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/nim.rb +154 -0
- data/rouge-5.0.0/lib/rouge/lexers/nix.rb +213 -0
- data/rouge-5.0.0/lib/rouge/lexers/objective_c/common.rb +182 -0
- data/rouge-5.0.0/lib/rouge/lexers/objective_c.rb +21 -0
- data/rouge-5.0.0/lib/rouge/lexers/objective_cpp.rb +32 -0
- data/rouge-5.0.0/lib/rouge/lexers/ocaml/common.rb +53 -0
- data/rouge-5.0.0/lib/rouge/lexers/ocaml.rb +65 -0
- data/rouge-5.0.0/lib/rouge/lexers/ocl.rb +84 -0
- data/rouge-5.0.0/lib/rouge/lexers/openedge.rb +632 -0
- data/rouge-5.0.0/lib/rouge/lexers/opentype_feature_file.rb +97 -0
- data/rouge-5.0.0/lib/rouge/lexers/p4.rb +81 -0
- data/rouge-5.0.0/lib/rouge/lexers/pascal.rb +68 -0
- data/rouge-5.0.0/lib/rouge/lexers/pdf.rb +109 -0
- data/rouge-5.0.0/lib/rouge/lexers/perl.rb +251 -0
- data/rouge-5.0.0/lib/rouge/lexers/php/keywords.rb +150 -0
- data/rouge-5.0.0/lib/rouge/lexers/php.rb +470 -0
- data/rouge-5.0.0/lib/rouge/lexers/plain_text.rb +27 -0
- data/rouge-5.0.0/lib/rouge/lexers/plist.rb +47 -0
- data/rouge-5.0.0/lib/rouge/lexers/plsql.rb +577 -0
- data/rouge-5.0.0/lib/rouge/lexers/pony.rb +94 -0
- data/rouge-5.0.0/lib/rouge/lexers/postscript.rb +93 -0
- data/rouge-5.0.0/lib/rouge/lexers/powershell.rb +248 -0
- data/rouge-5.0.0/lib/rouge/lexers/praat.rb +438 -0
- data/rouge-5.0.0/lib/rouge/lexers/prolog.rb +67 -0
- data/rouge-5.0.0/lib/rouge/lexers/prometheus.rb +122 -0
- data/rouge-5.0.0/lib/rouge/lexers/properties.rb +52 -0
- data/rouge-5.0.0/lib/rouge/lexers/protobuf.rb +71 -0
- data/rouge-5.0.0/lib/rouge/lexers/puppet.rb +129 -0
- data/rouge-5.0.0/lib/rouge/lexers/python.rb +340 -0
- data/rouge-5.0.0/lib/rouge/lexers/q.rb +125 -0
- data/rouge-5.0.0/lib/rouge/lexers/qml.rb +74 -0
- data/rouge-5.0.0/lib/rouge/lexers/r.rb +89 -0
- data/rouge-5.0.0/lib/rouge/lexers/racket.rb +568 -0
- data/rouge-5.0.0/lib/rouge/lexers/reasonml.rb +66 -0
- data/rouge-5.0.0/lib/rouge/lexers/rego.rb +60 -0
- data/rouge-5.0.0/lib/rouge/lexers/rescript.rb +119 -0
- data/rouge-5.0.0/lib/rouge/lexers/rml.rb +142 -0
- data/rouge-5.0.0/lib/rouge/lexers/robot_framework.rb +249 -0
- data/rouge-5.0.0/lib/rouge/lexers/rocq.rb +264 -0
- data/rouge-5.0.0/lib/rouge/lexers/ruby.rb +481 -0
- data/rouge-5.0.0/lib/rouge/lexers/rust.rb +261 -0
- data/rouge-5.0.0/lib/rouge/lexers/sas.rb +562 -0
- data/rouge-5.0.0/lib/rouge/lexers/sass/common.rb +182 -0
- data/rouge-5.0.0/lib/rouge/lexers/sass.rb +75 -0
- data/rouge-5.0.0/lib/rouge/lexers/scala.rb +172 -0
- data/rouge-5.0.0/lib/rouge/lexers/scheme.rb +113 -0
- data/rouge-5.0.0/lib/rouge/lexers/scss.rb +35 -0
- data/rouge-5.0.0/lib/rouge/lexers/sed.rb +173 -0
- data/rouge-5.0.0/lib/rouge/lexers/shell.rb +205 -0
- data/rouge-5.0.0/lib/rouge/lexers/sieve.rb +97 -0
- data/rouge-5.0.0/lib/rouge/lexers/slice.rb +32 -0
- data/rouge-5.0.0/lib/rouge/lexers/slim.rb +229 -0
- data/rouge-5.0.0/lib/rouge/lexers/smalltalk.rb +117 -0
- data/rouge-5.0.0/lib/rouge/lexers/smarty.rb +81 -0
- data/rouge-5.0.0/lib/rouge/lexers/sml.rb +345 -0
- data/rouge-5.0.0/lib/rouge/lexers/sparql.rb +131 -0
- data/rouge-5.0.0/lib/rouge/lexers/sqf/keywords.rb +14 -0
- data/rouge-5.0.0/lib/rouge/lexers/sqf.rb +108 -0
- data/rouge-5.0.0/lib/rouge/lexers/sql.rb +161 -0
- data/rouge-5.0.0/lib/rouge/lexers/ssh.rb +33 -0
- data/rouge-5.0.0/lib/rouge/lexers/stan.rb +445 -0
- data/rouge-5.0.0/lib/rouge/lexers/stata.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/supercollider.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/svelte.rb +91 -0
- data/rouge-5.0.0/lib/rouge/lexers/swift.rb +202 -0
- data/rouge-5.0.0/lib/rouge/lexers/systemd.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/syzlang.rb +316 -0
- data/rouge-5.0.0/lib/rouge/lexers/syzprog.rb +122 -0
- data/rouge-5.0.0/lib/rouge/lexers/tap.rb +88 -0
- data/rouge-5.0.0/lib/rouge/lexers/tcl.rb +198 -0
- data/rouge-5.0.0/lib/rouge/lexers/terraform.rb +121 -0
- data/rouge-5.0.0/lib/rouge/lexers/tex.rb +70 -0
- data/rouge-5.0.0/lib/rouge/lexers/thrift.rb +120 -0
- data/rouge-5.0.0/lib/rouge/lexers/toml.rb +124 -0
- data/rouge-5.0.0/lib/rouge/lexers/tsx.rb +33 -0
- data/rouge-5.0.0/lib/rouge/lexers/ttcn3.rb +117 -0
- data/rouge-5.0.0/lib/rouge/lexers/tulip.rb +107 -0
- data/rouge-5.0.0/lib/rouge/lexers/turtle.rb +61 -0
- data/rouge-5.0.0/lib/rouge/lexers/twig.rb +40 -0
- data/rouge-5.0.0/lib/rouge/lexers/typescript/common.rb +60 -0
- data/rouge-5.0.0/lib/rouge/lexers/typescript.rb +23 -0
- data/rouge-5.0.0/lib/rouge/lexers/vala.rb +78 -0
- data/rouge-5.0.0/lib/rouge/lexers/varnish.rb +168 -0
- data/rouge-5.0.0/lib/rouge/lexers/vb.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/velocity.rb +71 -0
- data/rouge-5.0.0/lib/rouge/lexers/verilog.rb +163 -0
- data/rouge-5.0.0/lib/rouge/lexers/veryl.rb +109 -0
- data/rouge-5.0.0/lib/rouge/lexers/vhdl.rb +98 -0
- data/rouge-5.0.0/lib/rouge/lexers/viml/keywords.rb +19 -0
- data/rouge-5.0.0/lib/rouge/lexers/viml.rb +68 -0
- data/rouge-5.0.0/lib/rouge/lexers/vue.rb +127 -0
- data/rouge-5.0.0/lib/rouge/lexers/wollok.rb +107 -0
- data/rouge-5.0.0/lib/rouge/lexers/xml.rb +56 -0
- data/rouge-5.0.0/lib/rouge/lexers/xojo.rb +61 -0
- data/rouge-5.0.0/lib/rouge/lexers/xpath.rb +332 -0
- data/rouge-5.0.0/lib/rouge/lexers/xquery.rb +146 -0
- data/rouge-5.0.0/lib/rouge/lexers/yaml.rb +388 -0
- data/rouge-5.0.0/lib/rouge/lexers/yang.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/zig.rb +139 -0
- data/rouge-5.0.0/lib/rouge/plugins/redcarpet.rb +38 -0
- data/rouge-5.0.0/lib/rouge/regex_lexer.rb +522 -0
- data/rouge-5.0.0/lib/rouge/template_lexer.rb +21 -0
- data/rouge-5.0.0/lib/rouge/tex_theme_renderer.rb +132 -0
- data/rouge-5.0.0/lib/rouge/text_analyzer.rb +50 -0
- data/rouge-5.0.0/lib/rouge/theme.rb +218 -0
- data/rouge-5.0.0/lib/rouge/themes/base16.rb +137 -0
- data/rouge-5.0.0/lib/rouge/themes/bw.rb +43 -0
- data/rouge-5.0.0/lib/rouge/themes/colorful.rb +70 -0
- data/rouge-5.0.0/lib/rouge/themes/github.rb +149 -0
- data/rouge-5.0.0/lib/rouge/themes/gruvbox.rb +176 -0
- data/rouge-5.0.0/lib/rouge/themes/igor_pro.rb +25 -0
- data/rouge-5.0.0/lib/rouge/themes/magritte.rb +80 -0
- data/rouge-5.0.0/lib/rouge/themes/molokai.rb +84 -0
- data/rouge-5.0.0/lib/rouge/themes/monokai.rb +95 -0
- data/rouge-5.0.0/lib/rouge/themes/monokai_sublime.rb +94 -0
- data/rouge-5.0.0/lib/rouge/themes/pastie.rb +72 -0
- data/rouge-5.0.0/lib/rouge/themes/thankful_eyes.rb +77 -0
- data/rouge-5.0.0/lib/rouge/themes/tulip.rb +72 -0
- data/rouge-5.0.0/lib/rouge/token.rb +192 -0
- data/rouge-5.0.0/lib/rouge/util.rb +102 -0
- data/rouge-5.0.0/lib/rouge/version.rb +8 -0
- data/rouge-5.0.0/lib/rouge.rb +117 -0
- data/rouge-5.0.0/lib/rubocop/cop/rouge/no_building_alternation_pattern_in_regexp.rb +71 -0
- data/rouge-5.0.0/lib/rubocop/cop/rouge/no_huge_collections.rb +37 -0
- data/rouge-5.0.0/rouge.gemspec +29 -0
- metadata +579 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Rouge
|
|
5
|
+
module Lexers
|
|
6
|
+
class CSS < RegexLexer
|
|
7
|
+
title "CSS"
|
|
8
|
+
desc "Cascading Style Sheets, used to style web pages"
|
|
9
|
+
|
|
10
|
+
tag 'css'
|
|
11
|
+
filenames '*.css'
|
|
12
|
+
mimetypes 'text/css'
|
|
13
|
+
|
|
14
|
+
# Documentation: https://www.w3.org/TR/CSS21/syndata.html#characters
|
|
15
|
+
|
|
16
|
+
# [jneen] workaround for:
|
|
17
|
+
# https://bugs.ruby-lang.org/issues/21870#change-116371
|
|
18
|
+
#
|
|
19
|
+
# As of ruby 4+, \p{Word} matches ZWJ and ZWNJ, so the additional
|
|
20
|
+
# \p{Cf} is not needed.
|
|
21
|
+
#
|
|
22
|
+
# That being said... this still warns, but at least it's only once?
|
|
23
|
+
identifier = if RUBY_VERSION < '4'
|
|
24
|
+
/[\p{L}_-][\p{Word}\p{Cf}-]*/
|
|
25
|
+
else
|
|
26
|
+
/[\p{L}_-][\p{Word}-]*/
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
number = /-?(?:[0-9]+(\.[0-9]+)?|\.[0-9]+)/
|
|
30
|
+
|
|
31
|
+
def self.properties
|
|
32
|
+
@properties ||= Set.new %w(
|
|
33
|
+
additive-symbols align-content align-items align-self
|
|
34
|
+
alignment-adjust alignment-baseline all anchor-point animation
|
|
35
|
+
animation-composition animation-delay animation-direction
|
|
36
|
+
animation-duration animation-fill-mode animation-iteration-count
|
|
37
|
+
animation-name animation-play-state animation-timing-function
|
|
38
|
+
appearance aspect-ratio azimuth backface-visibility background
|
|
39
|
+
background-attachment background-blend-mode
|
|
40
|
+
background-clip background-color background-image
|
|
41
|
+
background-origin background-position
|
|
42
|
+
background-repeat background-size baseline-shift
|
|
43
|
+
binding bleed bookmark-label bookmark-level bookmark-state
|
|
44
|
+
bookmark-target border border-bottom border-bottom-color
|
|
45
|
+
border-bottom-left-radius border-bottom-right-radius
|
|
46
|
+
border-bottom-style border-bottom-width border-collapse
|
|
47
|
+
border-color border-image border-image-outset border-image-repeat
|
|
48
|
+
border-image-slice border-image-source border-image-width
|
|
49
|
+
border-left border-left-color border-left-style border-left-width
|
|
50
|
+
border-radius border-right border-right-color border-right-style
|
|
51
|
+
border-right-width border-spacing border-style border-top
|
|
52
|
+
border-top-color border-top-left-radius border-top-right-radius
|
|
53
|
+
border-top-style border-top-width border-width bottom box-align
|
|
54
|
+
box-decoration-break box-direction box-flex box-flex-group
|
|
55
|
+
box-lines box-ordinal-group box-orient box-pack box-shadow
|
|
56
|
+
box-sizing break-after break-before break-inside caption-side
|
|
57
|
+
clear clip clip-path clip-rule color color-profile column-count
|
|
58
|
+
column-fill column-gap column-rule column-rule-color
|
|
59
|
+
column-rule-style column-rule-width column-span column-width
|
|
60
|
+
columns content container container-name container-type
|
|
61
|
+
counter-increment counter-reset counter-set crop cue
|
|
62
|
+
cue-after cue-before cursor direction display dominant-baseline
|
|
63
|
+
drop-initial-after-adjust drop-initial-after-align
|
|
64
|
+
drop-initial-before-adjust drop-initial-before-align
|
|
65
|
+
drop-initial-size drop-initial-value elevation empty-cells fallback
|
|
66
|
+
filter fit fit-position flex flex-basis flex-direction flex-flow
|
|
67
|
+
flex-grow flex-shrink flex-wrap float float-offset font
|
|
68
|
+
font-display font-family font-feature-settings font-kerning
|
|
69
|
+
font-language-override font-size font-size-adjust font-stretch
|
|
70
|
+
font-style font-synthesis font-variant font-variant-alternates
|
|
71
|
+
font-variant-caps font-variant-east-asian font-variant-ligatures
|
|
72
|
+
font-variant-numeric font-variant-position font-weight gap
|
|
73
|
+
grid-area grid-auto-columns grid-auto-flow grid-auto-rows
|
|
74
|
+
grid-column grid-column-end grid-column-start grid-row
|
|
75
|
+
grid-row-end grid-row-start grid-template grid-template-areas
|
|
76
|
+
grid-template-columns grid-template-rows hanging-punctuation
|
|
77
|
+
height hyphenate-after hyphenate-before hyphenate-character
|
|
78
|
+
hyphenate-lines hyphenate-resource hyphens icon image-orientation
|
|
79
|
+
image-rendering image-resolution ime-mode inherits initial-value
|
|
80
|
+
inline-box-align inset isolation justify-content justify-items
|
|
81
|
+
justify-self left letter-spacing line-break line-height
|
|
82
|
+
line-stacking line-stacking-ruby line-stacking-shift
|
|
83
|
+
line-stacking-strategy list-style list-style-image
|
|
84
|
+
list-style-position list-style-type margin margin-bottom
|
|
85
|
+
margin-left margin-right margin-top mark mark-after mark-before
|
|
86
|
+
marker-offset marks marquee-direction marquee-loop
|
|
87
|
+
marquee-play-count marquee-speed marquee-style
|
|
88
|
+
mask mask-clip mask-composite mask-image mask-mode
|
|
89
|
+
mask-origin mask-position mask-repeat mask-size mask-type
|
|
90
|
+
max-height max-width min-height min-width mix-blend-mode
|
|
91
|
+
move-to nav-down nav-index nav-left nav-right nav-up negative
|
|
92
|
+
object-fit object-position offset offset-anchor offset-distance
|
|
93
|
+
offset-path offset-position offset-rotate opacity order orphans
|
|
94
|
+
outline outline-color outline-offset outline-style outline-width
|
|
95
|
+
overflow overflow-style overflow-wrap overflow-x overflow-y pad
|
|
96
|
+
padding padding-bottom padding-left padding-right padding-top page
|
|
97
|
+
page-break-after page-break-before page-break-inside page-policy
|
|
98
|
+
pause pause-after pause-before perspective perspective-origin
|
|
99
|
+
phonemes pitch pitch-range place-content place-items place-self
|
|
100
|
+
play-during pointer-events position prefix presentation-level
|
|
101
|
+
punctuation-trim quotes range rendering-intent resize rest
|
|
102
|
+
rest-after rest-before richness right rotate rotation rotation-point
|
|
103
|
+
row-gap ruby-align ruby-overhang ruby-position ruby-span scale
|
|
104
|
+
scroll-behavior scroll-margin scroll-margin-block
|
|
105
|
+
scroll-margin-block-end scroll-margin-block-start
|
|
106
|
+
scroll-margin-bottom scroll-margin-inline scroll-margin-inline-end
|
|
107
|
+
scroll-margin-inline-start scroll-margin-left scroll-margin-right
|
|
108
|
+
scroll-margin-top scroll-padding-top scroll-padding-right
|
|
109
|
+
scroll-padding-bottom scroll-padding-left scroll-padding
|
|
110
|
+
scroll-padding-block-end scroll-padding-block-start
|
|
111
|
+
scroll-padding-block scroll-padding-inline-end
|
|
112
|
+
scroll-padding-inline-start scroll-padding-inline
|
|
113
|
+
scroll-snap-type scroll-snap-align scroll-snap-stop
|
|
114
|
+
shape-outside shape-margin shape-image-threshold shape-rendering
|
|
115
|
+
size speak speak-as speak-header speak-numeral speak-punctuation
|
|
116
|
+
speech-rate src stress string-set suffix symbols syntax system
|
|
117
|
+
tab-size table-layout target target-name target-new target-position
|
|
118
|
+
text-align text-align-last text-combine-horizontal
|
|
119
|
+
text-decoration text-decoration-color text-decoration-line
|
|
120
|
+
text-decoration-skip text-decoration-style text-emphasis
|
|
121
|
+
text-emphasis-color text-emphasis-position text-emphasis-style
|
|
122
|
+
text-height text-indent text-justify text-orientation
|
|
123
|
+
text-outline text-overflow text-rendering text-shadow
|
|
124
|
+
text-space-collapse text-transform text-underline-position
|
|
125
|
+
text-wrap top transform transform-origin transform-style
|
|
126
|
+
transition transition-delay transition-duration
|
|
127
|
+
transition-property transition-timing-function translate
|
|
128
|
+
unicode-bidi vertical-align visibility voice-balance
|
|
129
|
+
voice-duration voice-family voice-pitch voice-pitch-range
|
|
130
|
+
voice-range voice-rate voice-stress voice-volume volume
|
|
131
|
+
white-space widows width word-break word-spacing word-wrap
|
|
132
|
+
writing-mode z-index
|
|
133
|
+
)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def self.builtins
|
|
137
|
+
@builtins ||= Set.new %w(
|
|
138
|
+
above absolute accumulate add additive all alpha alphabetic
|
|
139
|
+
alternate alternate-reverse always armenian aural auto auto-fill
|
|
140
|
+
auto-fit avoid backwards balance baseline behind below bidi-override
|
|
141
|
+
blink block bold bolder border-box both bottom break-spaces
|
|
142
|
+
capitalize center center-left center-right circle cjk-ideographic
|
|
143
|
+
close-quote closest-corner closest-side collapse
|
|
144
|
+
color color-burn color-dodge column column-reverse
|
|
145
|
+
condensed contain content content-box continuous cover crop cross
|
|
146
|
+
crosshair cursive cyclic darken dashed decimal decimal-leading-zero
|
|
147
|
+
default difference digits disc dotted double e-resize
|
|
148
|
+
ease ease-in ease-in-out ease-out embed end exclude exclusion
|
|
149
|
+
expanded extends extra-condensed extra-expanded fantasy
|
|
150
|
+
farthest-corner farthest-side far-left far-right
|
|
151
|
+
fast faster fill fixed flat flex flex-end flex-start
|
|
152
|
+
forwards georgian grid groove hard-light hebrew help hidden
|
|
153
|
+
hide high higher hiragana hiragana-iroha horizontal hue icon
|
|
154
|
+
infinite inherit inline inline-block inline-flex inline-grid
|
|
155
|
+
inline-size inline-table inset inside intersect isolate italic
|
|
156
|
+
justify katakana katakana-iroha landscape large larger left
|
|
157
|
+
left-side leftwards level lighten lighter line-through linear
|
|
158
|
+
list-item loud low lower lower-alpha lower-greek lower-roman
|
|
159
|
+
lowercase ltr luminance luminosity mandatory match-source medium
|
|
160
|
+
message-box middle mix monospace multiply n-resize narrower
|
|
161
|
+
ne-resize no-close-quote no-open-quote no-repeat none normal
|
|
162
|
+
nowrap numeric nw-resize oblique once open-quote outset outside
|
|
163
|
+
overlay overline paused pointer portrait pre preserve-3d pre-line
|
|
164
|
+
pre-wrap proximity px relative repeat-x repeat-y replace reverse
|
|
165
|
+
ridge right right-side rightwards row row-reverse rtl running
|
|
166
|
+
s-resize sans-serif saturation scale-down screen scroll
|
|
167
|
+
se-resize semi-condensed semi-expanded separate serif show
|
|
168
|
+
sides silent size slow slower small-caps small-caption smaller
|
|
169
|
+
smooth soft soft-light solid space-around space-between
|
|
170
|
+
space-evenly span spell-out square start static status-bar sticky
|
|
171
|
+
stretch sub subtract super sw-resize swap symbolic table
|
|
172
|
+
table-caption table-cell table-column table-column-group
|
|
173
|
+
table-footer-group table-header-group table-row table-row-group
|
|
174
|
+
text text-bottom text-top thick thin top transparent
|
|
175
|
+
ultra-condensed ultra-expanded underline upper-alpha upper-latin
|
|
176
|
+
upper-roman uppercase vertical visible w-resize wait wider wrap
|
|
177
|
+
wrap-reverse x x-fast x-high x-large x-loud x-low x-small x-soft
|
|
178
|
+
xx-large xx-small yes y z
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
def self.colors
|
|
183
|
+
@colors ||= Set.new %w(
|
|
184
|
+
aliceblue antiquewhite aqua aquamarine azure beige bisque black
|
|
185
|
+
blanchedalmond blue blueviolet brown burlywood cadetblue
|
|
186
|
+
chartreuse chocolate coral cornflowerblue cornsilk crimson cyan
|
|
187
|
+
darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki
|
|
188
|
+
darkmagenta darkolivegreen darkorange darkorchid darkred
|
|
189
|
+
darksalmon darkseagreen darkslateblue darkslategray darkturquoise
|
|
190
|
+
darkviolet deeppink deepskyblue dimgray dodgerblue firebrick
|
|
191
|
+
floralwhite forestgreen fuchsia gainsboro ghostwhite gold
|
|
192
|
+
goldenrod gray green greenyellow honeydew hotpink indianred
|
|
193
|
+
indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon
|
|
194
|
+
lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen
|
|
195
|
+
lightgrey lightpink lightsalmon lightseagreen lightskyblue
|
|
196
|
+
lightslategray lightsteelblue lightyellow lime limegreen linen
|
|
197
|
+
magenta maroon mediumaquamarine mediumblue mediumorchid
|
|
198
|
+
mediumpurple mediumseagreen mediumslateblue mediumspringgreen
|
|
199
|
+
mediumturquoise mediumvioletred midnightblue mintcream mistyrose
|
|
200
|
+
moccasin navajowhite navy oldlace olive olivedrab orange
|
|
201
|
+
orangered orchid palegoldenrod palegreen paleturquoise
|
|
202
|
+
palevioletred papayawhip peachpuff peru pink plum powderblue
|
|
203
|
+
purple red rosybrown royalblue saddlebrown salmon sandybrown
|
|
204
|
+
seagreen seashell sienna silver skyblue slateblue slategray snow
|
|
205
|
+
springgreen steelblue tan teal thistle tomato
|
|
206
|
+
turquoise violet wheat white whitesmoke yellow yellowgreen
|
|
207
|
+
rebeccapurple
|
|
208
|
+
)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
def self.functions
|
|
212
|
+
@functions ||= Set.new %w(
|
|
213
|
+
abs acos annotation asin atan atan2 attr blur brightness calc
|
|
214
|
+
character-variant circle clamp color color-mix conic-gradient
|
|
215
|
+
contrast cos counter counters cubic-bezier drop-shadow ellipse
|
|
216
|
+
env exp fit-content format grayscale hsl hsla hue-rotate hwb hypot
|
|
217
|
+
image-set inset invert lab lch linear linear-gradient log matrix
|
|
218
|
+
matrix3d max min minmax mod oklab oklch opacity ornaments path
|
|
219
|
+
perspective polygon pow radial-gradient ray rect rem repeat
|
|
220
|
+
repeating-conic-gradient repeating-linear-gradient
|
|
221
|
+
repeating-radial-gradient rgb rgba rotate rotate3d rotatex
|
|
222
|
+
rotatey rotatez round saturate scale scale3d scalex scaley scalez
|
|
223
|
+
sepia sign sin skewx skewy sqrt steps styleset
|
|
224
|
+
stylistic swash tan translate translate3d translatex translatey
|
|
225
|
+
translatez url var xywh
|
|
226
|
+
)
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# source: http://www.w3.org/TR/CSS21/syndata.html#vendor-keyword-history
|
|
230
|
+
def self.vendor_prefixes
|
|
231
|
+
@vendor_prefixes ||= Set.new %w(
|
|
232
|
+
-ah- -atsc- -hp- -khtml- -moz- -ms- -o- -rim- -ro- -tc- -wap-
|
|
233
|
+
-webkit- -xv- mso- prince-
|
|
234
|
+
)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
state :root do
|
|
238
|
+
mixin :basics
|
|
239
|
+
rule %r/{/, Punctuation, :stanza
|
|
240
|
+
rule %r/:[:]?#{identifier}/, Name::Decorator
|
|
241
|
+
rule %r/\.#{identifier}/, Name::Class
|
|
242
|
+
rule %r/##{identifier}/, Name::Function
|
|
243
|
+
rule %r/@#{identifier}/, Keyword, :at_rule
|
|
244
|
+
rule identifier, Name::Tag
|
|
245
|
+
rule %r([~^*!%&\[\]()<>|+=@:;,./?-]), Operator
|
|
246
|
+
rule %r/"(\\\\|\\"|[^"])*"/, Str::Single
|
|
247
|
+
rule %r/'(\\\\|\\'|[^'])*'/, Str::Double
|
|
248
|
+
rule %r/[0-9]{1,3}\%/, Num
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
state :value do
|
|
252
|
+
mixin :basics
|
|
253
|
+
rule %r/#[0-9a-f]{3,8}/i, Name::Other # colors
|
|
254
|
+
rule %r/#{number}(?:%|(?:px|pt|pc|in|cm|mm|Q|em|rem|ex|ch|vw|vh|vmin|vmax|fr|dpi|dpcm|dppx|deg|grad|rad|turn|s|ms|Hz|kHz)\b)?/, Num
|
|
255
|
+
rule %r/[\[\]():.,]/, Punctuation
|
|
256
|
+
rule %r/"(\\\\|\\"|[^"])*"/, Str::Single
|
|
257
|
+
rule %r/'(\\\\|\\'|[^'])*'/, Str::Double
|
|
258
|
+
rule %r/(true|false)/i, Name::Constant
|
|
259
|
+
rule %r/\-\-#{identifier}/, Literal
|
|
260
|
+
rule %r([*+/-]), Operator
|
|
261
|
+
rule %r/(url(?:-prefix)?)([(])(.*?)([)])/ do
|
|
262
|
+
groups Name::Function, Punctuation, Str::Other, Punctuation
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
rule(identifier) do |m|
|
|
266
|
+
if self.class.colors.include? m[0].downcase
|
|
267
|
+
token Name::Other
|
|
268
|
+
elsif self.class.builtins.include? m[0].downcase
|
|
269
|
+
token Name::Builtin
|
|
270
|
+
elsif self.class.functions.include? m[0].downcase
|
|
271
|
+
token Name::Function
|
|
272
|
+
else
|
|
273
|
+
token Name
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
state :at_rule do
|
|
279
|
+
rule %r/(?:<=|>=|~=|\|=|\^=|\$=|\*=|<|>|=)/, Operator
|
|
280
|
+
rule %r/{(?=\s*#{identifier}\s*:)/m, Punctuation, :at_stanza
|
|
281
|
+
rule %r/{/, Punctuation, :at_body
|
|
282
|
+
rule %r/;/, Punctuation, :pop!
|
|
283
|
+
mixin :value
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
state :at_body do
|
|
287
|
+
mixin :at_content
|
|
288
|
+
mixin :root
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
state :at_stanza do
|
|
292
|
+
mixin :at_content
|
|
293
|
+
mixin :stanza
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
state :at_content do
|
|
297
|
+
rule %r/}/ do
|
|
298
|
+
token Punctuation
|
|
299
|
+
pop! 2
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
state :basics do
|
|
304
|
+
rule %r/\s+/m, Text
|
|
305
|
+
rule %r(/\*(?:.*?)\*/)m, Comment
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
state :stanza do
|
|
309
|
+
mixin :basics
|
|
310
|
+
rule %r/}/, Punctuation, :pop!
|
|
311
|
+
rule %r/(#{identifier})(\s*)(:)/m do |m|
|
|
312
|
+
name_tok = if self.class.properties.include? m[1]
|
|
313
|
+
Name::Label
|
|
314
|
+
elsif self.class.vendor_prefixes.any? { |p| m[1].start_with?(p) }
|
|
315
|
+
Name::Label
|
|
316
|
+
else
|
|
317
|
+
Name::Property
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
groups name_tok, Text, Punctuation
|
|
321
|
+
|
|
322
|
+
push :stanza_value
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
mixin :root
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
state :stanza_value do
|
|
329
|
+
rule %r/;/, Punctuation, :pop!
|
|
330
|
+
rule(/(?=})/) { pop! }
|
|
331
|
+
rule %r/!\s*important\b/, Comment::Preproc
|
|
332
|
+
rule %r/^@.*?$/, Comment::Preproc
|
|
333
|
+
mixin :value
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Rouge
|
|
5
|
+
module Lexers
|
|
6
|
+
class CSVS < RegexLexer
|
|
7
|
+
tag 'csvs'
|
|
8
|
+
title "csvs"
|
|
9
|
+
desc 'The CSV Schema Language (digital-preservation.github.io)'
|
|
10
|
+
filenames '*.csvs'
|
|
11
|
+
|
|
12
|
+
state :root do
|
|
13
|
+
rule %r/\s+/m, Text
|
|
14
|
+
|
|
15
|
+
rule %r(//[\S\t ]*), Comment::Single
|
|
16
|
+
rule %r(/\*[^*]*\*/)m, Comment::Multiline
|
|
17
|
+
|
|
18
|
+
rule %r/(version)( )(\d+\.\d+)/ do
|
|
19
|
+
groups Keyword, Text::Whitespace, Num::Float
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
rule %r/T?\d{2}:\d{2}:\d{2}(\.\d{5})?(Z|(?:[-+]\d{2}:\d{2}))?/, Literal::Date
|
|
23
|
+
rule %r/\d{4}-\d{2}-\d{2}/, Literal::Date
|
|
24
|
+
rule %r/\d{2}\/\d{2}\/\d{4}/, Literal::Date
|
|
25
|
+
|
|
26
|
+
rule %r((\d+[.]?\d*|\d*[.]\d+)(e[+-]?[0-9]+)?)i, Num::Float
|
|
27
|
+
rule %r/\d+/, Num::Integer
|
|
28
|
+
|
|
29
|
+
rule %r/@\w+/, Keyword::Pseudo
|
|
30
|
+
|
|
31
|
+
rule %r/[-.\w]+:/, Name::Variable
|
|
32
|
+
rule %r/^"[^"]+"/, Name::Variable
|
|
33
|
+
rule %r/\$([-.\w]+|("[^"]+"))\/?/, Name::Variable
|
|
34
|
+
|
|
35
|
+
rule %r/[A-Z]+/i, Keyword
|
|
36
|
+
|
|
37
|
+
rule %r/"[^"]*"/, Str::Double
|
|
38
|
+
rule %r/'[^\r\n\f']'/, Str::Char
|
|
39
|
+
|
|
40
|
+
rule %r/[,()*]/, Punctuation
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
|
|
3
|
+
require_relative 'cpp'
|
|
4
|
+
|
|
5
|
+
module Rouge
|
|
6
|
+
module Lexers
|
|
7
|
+
class CUDA < Cpp
|
|
8
|
+
title "CUDA"
|
|
9
|
+
desc "Compute Unified Device Architecture, used for programming with NVIDIA GPU"
|
|
10
|
+
|
|
11
|
+
tag 'cuda'
|
|
12
|
+
filenames '*.cu', '*.cuh'
|
|
13
|
+
|
|
14
|
+
def self.keywords
|
|
15
|
+
@keywords ||= super + Set.new(%w(
|
|
16
|
+
__global__ __device__ __host__ __noinline__ __forceinline__
|
|
17
|
+
__constant__ __shared__ __managed__ __restrict__
|
|
18
|
+
))
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.keywords_type
|
|
22
|
+
@keywords_type ||= super + Set.new(%w(
|
|
23
|
+
char1 char2 char3 char4 uchar1 uchar2 uchar3 uchar4
|
|
24
|
+
short1 short2 short3 short4 ushort1 ushort2 ushort3 ushort4
|
|
25
|
+
int1 int2 int3 int4 uint1 uint2 uint3 uint4
|
|
26
|
+
long1 long2 long3 long4 ulong1 ulong2 ulong3 ulong4
|
|
27
|
+
longlong1 longlong2 longlong3 longlong4
|
|
28
|
+
ulonglong1 ulonglong2 ulonglong3 ulonglong4
|
|
29
|
+
float1 float2 float3 float4 double1 double2 double3 double4
|
|
30
|
+
dim3
|
|
31
|
+
))
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Rouge
|
|
5
|
+
module Lexers
|
|
6
|
+
class Cypher < RegexLexer
|
|
7
|
+
tag 'cypher'
|
|
8
|
+
aliases 'cypher'
|
|
9
|
+
filenames '*.cypher'
|
|
10
|
+
mimetypes 'application/x-cypher-query'
|
|
11
|
+
|
|
12
|
+
title "Cypher"
|
|
13
|
+
desc 'The Cypher query language (neo4j.com/docs/cypher-manual)'
|
|
14
|
+
|
|
15
|
+
def self.functions
|
|
16
|
+
@functions ||= Set.new %w(
|
|
17
|
+
ABS ACOS ALLSHORTESTPATHS ASIN ATAN ATAN2 AVG CEIL COALESCE COLLECT
|
|
18
|
+
COS COT COUNT DATE DEGREES E ENDNODE EXP EXTRACT FILTER FLOOR
|
|
19
|
+
HAVERSIN HEAD ID KEYS LABELS LAST LEFT LENGTH LOG LOG10 LOWER LTRIM
|
|
20
|
+
MAX MIN NODE NODES PERCENTILECONT PERCENTILEDISC PI RADIANS RAND
|
|
21
|
+
RANGE REDUCE REL RELATIONSHIP RELATIONSHIPS REPLACE REVERSE RIGHT
|
|
22
|
+
ROUND RTRIM SHORTESTPATH SIGN SIN SIZE SPLIT SQRT STARTNODE STDEV
|
|
23
|
+
STDEVP STR SUBSTRING SUM TAIL TAN TIMESTAMP TOFLOAT TOINT TOINTEGER
|
|
24
|
+
TOSTRING TRIM TYPE UPPER
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.predicates
|
|
29
|
+
@predicates ||= Set.new %w(
|
|
30
|
+
ALL AND ANY CONTAINS EXISTS HAS IN NONE NOT OR SINGLE XOR
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.keywords
|
|
35
|
+
@keywords ||= Set.new %w(
|
|
36
|
+
AS ASC ASCENDING ASSERT BY CASE COMMIT CONSTRAINT CREATE CSV CYPHER
|
|
37
|
+
DELETE DESC DESCENDING DETACH DISTINCT DROP ELSE END ENDS EXPLAIN
|
|
38
|
+
FALSE FIELDTERMINATOR FOREACH FROM HEADERS IN INDEX IS JOIN LIMIT
|
|
39
|
+
LOAD MATCH MERGE NULL ON OPTIONAL ORDER PERIODIC PROFILE REMOVE
|
|
40
|
+
RETURN SCAN SET SKIP START STARTS THEN TRUE UNION UNIQUE UNWIND USING
|
|
41
|
+
WHEN WHERE WITH CALL YIELD
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
state :root do
|
|
46
|
+
rule %r/[\s]+/, Text
|
|
47
|
+
rule %r(//.*?$), Comment::Single
|
|
48
|
+
rule %r(/\*), Comment::Multiline, :multiline_comments
|
|
49
|
+
|
|
50
|
+
rule %r([*+\-<>=&|~%^]), Operator
|
|
51
|
+
rule %r/[{}),;\[\]]/, Str::Symbol
|
|
52
|
+
|
|
53
|
+
# literal number
|
|
54
|
+
rule %r/(\w+)(:)(\s*)(-?[._\d]+)/ do
|
|
55
|
+
groups Name::Label, Str::Delimiter, Text::Whitespace, Num
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# function-like
|
|
59
|
+
# - "name("
|
|
60
|
+
# - "name ("
|
|
61
|
+
# - "name ("
|
|
62
|
+
rule %r/(\w+)(\s*)(\()/ do |m|
|
|
63
|
+
name = m[1].upcase
|
|
64
|
+
if self.class.functions.include? name
|
|
65
|
+
groups Name::Function, Text::Whitespace, Str::Symbol
|
|
66
|
+
elsif self.class.keywords.include? name
|
|
67
|
+
groups Keyword, Text::Whitespace, Str::Symbol
|
|
68
|
+
else
|
|
69
|
+
groups Name, Text::Whitespace, Str::Symbol
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
rule %r/:\w+/, Name::Class
|
|
74
|
+
|
|
75
|
+
# number range
|
|
76
|
+
rule %r/(-?\d+)(\.\.)(-?\d+)/ do
|
|
77
|
+
groups Num, Operator, Num
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# numbers
|
|
81
|
+
rule %r/(\d+\.\d*|\d*\.\d+)(e[+-]?\d+)?/i, Num::Float
|
|
82
|
+
rule %r/\d+e[+-]?\d+/i, Num::Float
|
|
83
|
+
rule %r/0[0-7]+/, Num::Oct
|
|
84
|
+
rule %r/0x[a-f0-9]+/i, Num::Hex
|
|
85
|
+
rule %r/\d+/, Num::Integer
|
|
86
|
+
|
|
87
|
+
rule %r([.\w]+:), Name::Property
|
|
88
|
+
|
|
89
|
+
# remaining "("
|
|
90
|
+
rule %r/\(/, Str::Symbol
|
|
91
|
+
|
|
92
|
+
rule %r/[.\w$]+/ do |m|
|
|
93
|
+
match = m[0].upcase
|
|
94
|
+
if self.class.predicates.include? match
|
|
95
|
+
token Operator::Word
|
|
96
|
+
elsif self.class.keywords.include? match
|
|
97
|
+
token Keyword
|
|
98
|
+
else
|
|
99
|
+
token Name
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
rule %r/"(\\\\|\\"|[^"])*"/, Str::Double
|
|
104
|
+
rule %r/'(\\\\|\\'|[^'])*'/, Str::Single
|
|
105
|
+
rule %r/`(\\\\|\\`|[^`])*`/, Str::Backtick
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
state :multiline_comments do
|
|
109
|
+
rule %r(/[*]), Comment::Multiline, :multiline_comments
|
|
110
|
+
rule %r([*]/), Comment::Multiline, :pop!
|
|
111
|
+
rule %r([^/*]+), Comment::Multiline
|
|
112
|
+
rule %r([/*]), Comment::Multiline
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require_relative 'python'
|
|
5
|
+
|
|
6
|
+
module Rouge
|
|
7
|
+
module Lexers
|
|
8
|
+
class Cython < Python
|
|
9
|
+
title "Cython"
|
|
10
|
+
desc "Cython and Pyrex source code (cython.org)"
|
|
11
|
+
tag 'cython'
|
|
12
|
+
aliases 'pyx', 'pyrex'
|
|
13
|
+
filenames '*.pyx', '*.pxd', '*.pxi'
|
|
14
|
+
mimetypes 'text/x-cython', 'application/x-cython'
|
|
15
|
+
|
|
16
|
+
def initialize(opts = {})
|
|
17
|
+
super opts
|
|
18
|
+
@indentation = nil
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.keywords
|
|
22
|
+
@keywords ||= super + %w(
|
|
23
|
+
by except? fused gil nogil
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.c_keywords
|
|
28
|
+
@c_keywords ||= Set.new %w(
|
|
29
|
+
public readonly extern api inline enum union
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.builtins
|
|
34
|
+
@builtins ||= super + %w(python_call)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
identifier = /[a-z_]\w*/i
|
|
38
|
+
|
|
39
|
+
prepend :from_import do
|
|
40
|
+
rule %r/cimport\b/, Keyword::Namespace, :pop!
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
prepend :root do
|
|
44
|
+
rule %r/cp?def|ctypedef/ do
|
|
45
|
+
token Keyword
|
|
46
|
+
push :c_definitions
|
|
47
|
+
push :c_start
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
rule %r/cimport\b/, Keyword::Namespace, :import
|
|
51
|
+
|
|
52
|
+
rule %r/(struct)((?:\\\s|\s)+)/ do
|
|
53
|
+
groups Keyword, Text
|
|
54
|
+
push :classname
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
rule %r/[(,]/, Punctuation, :c_start
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# The Cython lexer adds three states to those already in the Python lexer.
|
|
61
|
+
# Calls to `cdef`, `cpdef` and `ctypedef` move the lexer into the :c_start
|
|
62
|
+
# state. The primary purpose of this state is to highlight datatypes. Once
|
|
63
|
+
# this has been done, the lexer moves to the :c_definitions state where
|
|
64
|
+
# the majority of text in a definition is lexed. Finally, newlines cause
|
|
65
|
+
# the lexer to move to :c_indent. This state is used to check whether we
|
|
66
|
+
# have moved out of a C block.
|
|
67
|
+
|
|
68
|
+
state :c_start do
|
|
69
|
+
mixin :inline_whitespace
|
|
70
|
+
|
|
71
|
+
rule %r/cp?def|ctypedef/, Keyword
|
|
72
|
+
|
|
73
|
+
rule %r/(?:un)?signed/, Keyword::Type
|
|
74
|
+
|
|
75
|
+
# This rule matches identifiers that could be type declarations. The
|
|
76
|
+
# lookahead matches (1) pointers, (2) arrays and (3) variable names.
|
|
77
|
+
rule %r/#{identifier}(?=(?:\*+)|(?:[ \t]*\[)|(?:[ \t]+\w))/ do |m|
|
|
78
|
+
if self.class.keywords.include?(m[0])
|
|
79
|
+
token Keyword
|
|
80
|
+
pop!
|
|
81
|
+
elsif m[0] == 'def'
|
|
82
|
+
token Keyword
|
|
83
|
+
goto :funcname
|
|
84
|
+
elsif %w(struct class).include?(m[0])
|
|
85
|
+
token Keyword
|
|
86
|
+
goto :classname
|
|
87
|
+
elsif self.class.c_keywords.include?(m[0])
|
|
88
|
+
token Keyword::Reserved
|
|
89
|
+
else
|
|
90
|
+
token Keyword::Type
|
|
91
|
+
pop!
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
rule(//) { pop! }
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
state :c_definitions do
|
|
99
|
+
rule %r/\n/, Text, :c_indent
|
|
100
|
+
mixin :root
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
state :c_indent do
|
|
104
|
+
rule %r/[ \t]+/ do |m|
|
|
105
|
+
token Text
|
|
106
|
+
goto :c_start
|
|
107
|
+
|
|
108
|
+
if @indentation.nil?
|
|
109
|
+
@indentation = m[0]
|
|
110
|
+
elsif @indentation.length > m[0].length
|
|
111
|
+
@indentation = nil
|
|
112
|
+
pop! 2 # Pop :c_start and :c_definitions
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
rule(//) do
|
|
117
|
+
@indentation = nil
|
|
118
|
+
# pop c_indent
|
|
119
|
+
pop!
|
|
120
|
+
|
|
121
|
+
# replace :c_definitions with :newline
|
|
122
|
+
goto :newline
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|