PageRenderTime 52ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/aikau/src/main/resources/lib/code-mirror/mode/meta.js

https://gitlab.com/vikash.patel/qwertyu
JavaScript | 143 lines | 136 code | 4 blank | 3 comment | 23 complexity | e11245fdd110ec355e12f3c88ea70fd0 MD5 | raw file
  1. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  2. // Distributed under an MIT license: http://codemirror.net/LICENSE
  3. (function(mod) {
  4. if (typeof exports == "object" && typeof module == "object") // CommonJS
  5. mod(require("../lib/codemirror"));
  6. else if (typeof define == "function" && define.amd) // AMD
  7. define(["../lib/codemirror"], mod);
  8. else // Plain browser env
  9. mod(CodeMirror);
  10. })(function(CodeMirror) {
  11. "use strict";
  12. CodeMirror.modeInfo = [
  13. {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
  14. {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk"},
  15. {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h"]},
  16. {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "hpp", "h++"]},
  17. {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
  18. {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"]},
  19. {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj"]},
  20. {name: "CoffeeScript", mime: "text/x-coffeescript", mode: "coffeescript", ext: ["coffee"]},
  21. {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"]},
  22. {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher"},
  23. {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
  24. {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
  25. {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
  26. {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
  27. {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
  28. {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
  29. {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
  30. {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
  31. {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
  32. {name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
  33. {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
  34. {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90"]},
  35. {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"]},
  36. {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
  37. {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
  38. {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm"},
  39. {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
  40. {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy"]},
  41. {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
  42. {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
  43. {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
  44. {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
  45. {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"]},
  46. {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm"]},
  47. {name: "HTTP", mime: "message/http", mode: "http"},
  48. {name: "Jade", mime: "text/x-jade", mode: "jade", ext: ["jade"]},
  49. {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
  50. {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"]},
  51. {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
  52. mode: "javascript", ext: ["js"]},
  53. {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"]},
  54. {name: "JSON-LD", mime: "application/ld+json", mode: "javascript"},
  55. {name: "Jinja2", mime: "null", mode: "jinja2"},
  56. {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
  57. {name: "Kotlin", mime: "text/x-kotlin", mode: "kotlin", ext: ["kt"]},
  58. {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
  59. {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"]},
  60. {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
  61. {name: "Markdown (GitHub-flavour)", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
  62. {name: "mIRC", mime: "text/mirc", mode: "mirc"},
  63. {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
  64. {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
  65. {name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
  66. {name: "MySQL", mime: "text/x-mysql", mode: "sql"},
  67. {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx"},
  68. {name: "NTriples", mime: "text/n-triples", mode: "ntriples", ext: ["nt"]},
  69. {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
  70. {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
  71. {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
  72. {name: "PEG.js", mime: "null", mode: "pegjs"},
  73. {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
  74. {name: "PHP", mime: "application/x-httpd-php", mode: "php", ext: ["php", "php3", "php4", "php5", "phtml"]},
  75. {name: "Pig", mime: "text/x-pig", mode: "pig"},
  76. {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
  77. {name: "PLSQL", mime: "text/x-plsql", mode: "sql"},
  78. {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"]},
  79. {name: "Python", mime: "text/x-python", mode: "python", ext: ["py", "pyw"]},
  80. {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
  81. {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
  82. {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r"]},
  83. {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"]},
  84. {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"]},
  85. {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
  86. {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
  87. {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
  88. {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
  89. {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
  90. {name: "Shell", mime: "text/x-sh", mode: "shell", ext: ["sh", "ksh", "bash"]},
  91. {name: "Sieve", mime: "application/sieve", mode: "sieve"},
  92. {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim"},
  93. {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
  94. {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
  95. {name: "SmartyMixed", mime: "text/x-smarty", mode: "smartymixed"},
  96. {name: "Solr", mime: "text/x-solr", mode: "solr"},
  97. {name: "SPARQL", mime: "application/x-sparql-query", mode: "sparql", ext: ["sparql"]},
  98. {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
  99. {name: "MariaDB", mime: "text/x-mariadb", mode: "sql"},
  100. {name: "sTeX", mime: "text/x-stex", mode: "stex"},
  101. {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx"]},
  102. {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v"]},
  103. {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
  104. {name: "Textile", mime: "text/x-textile", mode: "textile"},
  105. {name: "TiddlyWiki ", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
  106. {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
  107. {name: "TOML", mime: "text/x-toml", mode: "toml"},
  108. {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
  109. {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"]},
  110. {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
  111. {name: "VBScript", mime: "text/vbscript", mode: "vbscript"},
  112. {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
  113. {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
  114. {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd"]},
  115. {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
  116. {name: "YAML", mime: "text/x-yaml", mode: "yaml", ext: ["yaml"]},
  117. {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]}
  118. ];
  119. // Ensure all modes have a mime property for backwards compatibility
  120. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  121. var info = CodeMirror.modeInfo[i];
  122. if (info.mimes) info.mime = info.mimes[0];
  123. }
  124. CodeMirror.findModeByMIME = function(mime) {
  125. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  126. var info = CodeMirror.modeInfo[i];
  127. if (info.mime == mime) return info;
  128. if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
  129. if (info.mimes[j] == mime) return info;
  130. }
  131. };
  132. CodeMirror.findModeByExtension = function(ext) {
  133. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  134. var info = CodeMirror.modeInfo[i];
  135. if (info.ext) for (var j = 0; j < info.ext.length; j++)
  136. if (info.ext[j] == ext) return info;
  137. }
  138. };
  139. });