mode-haml.js 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554
  1. ace.define("ace/mode/css_highlight_rules",[], function(require, exports, module) {
  2. "use strict";
  3. var oop = require("../lib/oop");
  4. var lang = require("../lib/lang");
  5. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  6. var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
  7. var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
  8. var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
  9. var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
  10. var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
  11. var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
  12. var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
  13. var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
  14. var CssHighlightRules = function() {
  15. var keywordMapper = this.createKeywordMapper({
  16. "support.function": supportFunction,
  17. "support.constant": supportConstant,
  18. "support.type": supportType,
  19. "support.constant.color": supportConstantColor,
  20. "support.constant.fonts": supportConstantFonts
  21. }, "text", true);
  22. this.$rules = {
  23. "start" : [{
  24. include : ["strings", "url", "comments"]
  25. }, {
  26. token: "paren.lparen",
  27. regex: "\\{",
  28. next: "ruleset"
  29. }, {
  30. token: "paren.rparen",
  31. regex: "\\}"
  32. }, {
  33. token: "string",
  34. regex: "@(?!viewport)",
  35. next: "media"
  36. }, {
  37. token: "keyword",
  38. regex: "#[a-z0-9-_]+"
  39. }, {
  40. token: "keyword",
  41. regex: "%"
  42. }, {
  43. token: "variable",
  44. regex: "\\.[a-z0-9-_]+"
  45. }, {
  46. token: "string",
  47. regex: ":[a-z0-9-_]+"
  48. }, {
  49. token : "constant.numeric",
  50. regex : numRe
  51. }, {
  52. token: "constant",
  53. regex: "[a-z0-9-_]+"
  54. }, {
  55. caseInsensitive: true
  56. }],
  57. "media": [{
  58. include : ["strings", "url", "comments"]
  59. }, {
  60. token: "paren.lparen",
  61. regex: "\\{",
  62. next: "start"
  63. }, {
  64. token: "paren.rparen",
  65. regex: "\\}",
  66. next: "start"
  67. }, {
  68. token: "string",
  69. regex: ";",
  70. next: "start"
  71. }, {
  72. token: "keyword",
  73. regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
  74. + "|page|font|keyframes|viewport|counter-style|font-feature-values"
  75. + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
  76. }],
  77. "comments" : [{
  78. token: "comment", // multi line comment
  79. regex: "\\/\\*",
  80. push: [{
  81. token : "comment",
  82. regex : "\\*\\/",
  83. next : "pop"
  84. }, {
  85. defaultToken : "comment"
  86. }]
  87. }],
  88. "ruleset" : [{
  89. regex : "-(webkit|ms|moz|o)-",
  90. token : "text"
  91. }, {
  92. token : "punctuation.operator",
  93. regex : "[:;]"
  94. }, {
  95. token : "paren.rparen",
  96. regex : "\\}",
  97. next : "start"
  98. }, {
  99. include : ["strings", "url", "comments"]
  100. }, {
  101. token : ["constant.numeric", "keyword"],
  102. regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
  103. }, {
  104. token : "constant.numeric",
  105. regex : numRe
  106. }, {
  107. token : "constant.numeric", // hex6 color
  108. regex : "#[a-f0-9]{6}"
  109. }, {
  110. token : "constant.numeric", // hex3 color
  111. regex : "#[a-f0-9]{3}"
  112. }, {
  113. token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
  114. regex : pseudoElements
  115. }, {
  116. token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
  117. regex : pseudoClasses
  118. }, {
  119. include: "url"
  120. }, {
  121. token : keywordMapper,
  122. regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
  123. }, {
  124. caseInsensitive: true
  125. }],
  126. url: [{
  127. token : "support.function",
  128. regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
  129. push: [{
  130. token : "support.function",
  131. regex : "\\)",
  132. next : "pop"
  133. }, {
  134. defaultToken: "string"
  135. }]
  136. }],
  137. strings: [{
  138. token : "string.start",
  139. regex : "'",
  140. push : [{
  141. token : "string.end",
  142. regex : "'|$",
  143. next: "pop"
  144. }, {
  145. include : "escapes"
  146. }, {
  147. token : "constant.language.escape",
  148. regex : /\\$/,
  149. consumeLineEnd: true
  150. }, {
  151. defaultToken: "string"
  152. }]
  153. }, {
  154. token : "string.start",
  155. regex : '"',
  156. push : [{
  157. token : "string.end",
  158. regex : '"|$',
  159. next: "pop"
  160. }, {
  161. include : "escapes"
  162. }, {
  163. token : "constant.language.escape",
  164. regex : /\\$/,
  165. consumeLineEnd: true
  166. }, {
  167. defaultToken: "string"
  168. }]
  169. }],
  170. escapes: [{
  171. token : "constant.language.escape",
  172. regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
  173. }]
  174. };
  175. this.normalizeRules();
  176. };
  177. oop.inherits(CssHighlightRules, TextHighlightRules);
  178. exports.CssHighlightRules = CssHighlightRules;
  179. });
  180. ace.define("ace/mode/doc_comment_highlight_rules",[], function(require, exports, module) {
  181. "use strict";
  182. var oop = require("../lib/oop");
  183. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  184. var DocCommentHighlightRules = function() {
  185. this.$rules = {
  186. "start" : [ {
  187. token : "comment.doc.tag",
  188. regex : "@[\\w\\d_]+" // TODO: fix email addresses
  189. },
  190. DocCommentHighlightRules.getTagRule(),
  191. {
  192. defaultToken : "comment.doc",
  193. caseInsensitive: true
  194. }]
  195. };
  196. };
  197. oop.inherits(DocCommentHighlightRules, TextHighlightRules);
  198. DocCommentHighlightRules.getTagRule = function(start) {
  199. return {
  200. token : "comment.doc.tag.storage.type",
  201. regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
  202. };
  203. };
  204. DocCommentHighlightRules.getStartRule = function(start) {
  205. return {
  206. token : "comment.doc", // doc comment
  207. regex : "\\/\\*(?=\\*)",
  208. next : start
  209. };
  210. };
  211. DocCommentHighlightRules.getEndRule = function (start) {
  212. return {
  213. token : "comment.doc", // closing comment
  214. regex : "\\*\\/",
  215. next : start
  216. };
  217. };
  218. exports.DocCommentHighlightRules = DocCommentHighlightRules;
  219. });
  220. ace.define("ace/mode/javascript_highlight_rules",[], function(require, exports, module) {
  221. "use strict";
  222. var oop = require("../lib/oop");
  223. var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
  224. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  225. var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
  226. var JavaScriptHighlightRules = function(options) {
  227. var keywordMapper = this.createKeywordMapper({
  228. "variable.language":
  229. "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
  230. "Namespace|QName|XML|XMLList|" + // E4X
  231. "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
  232. "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
  233. "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
  234. "SyntaxError|TypeError|URIError|" +
  235. "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
  236. "isNaN|parseFloat|parseInt|" +
  237. "JSON|Math|" + // Other
  238. "this|arguments|prototype|window|document" , // Pseudo
  239. "keyword":
  240. "const|yield|import|get|set|async|await|" +
  241. "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
  242. "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
  243. "__parent__|__count__|escape|unescape|with|__proto__|" +
  244. "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
  245. "storage.type":
  246. "const|let|var|function",
  247. "constant.language":
  248. "null|Infinity|NaN|undefined",
  249. "support.function":
  250. "alert",
  251. "constant.language.boolean": "true|false"
  252. }, "identifier");
  253. var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
  254. var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
  255. "u[0-9a-fA-F]{4}|" + // unicode
  256. "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
  257. "[0-2][0-7]{0,2}|" + // oct
  258. "3[0-7][0-7]?|" + // oct
  259. "[4-7][0-7]?|" + //oct
  260. ".)";
  261. this.$rules = {
  262. "no_regex" : [
  263. DocCommentHighlightRules.getStartRule("doc-start"),
  264. comments("no_regex"),
  265. {
  266. token : "string",
  267. regex : "'(?=.)",
  268. next : "qstring"
  269. }, {
  270. token : "string",
  271. regex : '"(?=.)',
  272. next : "qqstring"
  273. }, {
  274. token : "constant.numeric", // hexadecimal, octal and binary
  275. regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
  276. }, {
  277. token : "constant.numeric", // decimal integers and floats
  278. regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
  279. }, {
  280. token : [
  281. "storage.type", "punctuation.operator", "support.function",
  282. "punctuation.operator", "entity.name.function", "text","keyword.operator"
  283. ],
  284. regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
  285. next: "function_arguments"
  286. }, {
  287. token : [
  288. "storage.type", "punctuation.operator", "entity.name.function", "text",
  289. "keyword.operator", "text", "storage.type", "text", "paren.lparen"
  290. ],
  291. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  292. next: "function_arguments"
  293. }, {
  294. token : [
  295. "entity.name.function", "text", "keyword.operator", "text", "storage.type",
  296. "text", "paren.lparen"
  297. ],
  298. regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  299. next: "function_arguments"
  300. }, {
  301. token : [
  302. "storage.type", "punctuation.operator", "entity.name.function", "text",
  303. "keyword.operator", "text",
  304. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  305. ],
  306. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
  307. next: "function_arguments"
  308. }, {
  309. token : [
  310. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  311. ],
  312. regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
  313. next: "function_arguments"
  314. }, {
  315. token : [
  316. "entity.name.function", "text", "punctuation.operator",
  317. "text", "storage.type", "text", "paren.lparen"
  318. ],
  319. regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
  320. next: "function_arguments"
  321. }, {
  322. token : [
  323. "text", "text", "storage.type", "text", "paren.lparen"
  324. ],
  325. regex : "(:)(\\s*)(function)(\\s*)(\\()",
  326. next: "function_arguments"
  327. }, {
  328. token : "keyword",
  329. regex : "from(?=\\s*('|\"))"
  330. }, {
  331. token : "keyword",
  332. regex : "(?:" + kwBeforeRe + ")\\b",
  333. next : "start"
  334. }, {
  335. token : ["support.constant"],
  336. regex : /that\b/
  337. }, {
  338. token : ["storage.type", "punctuation.operator", "support.function.firebug"],
  339. regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
  340. }, {
  341. token : keywordMapper,
  342. regex : identifierRe
  343. }, {
  344. token : "punctuation.operator",
  345. regex : /[.](?![.])/,
  346. next : "property"
  347. }, {
  348. token : "storage.type",
  349. regex : /=>/
  350. }, {
  351. token : "keyword.operator",
  352. regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
  353. next : "start"
  354. }, {
  355. token : "punctuation.operator",
  356. regex : /[?:,;.]/,
  357. next : "start"
  358. }, {
  359. token : "paren.lparen",
  360. regex : /[\[({]/,
  361. next : "start"
  362. }, {
  363. token : "paren.rparen",
  364. regex : /[\])}]/
  365. }, {
  366. token: "comment",
  367. regex: /^#!.*$/
  368. }
  369. ],
  370. property: [{
  371. token : "text",
  372. regex : "\\s+"
  373. }, {
  374. token : [
  375. "storage.type", "punctuation.operator", "entity.name.function", "text",
  376. "keyword.operator", "text",
  377. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  378. ],
  379. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
  380. next: "function_arguments"
  381. }, {
  382. token : "punctuation.operator",
  383. regex : /[.](?![.])/
  384. }, {
  385. token : "support.function",
  386. regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
  387. }, {
  388. token : "support.function.dom",
  389. regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
  390. }, {
  391. token : "support.constant",
  392. regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
  393. }, {
  394. token : "identifier",
  395. regex : identifierRe
  396. }, {
  397. regex: "",
  398. token: "empty",
  399. next: "no_regex"
  400. }
  401. ],
  402. "start": [
  403. DocCommentHighlightRules.getStartRule("doc-start"),
  404. comments("start"),
  405. {
  406. token: "string.regexp",
  407. regex: "\\/",
  408. next: "regex"
  409. }, {
  410. token : "text",
  411. regex : "\\s+|^$",
  412. next : "start"
  413. }, {
  414. token: "empty",
  415. regex: "",
  416. next: "no_regex"
  417. }
  418. ],
  419. "regex": [
  420. {
  421. token: "regexp.keyword.operator",
  422. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  423. }, {
  424. token: "string.regexp",
  425. regex: "/[sxngimy]*",
  426. next: "no_regex"
  427. }, {
  428. token : "invalid",
  429. regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
  430. }, {
  431. token : "constant.language.escape",
  432. regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
  433. }, {
  434. token : "constant.language.delimiter",
  435. regex: /\|/
  436. }, {
  437. token: "constant.language.escape",
  438. regex: /\[\^?/,
  439. next: "regex_character_class"
  440. }, {
  441. token: "empty",
  442. regex: "$",
  443. next: "no_regex"
  444. }, {
  445. defaultToken: "string.regexp"
  446. }
  447. ],
  448. "regex_character_class": [
  449. {
  450. token: "regexp.charclass.keyword.operator",
  451. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  452. }, {
  453. token: "constant.language.escape",
  454. regex: "]",
  455. next: "regex"
  456. }, {
  457. token: "constant.language.escape",
  458. regex: "-"
  459. }, {
  460. token: "empty",
  461. regex: "$",
  462. next: "no_regex"
  463. }, {
  464. defaultToken: "string.regexp.charachterclass"
  465. }
  466. ],
  467. "function_arguments": [
  468. {
  469. token: "variable.parameter",
  470. regex: identifierRe
  471. }, {
  472. token: "punctuation.operator",
  473. regex: "[, ]+"
  474. }, {
  475. token: "punctuation.operator",
  476. regex: "$"
  477. }, {
  478. token: "empty",
  479. regex: "",
  480. next: "no_regex"
  481. }
  482. ],
  483. "qqstring" : [
  484. {
  485. token : "constant.language.escape",
  486. regex : escapedRe
  487. }, {
  488. token : "string",
  489. regex : "\\\\$",
  490. consumeLineEnd : true
  491. }, {
  492. token : "string",
  493. regex : '"|$',
  494. next : "no_regex"
  495. }, {
  496. defaultToken: "string"
  497. }
  498. ],
  499. "qstring" : [
  500. {
  501. token : "constant.language.escape",
  502. regex : escapedRe
  503. }, {
  504. token : "string",
  505. regex : "\\\\$",
  506. consumeLineEnd : true
  507. }, {
  508. token : "string",
  509. regex : "'|$",
  510. next : "no_regex"
  511. }, {
  512. defaultToken: "string"
  513. }
  514. ]
  515. };
  516. if (!options || !options.noES6) {
  517. this.$rules.no_regex.unshift({
  518. regex: "[{}]", onMatch: function(val, state, stack) {
  519. this.next = val == "{" ? this.nextState : "";
  520. if (val == "{" && stack.length) {
  521. stack.unshift("start", state);
  522. }
  523. else if (val == "}" && stack.length) {
  524. stack.shift();
  525. this.next = stack.shift();
  526. if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
  527. return "paren.quasi.end";
  528. }
  529. return val == "{" ? "paren.lparen" : "paren.rparen";
  530. },
  531. nextState: "start"
  532. }, {
  533. token : "string.quasi.start",
  534. regex : /`/,
  535. push : [{
  536. token : "constant.language.escape",
  537. regex : escapedRe
  538. }, {
  539. token : "paren.quasi.start",
  540. regex : /\${/,
  541. push : "start"
  542. }, {
  543. token : "string.quasi.end",
  544. regex : /`/,
  545. next : "pop"
  546. }, {
  547. defaultToken: "string.quasi"
  548. }]
  549. });
  550. if (!options || options.jsx != false)
  551. JSX.call(this);
  552. }
  553. this.embedRules(DocCommentHighlightRules, "doc-",
  554. [ DocCommentHighlightRules.getEndRule("no_regex") ]);
  555. this.normalizeRules();
  556. };
  557. oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
  558. function JSX() {
  559. var tagRegex = identifierRe.replace("\\d", "\\d\\-");
  560. var jsxTag = {
  561. onMatch : function(val, state, stack) {
  562. var offset = val.charAt(1) == "/" ? 2 : 1;
  563. if (offset == 1) {
  564. if (state != this.nextState)
  565. stack.unshift(this.next, this.nextState, 0);
  566. else
  567. stack.unshift(this.next);
  568. stack[2]++;
  569. } else if (offset == 2) {
  570. if (state == this.nextState) {
  571. stack[1]--;
  572. if (!stack[1] || stack[1] < 0) {
  573. stack.shift();
  574. stack.shift();
  575. }
  576. }
  577. }
  578. return [{
  579. type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
  580. value: val.slice(0, offset)
  581. }, {
  582. type: "meta.tag.tag-name.xml",
  583. value: val.substr(offset)
  584. }];
  585. },
  586. regex : "</?" + tagRegex + "",
  587. next: "jsxAttributes",
  588. nextState: "jsx"
  589. };
  590. this.$rules.start.unshift(jsxTag);
  591. var jsxJsRule = {
  592. regex: "{",
  593. token: "paren.quasi.start",
  594. push: "start"
  595. };
  596. this.$rules.jsx = [
  597. jsxJsRule,
  598. jsxTag,
  599. {include : "reference"},
  600. {defaultToken: "string"}
  601. ];
  602. this.$rules.jsxAttributes = [{
  603. token : "meta.tag.punctuation.tag-close.xml",
  604. regex : "/?>",
  605. onMatch : function(value, currentState, stack) {
  606. if (currentState == stack[0])
  607. stack.shift();
  608. if (value.length == 2) {
  609. if (stack[0] == this.nextState)
  610. stack[1]--;
  611. if (!stack[1] || stack[1] < 0) {
  612. stack.splice(0, 2);
  613. }
  614. }
  615. this.next = stack[0] || "start";
  616. return [{type: this.token, value: value}];
  617. },
  618. nextState: "jsx"
  619. },
  620. jsxJsRule,
  621. comments("jsxAttributes"),
  622. {
  623. token : "entity.other.attribute-name.xml",
  624. regex : tagRegex
  625. }, {
  626. token : "keyword.operator.attribute-equals.xml",
  627. regex : "="
  628. }, {
  629. token : "text.tag-whitespace.xml",
  630. regex : "\\s+"
  631. }, {
  632. token : "string.attribute-value.xml",
  633. regex : "'",
  634. stateName : "jsx_attr_q",
  635. push : [
  636. {token : "string.attribute-value.xml", regex: "'", next: "pop"},
  637. {include : "reference"},
  638. {defaultToken : "string.attribute-value.xml"}
  639. ]
  640. }, {
  641. token : "string.attribute-value.xml",
  642. regex : '"',
  643. stateName : "jsx_attr_qq",
  644. push : [
  645. {token : "string.attribute-value.xml", regex: '"', next: "pop"},
  646. {include : "reference"},
  647. {defaultToken : "string.attribute-value.xml"}
  648. ]
  649. },
  650. jsxTag
  651. ];
  652. this.$rules.reference = [{
  653. token : "constant.language.escape.reference.xml",
  654. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  655. }];
  656. }
  657. function comments(next) {
  658. return [
  659. {
  660. token : "comment", // multi line comment
  661. regex : /\/\*/,
  662. next: [
  663. DocCommentHighlightRules.getTagRule(),
  664. {token : "comment", regex : "\\*\\/", next : next || "pop"},
  665. {defaultToken : "comment", caseInsensitive: true}
  666. ]
  667. }, {
  668. token : "comment",
  669. regex : "\\/\\/",
  670. next: [
  671. DocCommentHighlightRules.getTagRule(),
  672. {token : "comment", regex : "$|^", next : next || "pop"},
  673. {defaultToken : "comment", caseInsensitive: true}
  674. ]
  675. }
  676. ];
  677. }
  678. exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
  679. });
  680. ace.define("ace/mode/xml_highlight_rules",[], function(require, exports, module) {
  681. "use strict";
  682. var oop = require("../lib/oop");
  683. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  684. var XmlHighlightRules = function(normalize) {
  685. var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
  686. this.$rules = {
  687. start : [
  688. {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
  689. {
  690. token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
  691. regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
  692. },
  693. {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
  694. {
  695. token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
  696. regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
  697. },
  698. {include : "tag"},
  699. {token : "text.end-tag-open.xml", regex: "</"},
  700. {token : "text.tag-open.xml", regex: "<"},
  701. {include : "reference"},
  702. {defaultToken : "text.xml"}
  703. ],
  704. processing_instruction : [{
  705. token : "entity.other.attribute-name.decl-attribute-name.xml",
  706. regex : tagRegex
  707. }, {
  708. token : "keyword.operator.decl-attribute-equals.xml",
  709. regex : "="
  710. }, {
  711. include: "whitespace"
  712. }, {
  713. include: "string"
  714. }, {
  715. token : "punctuation.xml-decl.xml",
  716. regex : "\\?>",
  717. next : "start"
  718. }],
  719. doctype : [
  720. {include : "whitespace"},
  721. {include : "string"},
  722. {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
  723. {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
  724. {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
  725. ],
  726. int_subset : [{
  727. token : "text.xml",
  728. regex : "\\s+"
  729. }, {
  730. token: "punctuation.int-subset.xml",
  731. regex: "]",
  732. next: "pop"
  733. }, {
  734. token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
  735. regex : "(<\\!)(" + tagRegex + ")",
  736. push : [{
  737. token : "text",
  738. regex : "\\s+"
  739. },
  740. {
  741. token : "punctuation.markup-decl.xml",
  742. regex : ">",
  743. next : "pop"
  744. },
  745. {include : "string"}]
  746. }],
  747. cdata : [
  748. {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
  749. {token : "text.xml", regex : "\\s+"},
  750. {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
  751. ],
  752. comment : [
  753. {token : "comment.end.xml", regex : "-->", next : "start"},
  754. {defaultToken : "comment.xml"}
  755. ],
  756. reference : [{
  757. token : "constant.language.escape.reference.xml",
  758. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  759. }],
  760. attr_reference : [{
  761. token : "constant.language.escape.reference.attribute-value.xml",
  762. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  763. }],
  764. tag : [{
  765. token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
  766. regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
  767. next: [
  768. {include : "attributes"},
  769. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
  770. ]
  771. }],
  772. tag_whitespace : [
  773. {token : "text.tag-whitespace.xml", regex : "\\s+"}
  774. ],
  775. whitespace : [
  776. {token : "text.whitespace.xml", regex : "\\s+"}
  777. ],
  778. string: [{
  779. token : "string.xml",
  780. regex : "'",
  781. push : [
  782. {token : "string.xml", regex: "'", next: "pop"},
  783. {defaultToken : "string.xml"}
  784. ]
  785. }, {
  786. token : "string.xml",
  787. regex : '"',
  788. push : [
  789. {token : "string.xml", regex: '"', next: "pop"},
  790. {defaultToken : "string.xml"}
  791. ]
  792. }],
  793. attributes: [{
  794. token : "entity.other.attribute-name.xml",
  795. regex : tagRegex
  796. }, {
  797. token : "keyword.operator.attribute-equals.xml",
  798. regex : "="
  799. }, {
  800. include: "tag_whitespace"
  801. }, {
  802. include: "attribute_value"
  803. }],
  804. attribute_value: [{
  805. token : "string.attribute-value.xml",
  806. regex : "'",
  807. push : [
  808. {token : "string.attribute-value.xml", regex: "'", next: "pop"},
  809. {include : "attr_reference"},
  810. {defaultToken : "string.attribute-value.xml"}
  811. ]
  812. }, {
  813. token : "string.attribute-value.xml",
  814. regex : '"',
  815. push : [
  816. {token : "string.attribute-value.xml", regex: '"', next: "pop"},
  817. {include : "attr_reference"},
  818. {defaultToken : "string.attribute-value.xml"}
  819. ]
  820. }]
  821. };
  822. if (this.constructor === XmlHighlightRules)
  823. this.normalizeRules();
  824. };
  825. (function() {
  826. this.embedTagRules = function(HighlightRules, prefix, tag){
  827. this.$rules.tag.unshift({
  828. token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
  829. regex : "(<)(" + tag + "(?=\\s|>|$))",
  830. next: [
  831. {include : "attributes"},
  832. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
  833. ]
  834. });
  835. this.$rules[tag + "-end"] = [
  836. {include : "attributes"},
  837. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
  838. onMatch : function(value, currentState, stack) {
  839. stack.splice(0);
  840. return this.token;
  841. }}
  842. ];
  843. this.embedRules(HighlightRules, prefix, [{
  844. token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
  845. regex : "(</)(" + tag + "(?=\\s|>|$))",
  846. next: tag + "-end"
  847. }, {
  848. token: "string.cdata.xml",
  849. regex : "<\\!\\[CDATA\\["
  850. }, {
  851. token: "string.cdata.xml",
  852. regex : "\\]\\]>"
  853. }]);
  854. };
  855. }).call(TextHighlightRules.prototype);
  856. oop.inherits(XmlHighlightRules, TextHighlightRules);
  857. exports.XmlHighlightRules = XmlHighlightRules;
  858. });
  859. ace.define("ace/mode/html_highlight_rules",[], function(require, exports, module) {
  860. "use strict";
  861. var oop = require("../lib/oop");
  862. var lang = require("../lib/lang");
  863. var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
  864. var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
  865. var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
  866. var tagMap = lang.createMap({
  867. a : 'anchor',
  868. button : 'form',
  869. form : 'form',
  870. img : 'image',
  871. input : 'form',
  872. label : 'form',
  873. option : 'form',
  874. script : 'script',
  875. select : 'form',
  876. textarea : 'form',
  877. style : 'style',
  878. table : 'table',
  879. tbody : 'table',
  880. td : 'table',
  881. tfoot : 'table',
  882. th : 'table',
  883. tr : 'table'
  884. });
  885. var HtmlHighlightRules = function() {
  886. XmlHighlightRules.call(this);
  887. this.addRules({
  888. attributes: [{
  889. include : "tag_whitespace"
  890. }, {
  891. token : "entity.other.attribute-name.xml",
  892. regex : "[-_a-zA-Z0-9:.]+"
  893. }, {
  894. token : "keyword.operator.attribute-equals.xml",
  895. regex : "=",
  896. push : [{
  897. include: "tag_whitespace"
  898. }, {
  899. token : "string.unquoted.attribute-value.html",
  900. regex : "[^<>='\"`\\s]+",
  901. next : "pop"
  902. }, {
  903. token : "empty",
  904. regex : "",
  905. next : "pop"
  906. }]
  907. }, {
  908. include : "attribute_value"
  909. }],
  910. tag: [{
  911. token : function(start, tag) {
  912. var group = tagMap[tag];
  913. return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
  914. "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
  915. },
  916. regex : "(</?)([-_a-zA-Z0-9:.]+)",
  917. next: "tag_stuff"
  918. }],
  919. tag_stuff: [
  920. {include : "attributes"},
  921. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
  922. ]
  923. });
  924. this.embedTagRules(CssHighlightRules, "css-", "style");
  925. this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
  926. if (this.constructor === HtmlHighlightRules)
  927. this.normalizeRules();
  928. };
  929. oop.inherits(HtmlHighlightRules, XmlHighlightRules);
  930. exports.HtmlHighlightRules = HtmlHighlightRules;
  931. });
  932. ace.define("ace/mode/ruby_highlight_rules",[], function(require, exports, module) {
  933. "use strict";
  934. var oop = require("../lib/oop");
  935. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  936. var constantOtherSymbol = exports.constantOtherSymbol = {
  937. token : "constant.other.symbol.ruby", // symbol
  938. regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
  939. };
  940. var qString = exports.qString = {
  941. token : "string", // single line
  942. regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
  943. };
  944. var qqString = exports.qqString = {
  945. token : "string", // single line
  946. regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
  947. };
  948. var tString = exports.tString = {
  949. token : "string", // backtick string
  950. regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
  951. };
  952. var constantNumericHex = exports.constantNumericHex = {
  953. token : "constant.numeric", // hex
  954. regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
  955. };
  956. var constantNumericFloat = exports.constantNumericFloat = {
  957. token : "constant.numeric", // float
  958. regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
  959. };
  960. var instanceVariable = exports.instanceVariable = {
  961. token : "variable.instance", // instance variable
  962. regex : "@{1,2}[a-zA-Z_\\d]+"
  963. };
  964. var RubyHighlightRules = function() {
  965. var builtinFunctions = (
  966. "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
  967. "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
  968. "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
  969. "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
  970. "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
  971. "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
  972. "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
  973. "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
  974. "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
  975. "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
  976. "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
  977. "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
  978. "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
  979. "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
  980. "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
  981. "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
  982. "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
  983. "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
  984. "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
  985. "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
  986. "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
  987. "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
  988. "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
  989. "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
  990. "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
  991. "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
  992. "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
  993. "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
  994. "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
  995. "has_many|has_one|belongs_to|has_and_belongs_to_many"
  996. );
  997. var keywords = (
  998. "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
  999. "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
  1000. "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
  1001. );
  1002. var buildinConstants = (
  1003. "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
  1004. "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
  1005. );
  1006. var builtinVariables = (
  1007. "$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" +
  1008. "$!|root_url|flash|session|cookies|params|request|response|logger|self"
  1009. );
  1010. var keywordMapper = this.$keywords = this.createKeywordMapper({
  1011. "keyword": keywords,
  1012. "constant.language": buildinConstants,
  1013. "variable.language": builtinVariables,
  1014. "support.function": builtinFunctions,
  1015. "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
  1016. }, "identifier");
  1017. this.$rules = {
  1018. "start" : [
  1019. {
  1020. token : "comment",
  1021. regex : "#.*$"
  1022. }, {
  1023. token : "comment", // multi line comment
  1024. regex : "^=begin(?:$|\\s.*$)",
  1025. next : "comment"
  1026. }, {
  1027. token : "string.regexp",
  1028. regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
  1029. },
  1030. [{
  1031. regex: "[{}]", onMatch: function(val, state, stack) {
  1032. this.next = val == "{" ? this.nextState : "";
  1033. if (val == "{" && stack.length) {
  1034. stack.unshift("start", state);
  1035. return "paren.lparen";
  1036. }
  1037. if (val == "}" && stack.length) {
  1038. stack.shift();
  1039. this.next = stack.shift();
  1040. if (this.next.indexOf("string") != -1)
  1041. return "paren.end";
  1042. }
  1043. return val == "{" ? "paren.lparen" : "paren.rparen";
  1044. },
  1045. nextState: "start"
  1046. }, {
  1047. token : "string.start",
  1048. regex : /"/,
  1049. push : [{
  1050. token : "constant.language.escape",
  1051. regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
  1052. }, {
  1053. token : "paren.start",
  1054. regex : /#{/,
  1055. push : "start"
  1056. }, {
  1057. token : "string.end",
  1058. regex : /"/,
  1059. next : "pop"
  1060. }, {
  1061. defaultToken: "string"
  1062. }]
  1063. }, {
  1064. token : "string.start",
  1065. regex : /`/,
  1066. push : [{
  1067. token : "constant.language.escape",
  1068. regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
  1069. }, {
  1070. token : "paren.start",
  1071. regex : /#{/,
  1072. push : "start"
  1073. }, {
  1074. token : "string.end",
  1075. regex : /`/,
  1076. next : "pop"
  1077. }, {
  1078. defaultToken: "string"
  1079. }]
  1080. }, {
  1081. token : "string.start",
  1082. regex : /'/,
  1083. push : [{
  1084. token : "constant.language.escape",
  1085. regex : /\\['\\]/
  1086. }, {
  1087. token : "string.end",
  1088. regex : /'/,
  1089. next : "pop"
  1090. }, {
  1091. defaultToken: "string"
  1092. }]
  1093. }],
  1094. {
  1095. token : "text", // namespaces aren't symbols
  1096. regex : "::"
  1097. }, {
  1098. token : "variable.instance", // instance variable
  1099. regex : "@{1,2}[a-zA-Z_\\d]+"
  1100. }, {
  1101. token : "support.class", // class name
  1102. regex : "[A-Z][a-zA-Z_\\d]+"
  1103. },
  1104. constantOtherSymbol,
  1105. constantNumericHex,
  1106. constantNumericFloat,
  1107. {
  1108. token : "constant.language.boolean",
  1109. regex : "(?:true|false)\\b"
  1110. }, {
  1111. token : keywordMapper,
  1112. regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  1113. }, {
  1114. token : "punctuation.separator.key-value",
  1115. regex : "=>"
  1116. }, {
  1117. stateName: "heredoc",
  1118. onMatch : function(value, currentState, stack) {
  1119. var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
  1120. var tokens = value.split(this.splitRegex);
  1121. stack.push(next, tokens[3]);
  1122. return [
  1123. {type:"constant", value: tokens[1]},
  1124. {type:"string", value: tokens[2]},
  1125. {type:"support.class", value: tokens[3]},
  1126. {type:"string", value: tokens[4]}
  1127. ];
  1128. },
  1129. regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
  1130. rules: {
  1131. heredoc: [{
  1132. onMatch: function(value, currentState, stack) {
  1133. if (value === stack[1]) {
  1134. stack.shift();
  1135. stack.shift();
  1136. this.next = stack[0] || "start";
  1137. return "support.class";
  1138. }
  1139. this.next = "";
  1140. return "string";
  1141. },
  1142. regex: ".*$",
  1143. next: "start"
  1144. }],
  1145. indentedHeredoc: [{
  1146. token: "string",
  1147. regex: "^ +"
  1148. }, {
  1149. onMatch: function(value, currentState, stack) {
  1150. if (value === stack[1]) {
  1151. stack.shift();
  1152. stack.shift();
  1153. this.next = stack[0] || "start";
  1154. return "support.class";
  1155. }
  1156. this.next = "";
  1157. return "string";
  1158. },
  1159. regex: ".*$",
  1160. next: "start"
  1161. }]
  1162. }
  1163. }, {
  1164. regex : "$",
  1165. token : "empty",
  1166. next : function(currentState, stack) {
  1167. if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
  1168. return stack[0];
  1169. return currentState;
  1170. }
  1171. }, {
  1172. token : "string.character",
  1173. regex : "\\B\\?."
  1174. }, {
  1175. token : "keyword.operator",
  1176. regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
  1177. }, {
  1178. token : "paren.lparen",
  1179. regex : "[[({]"
  1180. }, {
  1181. token : "paren.rparen",
  1182. regex : "[\\])}]"
  1183. }, {
  1184. token : "text",
  1185. regex : "\\s+"
  1186. }
  1187. ],
  1188. "comment" : [
  1189. {
  1190. token : "comment", // closing comment
  1191. regex : "^=end(?:$|\\s.*$)",
  1192. next : "start"
  1193. }, {
  1194. token : "comment", // comment spanning whole line
  1195. regex : ".+"
  1196. }
  1197. ]
  1198. };
  1199. this.normalizeRules();
  1200. };
  1201. oop.inherits(RubyHighlightRules, TextHighlightRules);
  1202. exports.RubyHighlightRules = RubyHighlightRules;
  1203. });
  1204. ace.define("ace/mode/haml_highlight_rules",[], function(require, exports, module) {
  1205. "use strict";
  1206. var oop = require("../lib/oop");
  1207. var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
  1208. var RubyExports = require("./ruby_highlight_rules");
  1209. var RubyHighlightRules = RubyExports.RubyHighlightRules;
  1210. var HamlHighlightRules = function() {
  1211. HtmlHighlightRules.call(this);
  1212. this.$rules = {
  1213. "start": [
  1214. {
  1215. token: "comment.block", // multiline HTML comment
  1216. regex: /^\/$/,
  1217. next: "comment"
  1218. },
  1219. {
  1220. token: "comment.block", // multiline HAML comment
  1221. regex: /^\-#$/,
  1222. next: "comment"
  1223. },
  1224. {
  1225. token: "comment.line", // HTML comment
  1226. regex: /\/\s*.*/
  1227. },
  1228. {
  1229. token: "comment.line", // HAML comment
  1230. regex: /-#\s*.*/
  1231. },
  1232. {
  1233. token: "keyword.other.doctype",
  1234. regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
  1235. },
  1236. RubyExports.qString,
  1237. RubyExports.qqString,
  1238. RubyExports.tString,
  1239. {
  1240. token: "meta.tag.haml",
  1241. regex: /(%[\w:\-]+)/
  1242. },
  1243. {
  1244. token: "keyword.attribute-name.class.haml",
  1245. regex: /\.[\w-]+/
  1246. },
  1247. {
  1248. token: "keyword.attribute-name.id.haml",
  1249. regex: /#[\w-]+/,
  1250. next: "element_class"
  1251. },
  1252. RubyExports.constantNumericHex,
  1253. RubyExports.constantNumericFloat,
  1254. RubyExports.constantOtherSymbol,
  1255. {
  1256. token: "text",
  1257. regex: /=|-|~/,
  1258. next: "embedded_ruby"
  1259. }
  1260. ],
  1261. "element_class": [
  1262. {
  1263. token: "keyword.attribute-name.class.haml",
  1264. regex: /\.[\w-]+/
  1265. },
  1266. {
  1267. token: "punctuation.section",
  1268. regex: /\{/,
  1269. next: "element_attributes"
  1270. },
  1271. RubyExports.constantOtherSymbol,
  1272. {
  1273. token: "empty",
  1274. regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/])",
  1275. next: "start"
  1276. }
  1277. ],
  1278. "element_attributes": [
  1279. RubyExports.constantOtherSymbol,
  1280. RubyExports.qString,
  1281. RubyExports.qqString,
  1282. RubyExports.tString,
  1283. RubyExports.constantNumericHex,
  1284. RubyExports.constantNumericFloat,
  1285. {
  1286. token: "punctuation.section",
  1287. regex: /$|\}/,
  1288. next: "start"
  1289. }
  1290. ],
  1291. "embedded_ruby": [
  1292. RubyExports.constantNumericHex,
  1293. RubyExports.constantNumericFloat,
  1294. RubyExports.instanceVariable,
  1295. RubyExports.qString,
  1296. RubyExports.qqString,
  1297. RubyExports.tString,
  1298. {
  1299. token : "support.class", // class name
  1300. regex : "[A-Z][a-zA-Z_\\d]+"
  1301. },
  1302. {
  1303. token : new RubyHighlightRules().getKeywords(),
  1304. regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  1305. },
  1306. {
  1307. token : ["keyword", "text", "text"],
  1308. regex : "(?:do|\\{)(?: \\|[^|]+\\|)?$",
  1309. next : "start"
  1310. },
  1311. {
  1312. token : ["text"],
  1313. regex : "^$",
  1314. next : "start"
  1315. },
  1316. {
  1317. token : ["text"],
  1318. regex : "^(?!.*\\|\\s*$)",
  1319. next : "start"
  1320. }
  1321. ],
  1322. "comment": [
  1323. {
  1324. token: "comment.block",
  1325. regex: /^$/,
  1326. next: "start"
  1327. },
  1328. {
  1329. token: "comment.block", // comment spanning the whole line
  1330. regex: /\s+.*/
  1331. }
  1332. ]
  1333. };
  1334. this.normalizeRules();
  1335. };
  1336. oop.inherits(HamlHighlightRules, HtmlHighlightRules);
  1337. exports.HamlHighlightRules = HamlHighlightRules;
  1338. });
  1339. ace.define("ace/mode/folding/coffee",[], function(require, exports, module) {
  1340. "use strict";
  1341. var oop = require("../../lib/oop");
  1342. var BaseFoldMode = require("./fold_mode").FoldMode;
  1343. var Range = require("../../range").Range;
  1344. var FoldMode = exports.FoldMode = function() {};
  1345. oop.inherits(FoldMode, BaseFoldMode);
  1346. (function() {
  1347. this.getFoldWidgetRange = function(session, foldStyle, row) {
  1348. var range = this.indentationBlock(session, row);
  1349. if (range)
  1350. return range;
  1351. var re = /\S/;
  1352. var line = session.getLine(row);
  1353. var startLevel = line.search(re);
  1354. if (startLevel == -1 || line[startLevel] != "#")
  1355. return;
  1356. var startColumn = line.length;
  1357. var maxRow = session.getLength();
  1358. var startRow = row;
  1359. var endRow = row;
  1360. while (++row < maxRow) {
  1361. line = session.getLine(row);
  1362. var level = line.search(re);
  1363. if (level == -1)
  1364. continue;
  1365. if (line[level] != "#")
  1366. break;
  1367. endRow = row;
  1368. }
  1369. if (endRow > startRow) {
  1370. var endColumn = session.getLine(endRow).length;
  1371. return new Range(startRow, startColumn, endRow, endColumn);
  1372. }
  1373. };
  1374. this.getFoldWidget = function(session, foldStyle, row) {
  1375. var line = session.getLine(row);
  1376. var indent = line.search(/\S/);
  1377. var next = session.getLine(row + 1);
  1378. var prev = session.getLine(row - 1);
  1379. var prevIndent = prev.search(/\S/);
  1380. var nextIndent = next.search(/\S/);
  1381. if (indent == -1) {
  1382. session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
  1383. return "";
  1384. }
  1385. if (prevIndent == -1) {
  1386. if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
  1387. session.foldWidgets[row - 1] = "";
  1388. session.foldWidgets[row + 1] = "";
  1389. return "start";
  1390. }
  1391. } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
  1392. if (session.getLine(row - 2).search(/\S/) == -1) {
  1393. session.foldWidgets[row - 1] = "start";
  1394. session.foldWidgets[row + 1] = "";
  1395. return "";
  1396. }
  1397. }
  1398. if (prevIndent!= -1 && prevIndent < indent)
  1399. session.foldWidgets[row - 1] = "start";
  1400. else
  1401. session.foldWidgets[row - 1] = "";
  1402. if (indent < nextIndent)
  1403. return "start";
  1404. else
  1405. return "";
  1406. };
  1407. }).call(FoldMode.prototype);
  1408. });
  1409. ace.define("ace/mode/haml",[], function(require, exports, module) {
  1410. "use strict";
  1411. var oop = require("../lib/oop");
  1412. var TextMode = require("./text").Mode;
  1413. var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
  1414. var FoldMode = require("./folding/coffee").FoldMode;
  1415. var Mode = function() {
  1416. this.HighlightRules = HamlHighlightRules;
  1417. this.foldingRules = new FoldMode();
  1418. this.$behaviour = this.$defaultBehaviour;
  1419. };
  1420. oop.inherits(Mode, TextMode);
  1421. (function() {
  1422. this.lineCommentStart = "//";
  1423. this.$id = "ace/mode/haml";
  1424. }).call(Mode.prototype);
  1425. exports.Mode = Mode;
  1426. });
  1427. (function() {
  1428. ace.require(["ace/mode/haml"], function(m) {
  1429. if (typeof module == "object" && typeof exports == "object" && module) {
  1430. module.exports = m;
  1431. }
  1432. });
  1433. })();