corrade-nucleus-nucleons – Blame information for rev 20
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { |
2 | "use strict"; |
||
3 | |||
4 | var oop = require("../lib/oop"); |
||
5 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; |
||
6 | |||
7 | var DocCommentHighlightRules = function() { |
||
8 | this.$rules = { |
||
9 | "start" : [ { |
||
10 | token : "comment.doc.tag", |
||
11 | regex : "@[\\w\\d_]+" // TODO: fix email addresses |
||
12 | }, |
||
13 | DocCommentHighlightRules.getTagRule(), |
||
14 | { |
||
15 | defaultToken : "comment.doc", |
||
16 | caseInsensitive: true |
||
17 | }] |
||
18 | }; |
||
19 | }; |
||
20 | |||
21 | oop.inherits(DocCommentHighlightRules, TextHighlightRules); |
||
22 | |||
23 | DocCommentHighlightRules.getTagRule = function(start) { |
||
24 | return { |
||
25 | token : "comment.doc.tag.storage.type", |
||
26 | regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" |
||
27 | }; |
||
28 | } |
||
29 | |||
30 | DocCommentHighlightRules.getStartRule = function(start) { |
||
31 | return { |
||
32 | token : "comment.doc", // doc comment |
||
33 | regex : "\\/\\*(?=\\*)", |
||
34 | next : start |
||
35 | }; |
||
36 | }; |
||
37 | |||
38 | DocCommentHighlightRules.getEndRule = function (start) { |
||
39 | return { |
||
40 | token : "comment.doc", // closing comment |
||
41 | regex : "\\*\\/", |
||
42 | next : start |
||
43 | }; |
||
44 | }; |
||
45 | |||
46 | |||
47 | exports.DocCommentHighlightRules = DocCommentHighlightRules; |
||
48 | |||
49 | }); |
||
50 | |||
51 | define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { |
||
52 | "use strict"; |
||
53 | |||
54 | var oop = require("../lib/oop"); |
||
55 | var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; |
||
56 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; |
||
57 | var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; |
||
58 | |||
59 | var JavaScriptHighlightRules = function(options) { |
||
60 | var keywordMapper = this.createKeywordMapper({ |
||
61 | "variable.language": |
||
62 | "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors |
||
63 | "Namespace|QName|XML|XMLList|" + // E4X |
||
64 | "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + |
||
65 | "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + |
||
66 | "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors |
||
67 | "SyntaxError|TypeError|URIError|" + |
||
68 | "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions |
||
69 | "isNaN|parseFloat|parseInt|" + |
||
70 | "JSON|Math|" + // Other |
||
71 | "this|arguments|prototype|window|document" , // Pseudo |
||
72 | "keyword": |
||
73 | "const|yield|import|get|set|async|await|" + |
||
74 | "break|case|catch|continue|default|delete|do|else|finally|for|function|" + |
||
75 | "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + |
||
76 | "__parent__|__count__|escape|unescape|with|__proto__|" + |
||
77 | "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", |
||
78 | "storage.type": |
||
79 | "const|let|var|function", |
||
80 | "constant.language": |
||
81 | "null|Infinity|NaN|undefined", |
||
82 | "support.function": |
||
83 | "alert", |
||
84 | "constant.language.boolean": "true|false" |
||
85 | }, "identifier"); |
||
86 | var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; |
||
87 | |||
88 | var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex |
||
89 | "u[0-9a-fA-F]{4}|" + // unicode |
||
90 | "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode |
||
91 | "[0-2][0-7]{0,2}|" + // oct |
||
92 | "3[0-7][0-7]?|" + // oct |
||
93 | "[4-7][0-7]?|" + //oct |
||
94 | ".)"; |
||
95 | |||
96 | this.$rules = { |
||
97 | "no_regex" : [ |
||
98 | DocCommentHighlightRules.getStartRule("doc-start"), |
||
99 | comments("no_regex"), |
||
100 | { |
||
101 | token : "string", |
||
102 | regex : "'(?=.)", |
||
103 | next : "qstring" |
||
104 | }, { |
||
105 | token : "string", |
||
106 | regex : '"(?=.)', |
||
107 | next : "qqstring" |
||
108 | }, { |
||
109 | token : "constant.numeric", // hex |
||
110 | regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/ |
||
111 | }, { |
||
112 | token : "constant.numeric", // float |
||
113 | regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ |
||
114 | }, { |
||
115 | token : [ |
||
116 | "storage.type", "punctuation.operator", "support.function", |
||
117 | "punctuation.operator", "entity.name.function", "text","keyword.operator" |
||
118 | ], |
||
119 | regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", |
||
120 | next: "function_arguments" |
||
121 | }, { |
||
122 | token : [ |
||
123 | "storage.type", "punctuation.operator", "entity.name.function", "text", |
||
124 | "keyword.operator", "text", "storage.type", "text", "paren.lparen" |
||
125 | ], |
||
126 | regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", |
||
127 | next: "function_arguments" |
||
128 | }, { |
||
129 | token : [ |
||
130 | "entity.name.function", "text", "keyword.operator", "text", "storage.type", |
||
131 | "text", "paren.lparen" |
||
132 | ], |
||
133 | regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", |
||
134 | next: "function_arguments" |
||
135 | }, { |
||
136 | token : [ |
||
137 | "storage.type", "punctuation.operator", "entity.name.function", "text", |
||
138 | "keyword.operator", "text", |
||
139 | "storage.type", "text", "entity.name.function", "text", "paren.lparen" |
||
140 | ], |
||
141 | regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", |
||
142 | next: "function_arguments" |
||
143 | }, { |
||
144 | token : [ |
||
145 | "storage.type", "text", "entity.name.function", "text", "paren.lparen" |
||
146 | ], |
||
147 | regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", |
||
148 | next: "function_arguments" |
||
149 | }, { |
||
150 | token : [ |
||
151 | "entity.name.function", "text", "punctuation.operator", |
||
152 | "text", "storage.type", "text", "paren.lparen" |
||
153 | ], |
||
154 | regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", |
||
155 | next: "function_arguments" |
||
156 | }, { |
||
157 | token : [ |
||
158 | "text", "text", "storage.type", "text", "paren.lparen" |
||
159 | ], |
||
160 | regex : "(:)(\\s*)(function)(\\s*)(\\()", |
||
161 | next: "function_arguments" |
||
162 | }, { |
||
163 | token : "keyword", |
||
164 | regex : "(?:" + kwBeforeRe + ")\\b", |
||
165 | next : "start" |
||
166 | }, { |
||
167 | token : ["support.constant"], |
||
168 | regex : /that\b/ |
||
169 | }, { |
||
170 | token : ["storage.type", "punctuation.operator", "support.function.firebug"], |
||
171 | regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ |
||
172 | }, { |
||
173 | token : keywordMapper, |
||
174 | regex : identifierRe |
||
175 | }, { |
||
176 | token : "punctuation.operator", |
||
177 | regex : /[.](?![.])/, |
||
178 | next : "property" |
||
179 | }, { |
||
180 | token : "keyword.operator", |
||
181 | regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,+=?|> |
||
182 | <+=?|> next : "start"+=?|> |
||
183 | <+=?|> }, {+=?|> |
||
184 | <+=?|> token : "punctuation.operator",+=?|> |
||
185 | <+=?|> regex : /[?:,;.]/,+=?|> |
||
186 | <+=?|> next : "start"+=?|> |
||
187 | <+=?|> }, {+=?|> |
||
188 | <+=?|> token : "paren.lparen",+=?|> |
||
189 | <+=?|> regex : /[\[({]/,+=?|> |
||
190 | <+=?|> next : "start"+=?|> |
||
191 | <+=?|> }, {+=?|> |
||
192 | <+=?|> token : "paren.rparen",+=?|> |
||
193 | <+=?|> regex : /[\])}]/+=?|> |
||
194 | <+=?|> }, {+=?|> |
||
195 | <+=?|> token: "comment",+=?|> |
||
196 | <+=?|> regex: /^#!.*$/+=?|> |
||
197 | <+=?|> }+=?|> |
||
198 | <+=?|> ],+=?|> |
||
199 | <+=?|> property: [{+=?|> |
||
200 | <+=?|> token : "text",+=?|> |
||
201 | <+=?|> regex : "\\s+"+=?|> |
||
202 | <+=?|> }, {+=?|> |
||
203 | <+=?|> token : [+=?|> |
||
204 | <+=?|> "storage.type", "punctuation.operator", "entity.name.function", "text",+=?|> |
||
205 | <+=?|> "keyword.operator", "text",+=?|> |
||
206 | <+=?|> "storage.type", "text", "entity.name.function", "text", "paren.lparen"+=?|> |
||
207 | <+=?|> ],+=?|> |
||
208 | <+=?|> regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",+=?|> |
||
209 | <+=?|> next: "function_arguments"+=?|> |
||
210 | <+=?|> }, {+=?|> |
||
211 | <+=?|> token : "punctuation.operator",+=?|> |
||
212 | <+=?|> regex : /[.](?![.])/+=?|> |
||
213 | <+=?|> }, {+=?|> |
||
214 | <+=?|> token : "support.function",+=?|> |
||
215 | <+=?|> 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(?=\()/+=?|> |
||
216 | <+=?|> }, {+=?|> |
||
217 | <+=?|> token : "support.function.dom",+=?|> |
||
218 | <+=?|> 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(?=\()/+=?|> |
||
219 | <+=?|> }, {+=?|> |
||
220 | <+=?|> token : "support.constant",+=?|> |
||
221 | <+=?|> 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/+=?|> |
||
222 | <+=?|> }, {+=?|> |
||
223 | <+=?|> token : "identifier",+=?|> |
||
224 | <+=?|> regex : identifierRe+=?|> |
||
225 | <+=?|> }, {+=?|> |
||
226 | <+=?|> regex: "",+=?|> |
||
227 | <+=?|> token: "empty",+=?|> |
||
228 | <+=?|> next: "no_regex"+=?|> |
||
229 | <+=?|> }+=?|> |
||
230 | <+=?|> ],+=?|> |
||
231 | <+=?|> "start": [+=?|> |
||
232 | <+=?|> DocCommentHighlightRules.getStartRule("doc-start"),+=?|> |
||
233 | <+=?|> comments("start"),+=?|> |
||
234 | <+=?|> {+=?|> |
||
235 | <+=?|> token: "string.regexp",+=?|> |
||
236 | <+=?|> regex: "\\/",+=?|> |
||
237 | <+=?|> next: "regex"+=?|> |
||
238 | <+=?|> }, {+=?|> |
||
239 | <+=?|> token : "text",+=?|> |
||
240 | <+=?|> regex : "\\s+|^$",+=?|> |
||
241 | <+=?|> next : "start"+=?|> |
||
242 | <+=?|> }, {+=?|> |
||
243 | <+=?|> token: "empty",+=?|> |
||
244 | <+=?|> regex: "",+=?|> |
||
245 | <+=?|> next: "no_regex"+=?|> |
||
246 | <+=?|> }+=?|> |
||
247 | <+=?|> ],+=?|> |
||
248 | <+=?|> "regex": [+=?|> |
||
249 | <+=?|> {+=?|> |
||
250 | <+=?|> token: "regexp.keyword.operator",+=?|> |
||
251 | <+=?|> regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"+=?|> |
||
252 | <+=?|> }, {+=?|> |
||
253 | <+=?|> token: "string.regexp",+=?|> |
||
254 | <+=?|> regex: "/[sxngimy]*",+=?|> |
||
255 | <+=?|> next: "no_regex"+=?|> |
||
256 | <+=?|> }, {+=?|> |
||
257 | <+=?|> token : "invalid",+=?|> |
||
258 | <+=?|> regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/+=?|> |
||
259 | <+=?|> }, {+=?|> |
||
260 | <+=?|> token : "constant.language.escape",+=?|> |
||
261 | <+=?|> regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/+=?|> |
||
262 | <+=?|> }, {+=?|> |
||
263 | <+=?|> token : "constant.language.delimiter",+=?|> |
||
264 | <+=?|> regex: /\|/+=?|> |
||
265 | <+=?|> }, {+=?|> |
||
266 | <+=?|> token: "constant.language.escape",+=?|> |
||
267 | <+=?|> regex: /\[\^?/,+=?|> |
||
268 | <+=?|> next: "regex_character_class"+=?|> |
||
269 | <+=?|> }, {+=?|> |
||
270 | <+=?|> token: "empty",+=?|> |
||
271 | <+=?|> regex: "$",+=?|> |
||
272 | <+=?|> next: "no_regex"+=?|> |
||
273 | <+=?|> }, {+=?|> |
||
274 | <+=?|> defaultToken: "string.regexp"+=?|> |
||
275 | <+=?|> }+=?|> |
||
276 | <+=?|> ],+=?|> |
||
277 | <+=?|> "regex_character_class": [+=?|> |
||
278 | <+=?|> {+=?|> |
||
279 | <+=?|> token: "regexp.charclass.keyword.operator",+=?|> |
||
280 | <+=?|> regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"+=?|> |
||
281 | <+=?|> }, {+=?|> |
||
282 | <+=?|> token: "constant.language.escape",+=?|> |
||
283 | <+=?|> regex: "]",+=?|> |
||
284 | <+=?|> next: "regex"+=?|> |
||
285 | <+=?|> }, {+=?|> |
||
286 | <+=?|> token: "constant.language.escape",+=?|> |
||
287 | <+=?|> regex: "-"+=?|> |
||
288 | <+=?|> }, {+=?|> |
||
289 | <+=?|> token: "empty",+=?|> |
||
290 | <+=?|> regex: "$",+=?|> |
||
291 | <+=?|> next: "no_regex"+=?|> |
||
292 | <+=?|> }, {+=?|> |
||
293 | <+=?|> defaultToken: "string.regexp.charachterclass"+=?|> |
||
294 | <+=?|> }+=?|> |
||
295 | <+=?|> ],+=?|> |
||
296 | <+=?|> "function_arguments": [+=?|> |
||
297 | <+=?|> {+=?|> |
||
298 | <+=?|> token: "variable.parameter",+=?|> |
||
299 | <+=?|> regex: identifierRe+=?|> |
||
300 | <+=?|> }, {+=?|> |
||
301 | <+=?|> token: "punctuation.operator",+=?|> |
||
302 | <+=?|> regex: "[, ]+"+=?|> |
||
303 | <+=?|> }, {+=?|> |
||
304 | <+=?|> token: "punctuation.operator",+=?|> |
||
305 | <+=?|> regex: "$"+=?|> |
||
306 | <+=?|> }, {+=?|> |
||
307 | <+=?|> token: "empty",+=?|> |
||
308 | <+=?|> regex: "",+=?|> |
||
309 | <+=?|> next: "no_regex"+=?|> |
||
310 | <+=?|> }+=?|> |
||
311 | <+=?|> ],+=?|> |
||
312 | <+=?|> "qqstring" : [+=?|> |
||
313 | <+=?|> {+=?|> |
||
314 | <+=?|> token : "constant.language.escape",+=?|> |
||
315 | <+=?|> regex : escapedRe+=?|> |
||
316 | <+=?|> }, {+=?|> |
||
317 | <+=?|> token : "string",+=?|> |
||
318 | <+=?|> regex : "\\\\$",+=?|> |
||
319 | <+=?|> next : "qqstring"+=?|> |
||
320 | <+=?|> }, {+=?|> |
||
321 | <+=?|> token : "string",+=?|> |
||
322 | <+=?|> regex : '"|$',+=?|> |
||
323 | <+=?|> next : "no_regex"+=?|> |
||
324 | <+=?|> }, {+=?|> |
||
325 | <+=?|> defaultToken: "string"+=?|> |
||
326 | <+=?|> }+=?|> |
||
327 | <+=?|> ],+=?|> |
||
328 | <+=?|> "qstring" : [+=?|> |
||
329 | <+=?|> {+=?|> |
||
330 | <+=?|> token : "constant.language.escape",+=?|> |
||
331 | <+=?|> regex : escapedRe+=?|> |
||
332 | <+=?|> }, {+=?|> |
||
333 | <+=?|> token : "string",+=?|> |
||
334 | <+=?|> regex : "\\\\$",+=?|> |
||
335 | <+=?|> next : "qstring"+=?|> |
||
336 | <+=?|> }, {+=?|> |
||
337 | <+=?|> token : "string",+=?|> |
||
338 | <+=?|> regex : "'|$",+=?|> |
||
339 | <+=?|> next : "no_regex"+=?|> |
||
340 | <+=?|> }, {+=?|> |
||
341 | <+=?|> defaultToken: "string"+=?|> |
||
342 | <+=?|> }+=?|> |
||
343 | <+=?|> ]+=?|> |
||
344 | <+=?|> };+=?|> |
||
345 | |||
346 | |||
347 | <+=?|> if (!options || !options.noES6) {+=?|> |
||
348 | <+=?|> this.$rules.no_regex.unshift({+=?|> |
||
349 | <+=?|> regex: "[{}]", onMatch: function(val, state, stack) {+=?|> |
||
350 | <+=?|> this.next = val == "{" ? this.nextState : "";+=?|> |
||
351 | <+=?|> if (val == "{" && stack.length) {+=?|> |
||
352 | <+=?|> stack.unshift("start", state);+=?|> |
||
353 | <+=?|> }+=?|> |
||
354 | <+=?|> else if (val == "}" && stack.length) {+=?|> |
||
355 | <+=?|> stack.shift();+=?|> |
||
356 | <+=?|> this.next = stack.shift();+=?|> |
||
357 | <+=?|> if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)+=?|> |
||
358 | <+=?|> return "paren.quasi.end";+=?|> |
||
359 | <+=?|> }+=?|> |
||
360 | <+=?|> return val == "{" ? "paren.lparen" : "paren.rparen";+=?|> |
||
361 | <+=?|> },+=?|> |
||
362 | <+=?|> nextState: "start"+=?|> |
||
363 | <+=?|> }, {+=?|> |
||
364 | <+=?|> token : "string.quasi.start",+=?|> |
||
365 | <+=?|> regex : /`/,+=?|> |
||
366 | <+=?|> push : [{+=?|> |
||
367 | <+=?|> token : "constant.language.escape",+=?|> |
||
368 | <+=?|> regex : escapedRe+=?|> |
||
369 | <+=?|> }, {+=?|> |
||
370 | <+=?|> token : "paren.quasi.start",+=?|> |
||
371 | <+=?|> regex : /\${/,+=?|> |
||
372 | <+=?|> push : "start"+=?|> |
||
373 | <+=?|> }, {+=?|> |
||
374 | <+=?|> token : "string.quasi.end",+=?|> |
||
375 | <+=?|> regex : /`/,+=?|> |
||
376 | <+=?|> next : "pop"+=?|> |
||
377 | <+=?|> }, {+=?|> |
||
378 | <+=?|> defaultToken: "string.quasi"+=?|> |
||
379 | <+=?|> }]+=?|> |
||
380 | <+=?|> });+=?|> |
||
381 | |||
382 | <+=?|> if (!options || options.jsx != false)+=?|> |
||
383 | <+=?|> JSX.call(this);+=?|> |
||
384 | <+=?|> }+=?|> |
||
385 | |||
386 | <+=?|> this.embedRules(DocCommentHighlightRules, "doc-",+=?|> |
||
387 | <+=?|> [ DocCommentHighlightRules.getEndRule("no_regex") ]);+=?|> |
||
388 | |||
389 | <+=?|> this.normalizeRules();+=?|> |
||
390 | <+=?|>};+=?|> |
||
391 | |||
392 | <+=?|>oop.inherits(JavaScriptHighlightRules, TextHighlightRules);+=?|> |
||
393 | |||
394 | <+=?|>function JSX() {+=?|> |
||
395 | <+=?|> var tagRegex = identifierRe.replace("\\d", "\\d\\-");+=?|> |
||
396 | <+=?|> var jsxTag = {+=?|> |
||
397 | <+=?|> onMatch : function(val, state, stack) {+=?|> |
||
398 | <+=?|> var offset = val.charAt(1) == "/" ? 2 : 1;+=?|> |
||
399 | <+=?|> if (offset == 1) {+=?|> |
||
400 | <+=?|> if (state != this.nextState)+=?|> |
||
401 | <+=?|> stack.unshift(this.next, this.nextState, 0);+=?|> |
||
402 | <+=?|> else+=?|> |
||
403 | <+=?|> stack.unshift(this.next);+=?|> |
||
404 | <+=?|> stack[2]++;+=?|> |
||
405 | <+=?|> } else if (offset == 2) {+=?|> |
||
406 | <+=?|> if (state == this.nextState) {+=?|> |
||
407 | <+=?|> stack[1]--;+=?|> |
||
408 | <+=?|> if (!stack[1] || stack[1] < 0) {+=?|> |
||
409 | <+=?|> stack.shift();+=?|> |
||
410 | <+=?|> stack.shift();+=?|> |
||
411 | <+=?|> }+=?|> |
||
412 | <+=?|> }+=?|> |
||
413 | <+=?|> }+=?|> |
||
414 | <+=?|> return [{+=?|> |
||
415 | <+=?|> type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",+=?|> |
||
416 | <+=?|> value: val.slice(0, offset)+=?|> |
||
417 | <+=?|> }, {+=?|> |
||
418 | <+=?|> type: "meta.tag.tag-name.xml",+=?|> |
||
419 | <+=?|> value: val.substr(offset)+=?|> |
||
420 | <+=?|> }];+=?|> |
||
421 | <+=?|> },+=?|> |
||
422 | <+=?|> regex : "</?" + tagRegex + "",+=?|> |
||
423 | <+=?|> next: "jsxAttributes",+=?|> |
||
424 | <+=?|> nextState: "jsx"+=?|> |
||
425 | <+=?|> };+=?|> |
||
426 | <+=?|> this.$rules.start.unshift(jsxTag);+=?|> |
||
427 | <+=?|> var jsxJsRule = {+=?|> |
||
428 | <+=?|> regex: "{",+=?|> |
||
429 | <+=?|> token: "paren.quasi.start",+=?|> |
||
430 | <+=?|> push: "start"+=?|> |
||
431 | <+=?|> };+=?|> |
||
432 | <+=?|> this.$rules.jsx = [+=?|> |
||
433 | <+=?|> jsxJsRule,+=?|> |
||
434 | <+=?|> jsxTag,+=?|> |
||
435 | <+=?|> {include : "reference"},+=?|> |
||
436 | <+=?|> {defaultToken: "string"}+=?|> |
||
437 | <+=?|> ];+=?|> |
||
438 | <+=?|> this.$rules.jsxAttributes = [{+=?|> |
||
439 | <+=?|> token : "meta.tag.punctuation.tag-close.xml", +=?|> |
||
440 | <+=?|> regex : "/?>", +=?|> |
||
441 | <+=?|> onMatch : function(value, currentState, stack) {+=?|> |
||
442 | <+=?|> if (currentState == stack[0])+=?|> |
||
443 | <+=?|> stack.shift();+=?|> |
||
444 | <+=?|> if (value.length == 2) {+=?|> |
||
445 | <+=?|> if (stack[0] == this.nextState)+=?|> |
||
446 | <+=?|> stack[1]--;+=?|> |
||
447 | <+=?|> if (!stack[1] || stack[1] < 0) {+=?|> |
||
448 | <+=?|> stack.splice(0, 2);+=?|> |
||
449 | <+=?|> }+=?|> |
||
450 | <+=?|> }+=?|> |
||
451 | <+=?|> this.next = stack[0] || "start";+=?|> |
||
452 | <+=?|> return [{type: this.token, value: value}];+=?|> |
||
453 | <+=?|> },+=?|> |
||
454 | <+=?|> nextState: "jsx"+=?|> |
||
455 | <+=?|> }, +=?|> |
||
456 | <+=?|> jsxJsRule,+=?|> |
||
457 | <+=?|> comments("jsxAttributes"),+=?|> |
||
458 | <+=?|> {+=?|> |
||
459 | <+=?|> token : "entity.other.attribute-name.xml",+=?|> |
||
460 | <+=?|> regex : tagRegex+=?|> |
||
461 | <+=?|> }, {+=?|> |
||
462 | <+=?|> token : "keyword.operator.attribute-equals.xml",+=?|> |
||
463 | <+=?|> regex : "="+=?|> |
||
464 | <+=?|> }, {+=?|> |
||
465 | <+=?|> token : "text.tag-whitespace.xml",+=?|> |
||
466 | <+=?|> regex : "\\s+"+=?|> |
||
467 | <+=?|> }, {+=?|> |
||
468 | <+=?|> token : "string.attribute-value.xml",+=?|> |
||
469 | <+=?|> regex : "'",+=?|> |
||
470 | <+=?|> stateName : "jsx_attr_q",+=?|> |
||
471 | <+=?|> push : [+=?|> |
||
472 | <+=?|> {token : "string.attribute-value.xml", regex: "'", next: "pop"},+=?|> |
||
473 | <+=?|> {include : "reference"},+=?|> |
||
474 | <+=?|> {defaultToken : "string.attribute-value.xml"}+=?|> |
||
475 | <+=?|> ]+=?|> |
||
476 | <+=?|> }, {+=?|> |
||
477 | <+=?|> token : "string.attribute-value.xml",+=?|> |
||
478 | <+=?|> regex : '"',+=?|> |
||
479 | <+=?|> stateName : "jsx_attr_qq",+=?|> |
||
480 | <+=?|> push : [+=?|> |
||
481 | <+=?|> {token : "string.attribute-value.xml", regex: '"', next: "pop"},+=?|> |
||
482 | <+=?|> {include : "reference"},+=?|> |
||
483 | <+=?|> {defaultToken : "string.attribute-value.xml"}+=?|> |
||
484 | <+=?|> ]+=?|> |
||
485 | <+=?|> },+=?|> |
||
486 | <+=?|> jsxTag+=?|> |
||
487 | <+=?|> ];+=?|> |
||
488 | <+=?|> this.$rules.reference = [{+=?|> |
||
489 | <+=?|> token : "constant.language.escape.reference.xml",+=?|> |
||
490 | <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"+=?|> |
||
491 | <+=?|> }];+=?|> |
||
492 | <+=?|>}+=?|> |
||
493 | |||
494 | <+=?|>function comments(next) {+=?|> |
||
495 | <+=?|> return [+=?|> |
||
496 | <+=?|> {+=?|> |
||
497 | <+=?|> token : "comment", // multi line comment+=?|> |
||
498 | <+=?|> regex : /\/\*/,+=?|> |
||
499 | <+=?|> next: [+=?|> |
||
500 | <+=?|> DocCommentHighlightRules.getTagRule(),+=?|> |
||
501 | <+=?|> {token : "comment", regex : "\\*\\/", next : next || "pop"},+=?|> |
||
502 | <+=?|> {defaultToken : "comment", caseInsensitive: true}+=?|> |
||
503 | <+=?|> ]+=?|> |
||
504 | <+=?|> }, {+=?|> |
||
505 | <+=?|> token : "comment",+=?|> |
||
506 | <+=?|> regex : "\\/\\/",+=?|> |
||
507 | <+=?|> next: [+=?|> |
||
508 | <+=?|> DocCommentHighlightRules.getTagRule(),+=?|> |
||
509 | <+=?|> {token : "comment", regex : "$|^", next : next || "pop"},+=?|> |
||
510 | <+=?|> {defaultToken : "comment", caseInsensitive: true}+=?|> |
||
511 | <+=?|> ]+=?|> |
||
512 | <+=?|> }+=?|> |
||
513 | <+=?|> ];+=?|> |
||
514 | <+=?|>}+=?|> |
||
515 | <+=?|>exports.JavaScriptHighlightRules = JavaScriptHighlightRules;+=?|> |
||
516 | <+=?|>});+=?|> |
||
517 | |||
518 | <+=?|>define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {+=?|> |
||
519 | <+=?|>"use strict";+=?|> |
||
520 | |||
521 | <+=?|>var oop = require("../lib/oop");+=?|> |
||
522 | <+=?|>var lang = require("../lib/lang");+=?|> |
||
523 | <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;+=?|> |
||
524 | <+=?|>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|min-height|min-width|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|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";+=?|> |
||
525 | <+=?|>var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";+=?|> |
||
526 | <+=?|>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";+=?|> |
||
527 | <+=?|>var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";+=?|> |
||
528 | <+=?|>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";+=?|> |
||
529 | |||
530 | <+=?|>var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";+=?|> |
||
531 | <+=?|>var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";+=?|> |
||
532 | <+=?|>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";+=?|> |
||
533 | |||
534 | <+=?|>var CssHighlightRules = function() {+=?|> |
||
535 | |||
536 | <+=?|> var keywordMapper = this.createKeywordMapper({+=?|> |
||
537 | <+=?|> "support.function": supportFunction,+=?|> |
||
538 | <+=?|> "support.constant": supportConstant,+=?|> |
||
539 | <+=?|> "support.type": supportType,+=?|> |
||
540 | <+=?|> "support.constant.color": supportConstantColor,+=?|> |
||
541 | <+=?|> "support.constant.fonts": supportConstantFonts+=?|> |
||
542 | <+=?|> }, "text", true);+=?|> |
||
543 | |||
544 | <+=?|> this.$rules = {+=?|> |
||
545 | <+=?|> "start" : [{+=?|> |
||
546 | <+=?|> token : "comment", // multi line comment+=?|> |
||
547 | <+=?|> regex : "\\/\\*",+=?|> |
||
548 | <+=?|> push : "comment"+=?|> |
||
549 | <+=?|> }, {+=?|> |
||
550 | <+=?|> token: "paren.lparen",+=?|> |
||
551 | <+=?|> regex: "\\{",+=?|> |
||
552 | <+=?|> push: "ruleset"+=?|> |
||
553 | <+=?|> }, {+=?|> |
||
554 | <+=?|> token: "string",+=?|> |
||
555 | <+=?|> regex: "@.*?{",+=?|> |
||
556 | <+=?|> push: "media"+=?|> |
||
557 | <+=?|> }, {+=?|> |
||
558 | <+=?|> token: "keyword",+=?|> |
||
559 | <+=?|> regex: "#[a-z0-9-_]+"+=?|> |
||
560 | <+=?|> }, {+=?|> |
||
561 | <+=?|> token: "variable",+=?|> |
||
562 | <+=?|> regex: "\\.[a-z0-9-_]+"+=?|> |
||
563 | <+=?|> }, {+=?|> |
||
564 | <+=?|> token: "string",+=?|> |
||
565 | <+=?|> regex: ":[a-z0-9-_]+"+=?|> |
||
566 | <+=?|> }, {+=?|> |
||
567 | <+=?|> token: "constant",+=?|> |
||
568 | <+=?|> regex: "[a-z0-9-_]+"+=?|> |
||
569 | <+=?|> }, {+=?|> |
||
570 | <+=?|> caseInsensitive: true+=?|> |
||
571 | <+=?|> }],+=?|> |
||
572 | |||
573 | <+=?|> "media" : [{+=?|> |
||
574 | <+=?|> token : "comment", // multi line comment+=?|> |
||
575 | <+=?|> regex : "\\/\\*",+=?|> |
||
576 | <+=?|> push : "comment"+=?|> |
||
577 | <+=?|> }, {+=?|> |
||
578 | <+=?|> token: "paren.lparen",+=?|> |
||
579 | <+=?|> regex: "\\{",+=?|> |
||
580 | <+=?|> push: "ruleset"+=?|> |
||
581 | <+=?|> }, {+=?|> |
||
582 | <+=?|> token: "string",+=?|> |
||
583 | <+=?|> regex: "\\}",+=?|> |
||
584 | <+=?|> next: "pop"+=?|> |
||
585 | <+=?|> }, {+=?|> |
||
586 | <+=?|> token: "keyword",+=?|> |
||
587 | <+=?|> regex: "#[a-z0-9-_]+"+=?|> |
||
588 | <+=?|> }, {+=?|> |
||
589 | <+=?|> token: "variable",+=?|> |
||
590 | <+=?|> regex: "\\.[a-z0-9-_]+"+=?|> |
||
591 | <+=?|> }, {+=?|> |
||
592 | <+=?|> token: "string",+=?|> |
||
593 | <+=?|> regex: ":[a-z0-9-_]+"+=?|> |
||
594 | <+=?|> }, {+=?|> |
||
595 | <+=?|> token: "constant",+=?|> |
||
596 | <+=?|> regex: "[a-z0-9-_]+"+=?|> |
||
597 | <+=?|> }, {+=?|> |
||
598 | <+=?|> caseInsensitive: true+=?|> |
||
599 | <+=?|> }],+=?|> |
||
600 | |||
601 | <+=?|> "comment" : [{+=?|> |
||
602 | <+=?|> token : "comment",+=?|> |
||
603 | <+=?|> regex : "\\*\\/",+=?|> |
||
604 | <+=?|> next : "pop"+=?|> |
||
605 | <+=?|> }, {+=?|> |
||
606 | <+=?|> defaultToken : "comment"+=?|> |
||
607 | <+=?|> }],+=?|> |
||
608 | |||
609 | <+=?|> "ruleset" : [+=?|> |
||
610 | <+=?|> {+=?|> |
||
611 | <+=?|> token : "paren.rparen",+=?|> |
||
612 | <+=?|> regex : "\\}",+=?|> |
||
613 | <+=?|> next: "pop"+=?|> |
||
614 | <+=?|> }, {+=?|> |
||
615 | <+=?|> token : "comment", // multi line comment+=?|> |
||
616 | <+=?|> regex : "\\/\\*",+=?|> |
||
617 | <+=?|> push : "comment"+=?|> |
||
618 | <+=?|> }, {+=?|> |
||
619 | <+=?|> token : "string", // single line+=?|> |
||
620 | <+=?|> regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'+=?|> |
||
621 | <+=?|> }, {+=?|> |
||
622 | <+=?|> token : "string", // single line+=?|> |
||
623 | <+=?|> regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"+=?|> |
||
624 | <+=?|> }, {+=?|> |
||
625 | <+=?|> token : ["constant.numeric", "keyword"],+=?|> |
||
626 | <+=?|> regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"+=?|> |
||
627 | <+=?|> }, {+=?|> |
||
628 | <+=?|> token : "constant.numeric",+=?|> |
||
629 | <+=?|> regex : numRe+=?|> |
||
630 | <+=?|> }, {+=?|> |
||
631 | <+=?|> token : "constant.numeric", // hex6 color+=?|> |
||
632 | <+=?|> regex : "#[a-f0-9]{6}"+=?|> |
||
633 | <+=?|> }, {+=?|> |
||
634 | <+=?|> token : "constant.numeric", // hex3 color+=?|> |
||
635 | <+=?|> regex : "#[a-f0-9]{3}"+=?|> |
||
636 | <+=?|> }, {+=?|> |
||
637 | <+=?|> token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],+=?|> |
||
638 | <+=?|> regex : pseudoElements+=?|> |
||
639 | <+=?|> }, {+=?|> |
||
640 | <+=?|> token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],+=?|> |
||
641 | <+=?|> regex : pseudoClasses+=?|> |
||
642 | <+=?|> }, {+=?|> |
||
643 | <+=?|> token : ["support.function", "string", "support.function"],+=?|> |
||
644 | <+=?|> regex : "(url\\()(.*)(\\))"+=?|> |
||
645 | <+=?|> }, {+=?|> |
||
646 | <+=?|> token : keywordMapper,+=?|> |
||
647 | <+=?|> regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"+=?|> |
||
648 | <+=?|> }, {+=?|> |
||
649 | <+=?|> caseInsensitive: true+=?|> |
||
650 | <+=?|> }]+=?|> |
||
651 | <+=?|> };+=?|> |
||
652 | |||
653 | <+=?|> this.normalizeRules();+=?|> |
||
654 | <+=?|>};+=?|> |
||
655 | |||
656 | <+=?|>oop.inherits(CssHighlightRules, TextHighlightRules);+=?|> |
||
657 | |||
658 | <+=?|>exports.CssHighlightRules = CssHighlightRules;+=?|> |
||
659 | |||
660 | <+=?|>});+=?|> |
||
661 | |||
662 | <+=?|>define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {+=?|> |
||
663 | <+=?|>"use strict";+=?|> |
||
664 | |||
665 | <+=?|>var oop = require("../lib/oop");+=?|> |
||
666 | <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;+=?|> |
||
667 | |||
668 | <+=?|>var XmlHighlightRules = function(normalize) {+=?|> |
||
669 | <+=?|> var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";+=?|> |
||
670 | |||
671 | <+=?|> this.$rules = {+=?|> |
||
672 | <+=?|> start : [+=?|> |
||
673 | <+=?|> {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},+=?|> |
||
674 | <+=?|> {+=?|> |
||
675 | <+=?|> token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],+=?|> |
||
676 | <+=?|> regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true+=?|> |
||
677 | <+=?|> },+=?|> |
||
678 | <+=?|> {+=?|> |
||
679 | <+=?|> token : ["punctuation.instruction.xml", "keyword.instruction.xml"],+=?|> |
||
680 | <+=?|> regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"+=?|> |
||
681 | <+=?|> },+=?|> |
||
682 | <+=?|> {token : "comment.xml", regex : "<\\!--", next : "comment"},+=?|> |
||
683 | <+=?|> {+=?|> |
||
684 | <+=?|> token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],+=?|> |
||
685 | <+=?|> regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true+=?|> |
||
686 | <+=?|> },+=?|> |
||
687 | <+=?|> {include : "tag"},+=?|> |
||
688 | <+=?|> {token : "text.end-tag-open.xml", regex: "</"},+=?|> |
||
689 | <+=?|> {token : "text.tag-open.xml", regex: "<"},+=?|> |
||
690 | <+=?|> {include : "reference"},+=?|> |
||
691 | <+=?|> {defaultToken : "text.xml"}+=?|> |
||
692 | <+=?|> ],+=?|> |
||
693 | |||
694 | <+=?|> xml_decl : [{+=?|> |
||
695 | <+=?|> token : "entity.other.attribute-name.decl-attribute-name.xml",+=?|> |
||
696 | <+=?|> regex : "(?:" + tagRegex + ":)?" + tagRegex + ""+=?|> |
||
697 | <+=?|> }, {+=?|> |
||
698 | <+=?|> token : "keyword.operator.decl-attribute-equals.xml",+=?|> |
||
699 | <+=?|> regex : "="+=?|> |
||
700 | <+=?|> }, {+=?|> |
||
701 | <+=?|> include: "whitespace"+=?|> |
||
702 | <+=?|> }, {+=?|> |
||
703 | <+=?|> include: "string"+=?|> |
||
704 | <+=?|> }, {+=?|> |
||
705 | <+=?|> token : "punctuation.xml-decl.xml",+=?|> |
||
706 | <+=?|> regex : "\\?>",+=?|> |
||
707 | <+=?|> next : "start"+=?|> |
||
708 | <+=?|> }],+=?|> |
||
709 | |||
710 | <+=?|> processing_instruction : [+=?|> |
||
711 | <+=?|> {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},+=?|> |
||
712 | <+=?|> {defaultToken : "instruction.xml"}+=?|> |
||
713 | <+=?|> ],+=?|> |
||
714 | |||
715 | <+=?|> doctype : [+=?|> |
||
716 | <+=?|> {include : "whitespace"},+=?|> |
||
717 | <+=?|> {include : "string"},+=?|> |
||
718 | <+=?|> {token : "xml-pe.doctype.xml", regex : ">", next : "start"},+=?|> |
||
719 | <+=?|> {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},+=?|> |
||
720 | <+=?|> {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}+=?|> |
||
721 | <+=?|> ],+=?|> |
||
722 | |||
723 | <+=?|> int_subset : [{+=?|> |
||
724 | <+=?|> token : "text.xml",+=?|> |
||
725 | <+=?|> regex : "\\s+"+=?|> |
||
726 | <+=?|> }, {+=?|> |
||
727 | <+=?|> token: "punctuation.int-subset.xml",+=?|> |
||
728 | <+=?|> regex: "]",+=?|> |
||
729 | <+=?|> next: "pop"+=?|> |
||
730 | <+=?|> }, {+=?|> |
||
731 | <+=?|> token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],+=?|> |
||
732 | <+=?|> regex : "(<\\!)(" + tagRegex + ")",+=?|> |
||
733 | <+=?|> push : [{+=?|> |
||
734 | <+=?|> token : "text",+=?|> |
||
735 | <+=?|> regex : "\\s+"+=?|> |
||
736 | <+=?|> },+=?|> |
||
737 | <+=?|> {+=?|> |
||
738 | <+=?|> token : "punctuation.markup-decl.xml",+=?|> |
||
739 | <+=?|> regex : ">",+=?|> |
||
740 | <+=?|> next : "pop"+=?|> |
||
741 | <+=?|> },+=?|> |
||
742 | <+=?|> {include : "string"}]+=?|> |
||
743 | <+=?|> }],+=?|> |
||
744 | |||
745 | <+=?|> cdata : [+=?|> |
||
746 | <+=?|> {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},+=?|> |
||
747 | <+=?|> {token : "text.xml", regex : "\\s+"},+=?|> |
||
748 | <+=?|> {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}+=?|> |
||
749 | <+=?|> ],+=?|> |
||
750 | |||
751 | <+=?|> comment : [+=?|> |
||
752 | <+=?|> {token : "comment.xml", regex : "-->", next : "start"},+=?|> |
||
753 | <+=?|> {defaultToken : "comment.xml"}+=?|> |
||
754 | <+=?|> ],+=?|> |
||
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 | |||
761 | <+=?|> attr_reference : [{+=?|> |
||
762 | <+=?|> token : "constant.language.escape.reference.attribute-value.xml",+=?|> |
||
763 | <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"+=?|> |
||
764 | <+=?|> }],+=?|> |
||
765 | |||
766 | <+=?|> tag : [{+=?|> |
||
767 | <+=?|> token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],+=?|> |
||
768 | <+=?|> regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",+=?|> |
||
769 | <+=?|> next: [+=?|> |
||
770 | <+=?|> {include : "attributes"},+=?|> |
||
771 | <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}+=?|> |
||
772 | <+=?|> ]+=?|> |
||
773 | <+=?|> }],+=?|> |
||
774 | |||
775 | <+=?|> tag_whitespace : [+=?|> |
||
776 | <+=?|> {token : "text.tag-whitespace.xml", regex : "\\s+"}+=?|> |
||
777 | <+=?|> ],+=?|> |
||
778 | <+=?|> whitespace : [+=?|> |
||
779 | <+=?|> {token : "text.whitespace.xml", regex : "\\s+"}+=?|> |
||
780 | <+=?|> ],+=?|> |
||
781 | <+=?|> string: [{+=?|> |
||
782 | <+=?|> token : "string.xml",+=?|> |
||
783 | <+=?|> regex : "'",+=?|> |
||
784 | <+=?|> push : [+=?|> |
||
785 | <+=?|> {token : "string.xml", regex: "'", next: "pop"},+=?|> |
||
786 | <+=?|> {defaultToken : "string.xml"}+=?|> |
||
787 | <+=?|> ]+=?|> |
||
788 | <+=?|> }, {+=?|> |
||
789 | <+=?|> token : "string.xml",+=?|> |
||
790 | <+=?|> regex : '"',+=?|> |
||
791 | <+=?|> push : [+=?|> |
||
792 | <+=?|> {token : "string.xml", regex: '"', next: "pop"},+=?|> |
||
793 | <+=?|> {defaultToken : "string.xml"}+=?|> |
||
794 | <+=?|> ]+=?|> |
||
795 | <+=?|> }],+=?|> |
||
796 | |||
797 | <+=?|> attributes: [{+=?|> |
||
798 | <+=?|> token : "entity.other.attribute-name.xml",+=?|> |
||
799 | <+=?|> regex : "(?:" + tagRegex + ":)?" + tagRegex + ""+=?|> |
||
800 | <+=?|> }, {+=?|> |
||
801 | <+=?|> token : "keyword.operator.attribute-equals.xml",+=?|> |
||
802 | <+=?|> regex : "="+=?|> |
||
803 | <+=?|> }, {+=?|> |
||
804 | <+=?|> include: "tag_whitespace"+=?|> |
||
805 | <+=?|> }, {+=?|> |
||
806 | <+=?|> include: "attribute_value"+=?|> |
||
807 | <+=?|> }],+=?|> |
||
808 | |||
809 | <+=?|> attribute_value: [{+=?|> |
||
810 | <+=?|> token : "string.attribute-value.xml",+=?|> |
||
811 | <+=?|> regex : "'",+=?|> |
||
812 | <+=?|> push : [+=?|> |
||
813 | <+=?|> {token : "string.attribute-value.xml", regex: "'", next: "pop"},+=?|> |
||
814 | <+=?|> {include : "attr_reference"},+=?|> |
||
815 | <+=?|> {defaultToken : "string.attribute-value.xml"}+=?|> |
||
816 | <+=?|> ]+=?|> |
||
817 | <+=?|> }, {+=?|> |
||
818 | <+=?|> token : "string.attribute-value.xml",+=?|> |
||
819 | <+=?|> regex : '"',+=?|> |
||
820 | <+=?|> push : [+=?|> |
||
821 | <+=?|> {token : "string.attribute-value.xml", regex: '"', next: "pop"},+=?|> |
||
822 | <+=?|> {include : "attr_reference"},+=?|> |
||
823 | <+=?|> {defaultToken : "string.attribute-value.xml"}+=?|> |
||
824 | <+=?|> ]+=?|> |
||
825 | <+=?|> }]+=?|> |
||
826 | <+=?|> };+=?|> |
||
827 | |||
828 | <+=?|> if (this.constructor === XmlHighlightRules)+=?|> |
||
829 | <+=?|> this.normalizeRules();+=?|> |
||
830 | <+=?|>};+=?|> |
||
831 | |||
832 | |||
833 | <+=?|>(function() {+=?|> |
||
834 | |||
835 | <+=?|> this.embedTagRules = function(HighlightRules, prefix, tag){+=?|> |
||
836 | <+=?|> this.$rules.tag.unshift({+=?|> |
||
837 | <+=?|> token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],+=?|> |
||
838 | <+=?|> regex : "(<)(" + tag + "(?=\\s|>|$))",+=?|> |
||
839 | <+=?|> next: [+=?|> |
||
840 | <+=?|> {include : "attributes"},+=?|> |
||
841 | <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}+=?|> |
||
842 | <+=?|> ]+=?|> |
||
843 | <+=?|> });+=?|> |
||
844 | |||
845 | <+=?|> this.$rules[tag + "-end"] = [+=?|> |
||
846 | <+=?|> {include : "attributes"},+=?|> |
||
847 | <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",+=?|> |
||
848 | <+=?|> onMatch : function(value, currentState, stack) {+=?|> |
||
849 | <+=?|> stack.splice(0);+=?|> |
||
850 | <+=?|> return this.token;+=?|> |
||
851 | <+=?|> }}+=?|> |
||
852 | <+=?|> ]+=?|> |
||
853 | |||
854 | <+=?|> this.embedRules(HighlightRules, prefix, [{+=?|> |
||
855 | <+=?|> token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],+=?|> |
||
856 | <+=?|> regex : "(</)(" + tag + "(?=\\s|>|$))",+=?|> |
||
857 | <+=?|> next: tag + "-end"+=?|> |
||
858 | <+=?|> }, {+=?|> |
||
859 | <+=?|> token: "string.cdata.xml",+=?|> |
||
860 | <+=?|> regex : "<\\!\\[CDATA\\["+=?|> |
||
861 | <+=?|> }, {+=?|> |
||
862 | <+=?|> token: "string.cdata.xml",+=?|> |
||
863 | <+=?|> regex : "\\]\\]>"+=?|> |
||
864 | <+=?|> }]);+=?|> |
||
865 | <+=?|> };+=?|> |
||
866 | |||
867 | <+=?|>}).call(TextHighlightRules.prototype);+=?|> |
||
868 | |||
869 | <+=?|>oop.inherits(XmlHighlightRules, TextHighlightRules);+=?|> |
||
870 | |||
871 | <+=?|>exports.XmlHighlightRules = XmlHighlightRules;+=?|> |
||
872 | <+=?|>});+=?|> |
||
873 | |||
874 | <+=?|>define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {+=?|> |
||
875 | <+=?|>"use strict";+=?|> |
||
876 | |||
877 | <+=?|>var oop = require("../lib/oop");+=?|> |
||
878 | <+=?|>var lang = require("../lib/lang");+=?|> |
||
879 | <+=?|>var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;+=?|> |
||
880 | <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;+=?|> |
||
881 | <+=?|>var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;+=?|> |
||
882 | |||
883 | <+=?|>var tagMap = lang.createMap({+=?|> |
||
884 | <+=?|> a : 'anchor',+=?|> |
||
885 | <+=?|> button : 'form',+=?|> |
||
886 | <+=?|> form : 'form',+=?|> |
||
887 | <+=?|> img : 'image',+=?|> |
||
888 | <+=?|> input : 'form',+=?|> |
||
889 | <+=?|> label : 'form',+=?|> |
||
890 | <+=?|> option : 'form',+=?|> |
||
891 | <+=?|> script : 'script',+=?|> |
||
892 | <+=?|> select : 'form',+=?|> |
||
893 | <+=?|> textarea : 'form',+=?|> |
||
894 | <+=?|> style : 'style',+=?|> |
||
895 | <+=?|> table : 'table',+=?|> |
||
896 | <+=?|> tbody : 'table',+=?|> |
||
897 | <+=?|> td : 'table',+=?|> |
||
898 | <+=?|> tfoot : 'table',+=?|> |
||
899 | <+=?|> th : 'table',+=?|> |
||
900 | <+=?|> tr : 'table'+=?|> |
||
901 | <+=?|>});+=?|> |
||
902 | |||
903 | <+=?|>var HtmlHighlightRules = function() {+=?|> |
||
904 | <+=?|> XmlHighlightRules.call(this);+=?|> |
||
905 | |||
906 | <+=?|> this.addRules({+=?|> |
||
907 | <+=?|> attributes: [{+=?|> |
||
908 | <+=?|> include : "tag_whitespace"+=?|> |
||
909 | <+=?|> }, {+=?|> |
||
910 | <+=?|> token : "entity.other.attribute-name.xml",+=?|> |
||
911 | <+=?|> regex : "[-_a-zA-Z0-9:.]+"+=?|> |
||
912 | <+=?|> }, {+=?|> |
||
913 | <+=?|> token : "keyword.operator.attribute-equals.xml",+=?|> |
||
914 | <+=?|> regex : "=",+=?|> |
||
915 | <+=?|> push : [{+=?|> |
||
916 | <+=?|> include: "tag_whitespace"+=?|> |
||
917 | <+=?|> }, {+=?|> |
||
918 | <+=?|> token : "string.unquoted.attribute-value.html",+=?|> |
||
919 | <+=?|> regex : "[^<>='\"`\\s]+",+=?|> |
||
920 | <+=?|> next : "pop"+=?|> |
||
921 | <+=?|> }, {+=?|> |
||
922 | <+=?|> token : "empty",+=?|> |
||
923 | <+=?|> regex : "",+=?|> |
||
924 | <+=?|> next : "pop"+=?|> |
||
925 | <+=?|> }]+=?|> |
||
926 | <+=?|> }, {+=?|> |
||
927 | <+=?|> include : "attribute_value"+=?|> |
||
928 | <+=?|> }],+=?|> |
||
929 | <+=?|> tag: [{+=?|> |
||
930 | <+=?|> token : function(start, tag) {+=?|> |
||
931 | <+=?|> var group = tagMap[tag];+=?|> |
||
932 | <+=?|> return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",+=?|> |
||
933 | <+=?|> "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];+=?|> |
||
934 | <+=?|> },+=?|> |
||
935 | <+=?|> regex : "(</?)([-_a-zA-Z0-9:.]+)",+=?|> |
||
936 | <+=?|> next: "tag_stuff"+=?|> |
||
937 | <+=?|> }],+=?|> |
||
938 | <+=?|> tag_stuff: [+=?|> |
||
939 | <+=?|> {include : "attributes"},+=?|> |
||
940 | <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}+=?|> |
||
941 | <+=?|> ]+=?|> |
||
942 | <+=?|> });+=?|> |
||
943 | |||
944 | <+=?|> this.embedTagRules(CssHighlightRules, "css-", "style");+=?|> |
||
945 | <+=?|> this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");+=?|> |
||
946 | |||
947 | <+=?|> if (this.constructor === HtmlHighlightRules)+=?|> |
||
948 | <+=?|> this.normalizeRules();+=?|> |
||
949 | <+=?|>};+=?|> |
||
950 | |||
951 | <+=?|>oop.inherits(HtmlHighlightRules, XmlHighlightRules);+=?|> |
||
952 | |||
953 | <+=?|>exports.HtmlHighlightRules = HtmlHighlightRules;+=?|> |
||
954 | <+=?|>});+=?|> |
||
955 | |||
956 | <+=?|>define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) {+=?|> |
||
957 | <+=?|>"use strict";+=?|> |
||
958 | |||
959 | <+=?|>var oop = require("../lib/oop");+=?|> |
||
960 | <+=?|>var lang = require("../lib/lang");+=?|> |
||
961 | <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;+=?|> |
||
962 | <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;+=?|> |
||
963 | <+=?|>var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;+=?|> |
||
964 | <+=?|>var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;+=?|> |
||
965 | <+=?|>var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;+=?|> |
||
966 | |||
967 | <+=?|>var escaped = function(ch) {+=?|> |
||
968 | <+=?|> return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";+=?|> |
||
969 | <+=?|>}+=?|> |
||
970 | |||
971 | <+=?|>function github_embed(tag, prefix) {+=?|> |
||
972 | <+=?|> return { // Github style block+=?|> |
||
973 | <+=?|> token : "support.function",+=?|> |
||
974 | <+=?|> regex : "^\\s*```" + tag + "\\s*$",+=?|> |
||
975 | <+=?|> push : prefix + "start"+=?|> |
||
976 | <+=?|> };+=?|> |
||
977 | <+=?|>}+=?|> |
||
978 | |||
979 | <+=?|>var MarkdownHighlightRules = function() {+=?|> |
||
980 | <+=?|> HtmlHighlightRules.call(this);+=?|> |
||
981 | |||
982 | <+=?|> this.$rules["start"].unshift({+=?|> |
||
983 | <+=?|> token : "empty_line",+=?|> |
||
984 | <+=?|> regex : '^$',+=?|> |
||
985 | <+=?|> next: "allowBlock"+=?|> |
||
986 | <+=?|> }, { // h1+=?|> |
||
987 | <+=?|> token: "markup.heading.1",+=?|> |
||
988 | <+=?|> regex: "^=+(?=\\s*$)"+=?|> |
||
989 | <+=?|> }, { // h2+=?|> |
||
990 | <+=?|> token: "markup.heading.2",+=?|> |
||
991 | <+=?|> regex: "^\\-+(?=\\s*$)"+=?|> |
||
992 | <+=?|> }, {+=?|> |
||
993 | <+=?|> token : function(value) {+=?|> |
||
994 | <+=?|> return "markup.heading." + value.length;+=?|> |
||
995 | <+=?|> },+=?|> |
||
996 | <+=?|> regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,+=?|> |
||
997 | <+=?|> next : "header"+=?|> |
||
998 | <+=?|> },+=?|> |
||
999 | <+=?|> github_embed("(?:javascript|js)", "jscode-"),+=?|> |
||
1000 | <+=?|> github_embed("xml", "xmlcode-"),+=?|> |
||
1001 | <+=?|> github_embed("html", "htmlcode-"),+=?|> |
||
1002 | <+=?|> github_embed("css", "csscode-"),+=?|> |
||
1003 | <+=?|> { // Github style block+=?|> |
||
1004 | <+=?|> token : "support.function",+=?|> |
||
1005 | <+=?|> regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",+=?|> |
||
1006 | <+=?|> next : "githubblock"+=?|> |
||
1007 | <+=?|> }, { // block quote+=?|> |
||
1008 | <+=?|> token : "string.blockquote",+=?|> |
||
1009 | <+=?|> regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",+=?|> |
||
1010 | <+=?|> next : "blockquote"+=?|> |
||
1011 | <+=?|> }, { // HR * - _+=?|> |
||
1012 | <+=?|> token : "constant",+=?|> |
||
1013 | <+=?|> regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",+=?|> |
||
1014 | <+=?|> next: "allowBlock"+=?|> |
||
1015 | <+=?|> }, { // list+=?|> |
||
1016 | <+=?|> token : "markup.list",+=?|> |
||
1017 | <+=?|> regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",+=?|> |
||
1018 | <+=?|> next : "listblock-start"+=?|> |
||
1019 | <+=?|> }, {+=?|> |
||
1020 | <+=?|> include : "basic"+=?|> |
||
1021 | <+=?|> });+=?|> |
||
1022 | |||
1023 | <+=?|> this.addRules({+=?|> |
||
1024 | <+=?|> "basic" : [{+=?|> |
||
1025 | <+=?|> token : "constant.language.escape",+=?|> |
||
1026 | <+=?|> regex : /\\[\\`*_{}\[\]()#+\-.!]/+=?|> |
||
1027 | <+=?|> }, { // code span `+=?|> |
||
1028 | <+=?|> token : "support.function",+=?|> |
||
1029 | <+=?|> regex : "(`+)(.*?[^`])(\\1)"+=?|> |
||
1030 | <+=?|> }, { // reference+=?|> |
||
1031 | <+=?|> token : ["text", "constant", "text", "url", "string", "text"],+=?|> |
||
1032 | <+=?|> regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"+=?|> |
||
1033 | <+=?|> }, { // link by reference+=?|> |
||
1034 | <+=?|> token : ["text", "string", "text", "constant", "text"],+=?|> |
||
1035 | <+=?|> regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])"+=?|> |
||
1036 | <+=?|> }, { // link by url+=?|> |
||
1037 | <+=?|> token : ["text", "string", "text", "markup.underline", "string", "text"],+=?|> |
||
1038 | <+=?|> regex : "(\\[)(" + // [+=?|> |
||
1039 | <+=?|> escaped("]") + // link text+=?|> |
||
1040 | <+=?|> ")(\\]\\()"+ // ](+=?|> |
||
1041 | <+=?|> '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href+=?|> |
||
1042 | <+=?|> '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"+=?|> |
||
1043 | <+=?|> "(\\))" // )+=?|> |
||
1044 | <+=?|> }, { // strong ** __+=?|> |
||
1045 | <+=?|> token : "string.strong",+=?|> |
||
1046 | <+=?|> regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"+=?|> |
||
1047 | <+=?|> }, { // emphasis * _+=?|> |
||
1048 | <+=?|> token : "string.emphasis",+=?|> |
||
1049 | <+=?|> regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"+=?|> |
||
1050 | <+=?|> }, { //+=?|> |
||
1051 | <+=?|> token : ["text", "url", "text"],+=?|> |
||
1052 | <+=?|> regex : "(<)("++=?|> |
||
1053 | <+=?|> "(?:https?|ftp|dict):[^'\">\\s]+"++=?|> |
||
1054 | <+=?|> "|"++=?|> |
||
1055 | <+=?|> "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"++=?|> |
||
1056 | <+=?|> ")(>)"+=?|> |
||
1057 | <+=?|> }],+=?|> |
||
1058 | <+=?|> "allowBlock": [+=?|> |
||
1059 | <+=?|> {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},+=?|> |
||
1060 | <+=?|> {token : "empty_line", regex : '^$', next: "allowBlock"},+=?|> |
||
1061 | <+=?|> {token : "empty", regex : "", next : "start"}+=?|> |
||
1062 | <+=?|> ],+=?|> |
||
1063 | |||
1064 | <+=?|> "header" : [{+=?|> |
||
1065 | <+=?|> regex: "$",+=?|> |
||
1066 | <+=?|> next : "start"+=?|> |
||
1067 | <+=?|> }, {+=?|> |
||
1068 | <+=?|> include: "basic"+=?|> |
||
1069 | <+=?|> }, {+=?|> |
||
1070 | <+=?|> defaultToken : "heading"+=?|> |
||
1071 | <+=?|> } ],+=?|> |
||
1072 | |||
1073 | <+=?|> "listblock-start" : [{+=?|> |
||
1074 | <+=?|> token : "support.variable",+=?|> |
||
1075 | <+=?|> regex : /(?:\[[ x]\])?/,+=?|> |
||
1076 | <+=?|> next : "listblock"+=?|> |
||
1077 | <+=?|> }],+=?|> |
||
1078 | |||
1079 | <+=?|> "listblock" : [ { // Lists only escape on completely blank lines.+=?|> |
||
1080 | <+=?|> token : "empty_line",+=?|> |
||
1081 | <+=?|> regex : "^$",+=?|> |
||
1082 | <+=?|> next : "start"+=?|> |
||
1083 | <+=?|> }, { // list+=?|> |
||
1084 | <+=?|> token : "markup.list",+=?|> |
||
1085 | <+=?|> regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",+=?|> |
||
1086 | <+=?|> next : "listblock-start"+=?|> |
||
1087 | <+=?|> }, {+=?|> |
||
1088 | <+=?|> include : "basic", noEscape: true+=?|> |
||
1089 | <+=?|> }, { // Github style block+=?|> |
||
1090 | <+=?|> token : "support.function",+=?|> |
||
1091 | <+=?|> regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",+=?|> |
||
1092 | <+=?|> next : "githubblock"+=?|> |
||
1093 | <+=?|> }, {+=?|> |
||
1094 | <+=?|> defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly+=?|> |
||
1095 | <+=?|> } ],+=?|> |
||
1096 | |||
1097 | <+=?|> "blockquote" : [ { // Blockquotes only escape on blank lines.+=?|> |
||
1098 | <+=?|> token : "empty_line",+=?|> |
||
1099 | <+=?|> regex : "^\\s*$",+=?|> |
||
1100 | <+=?|> next : "start"+=?|> |
||
1101 | <+=?|> }, { // block quote+=?|> |
||
1102 | <+=?|> token : "string.blockquote",+=?|> |
||
1103 | <+=?|> regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",+=?|> |
||
1104 | <+=?|> next : "blockquote"+=?|> |
||
1105 | <+=?|> }, {+=?|> |
||
1106 | <+=?|> include : "basic", noEscape: true+=?|> |
||
1107 | <+=?|> }, {+=?|> |
||
1108 | <+=?|> defaultToken : "string.blockquote"+=?|> |
||
1109 | <+=?|> } ],+=?|> |
||
1110 | |||
1111 | <+=?|> "githubblock" : [ {+=?|> |
||
1112 | <+=?|> token : "support.function",+=?|> |
||
1113 | <+=?|> regex : "^\\s*```",+=?|> |
||
1114 | <+=?|> next : "start"+=?|> |
||
1115 | <+=?|> }, {+=?|> |
||
1116 | <+=?|> token : "support.function",+=?|> |
||
1117 | <+=?|> regex : ".+"+=?|> |
||
1118 | <+=?|> } ]+=?|> |
||
1119 | <+=?|> });+=?|> |
||
1120 | |||
1121 | <+=?|> this.embedRules(JavaScriptHighlightRules, "jscode-", [{+=?|> |
||
1122 | <+=?|> token : "support.function",+=?|> |
||
1123 | <+=?|> regex : "^\\s*```",+=?|> |
||
1124 | <+=?|> next : "pop"+=?|> |
||
1125 | <+=?|> }]);+=?|> |
||
1126 | |||
1127 | <+=?|> this.embedRules(HtmlHighlightRules, "htmlcode-", [{+=?|> |
||
1128 | <+=?|> token : "support.function",+=?|> |
||
1129 | <+=?|> regex : "^\\s*```",+=?|> |
||
1130 | <+=?|> next : "pop"+=?|> |
||
1131 | <+=?|> }]);+=?|> |
||
1132 | |||
1133 | <+=?|> this.embedRules(CssHighlightRules, "csscode-", [{+=?|> |
||
1134 | <+=?|> token : "support.function",+=?|> |
||
1135 | <+=?|> regex : "^\\s*```",+=?|> |
||
1136 | <+=?|> next : "pop"+=?|> |
||
1137 | <+=?|> }]);+=?|> |
||
1138 | |||
1139 | <+=?|> this.embedRules(XmlHighlightRules, "xmlcode-", [{+=?|> |
||
1140 | <+=?|> token : "support.function",+=?|> |
||
1141 | <+=?|> regex : "^\\s*```",+=?|> |
||
1142 | <+=?|> next : "pop"+=?|> |
||
1143 | <+=?|> }]);+=?|> |
||
1144 | |||
1145 | <+=?|> this.normalizeRules();+=?|> |
||
1146 | <+=?|>};+=?|> |
||
1147 | <+=?|>oop.inherits(MarkdownHighlightRules, TextHighlightRules);+=?|> |
||
1148 | |||
1149 | <+=?|>exports.MarkdownHighlightRules = MarkdownHighlightRules;+=?|> |
||
1150 | <+=?|>});+=?|> |
||
1151 | |||
1152 | <+=?|>define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {+=?|> |
||
1153 | <+=?|>"use strict";+=?|> |
||
1154 | |||
1155 | <+=?|>exports.MaskHighlightRules = MaskHighlightRules;+=?|> |
||
1156 | |||
1157 | <+=?|>var oop = require("../lib/oop");+=?|> |
||
1158 | <+=?|>var lang = require("../lib/lang");+=?|> |
||
1159 | <+=?|>var TextRules = require("./text_highlight_rules").TextHighlightRules;+=?|> |
||
1160 | <+=?|>var JSRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;+=?|> |
||
1161 | <+=?|>var CssRules = require("./css_highlight_rules").CssHighlightRules;+=?|> |
||
1162 | <+=?|>var MDRules = require("./markdown_highlight_rules").MarkdownHighlightRules;+=?|> |
||
1163 | <+=?|>var HTMLRules = require("./html_highlight_rules").HtmlHighlightRules;+=?|> |
||
1164 | |||
1165 | <+=?|>var token_TAG = "keyword.support.constant.language",+=?|> |
||
1166 | <+=?|> token_COMPO = "support.function.markup.bold",+=?|> |
||
1167 | <+=?|> token_KEYWORD = "keyword",+=?|> |
||
1168 | <+=?|> token_LANG = "constant.language",+=?|> |
||
1169 | <+=?|> token_UTIL = "keyword.control.markup.italic",+=?|> |
||
1170 | <+=?|> token_ATTR = "support.variable.class",+=?|> |
||
1171 | <+=?|> token_PUNKT = "keyword.operator",+=?|> |
||
1172 | <+=?|> token_ITALIC = "markup.italic",+=?|> |
||
1173 | <+=?|> token_BOLD = "markup.bold",+=?|> |
||
1174 | <+=?|> token_LPARE = "paren.lparen",+=?|> |
||
1175 | <+=?|> token_RPARE = "paren.rparen";+=?|> |
||
1176 | |||
1177 | <+=?|>var const_FUNCTIONS,+=?|> |
||
1178 | <+=?|> const_KEYWORDS,+=?|> |
||
1179 | <+=?|> const_CONST,+=?|> |
||
1180 | <+=?|> const_TAGS;+=?|> |
||
1181 | <+=?|>(function(){+=?|> |
||
1182 | <+=?|> const_FUNCTIONS = lang.arrayToMap(+=?|> |
||
1183 | <+=?|> ("log").split("|")+=?|> |
||
1184 | <+=?|> );+=?|> |
||
1185 | <+=?|> const_CONST = lang.arrayToMap(+=?|> |
||
1186 | <+=?|> (":dualbind|:bind|:import|slot|event|style|html|markdown|md").split("|")+=?|> |
||
1187 | <+=?|> );+=?|> |
||
1188 | <+=?|> const_KEYWORDS = lang.arrayToMap(+=?|> |
||
1189 | <+=?|> ("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import").split("|")+=?|> |
||
1190 | <+=?|> );+=?|> |
||
1191 | <+=?|> const_TAGS = lang.arrayToMap(+=?|> |
||
1192 | <+=?|> ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + +=?|> |
||
1193 | <+=?|> "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + +=?|> |
||
1194 | <+=?|> "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + +=?|> |
||
1195 | <+=?|> "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + +=?|> |
||
1196 | <+=?|> "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + +=?|> |
||
1197 | <+=?|> "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + +=?|> |
||
1198 | <+=?|> "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + +=?|> |
||
1199 | <+=?|> "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + +=?|> |
||
1200 | <+=?|> "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")+=?|> |
||
1201 | <+=?|> );+=?|> |
||
1202 | <+=?|>}());+=?|> |
||
1203 | |||
1204 | <+=?|>function MaskHighlightRules () {+=?|> |
||
1205 | |||
1206 | <+=?|> this.$rules = {+=?|> |
||
1207 | <+=?|> "start" : [+=?|> |
||
1208 | <+=?|> Token("comment", "\\/\\/.*$"),+=?|> |
||
1209 | <+=?|> Token("comment", "\\/\\*", [+=?|> |
||
1210 | <+=?|> Token("comment", ".*?\\*\\/", "start"),+=?|> |
||
1211 | <+=?|> Token("comment", ".+")+=?|> |
||
1212 | <+=?|> ]),+=?|> |
||
1213 | |||
1214 | <+=?|> Blocks.string("'''"),+=?|> |
||
1215 | <+=?|> Blocks.string('"""'),+=?|> |
||
1216 | <+=?|> Blocks.string('"'),+=?|> |
||
1217 | <+=?|> Blocks.string("'"),+=?|> |
||
1218 | |||
1219 | <+=?|> Blocks.syntax(/(markdown|md)\b/, "md-multiline", "multiline"),+=?|> |
||
1220 | <+=?|> Blocks.syntax(/html\b/, "html-multiline", "multiline"),+=?|> |
||
1221 | <+=?|> Blocks.syntax(/(slot|event)\b/, "js-block", "block"),+=?|> |
||
1222 | <+=?|> Blocks.syntax(/style\b/, "css-block", "block"),+=?|> |
||
1223 | <+=?|> Blocks.syntax(/var\b/, "js-statement", "attr"),+=?|> |
||
1224 | |||
1225 | <+=?|> Blocks.tag(),+=?|> |
||
1226 | |||
1227 | <+=?|> Token(token_LPARE, "[[({>]"),+=?|> |
||
1228 | <+=?|> Token(token_RPARE, "[\\])};]", "start"),+=?|> |
||
1229 | <+=?|> {+=?|> |
||
1230 | <+=?|> caseInsensitive: true+=?|> |
||
1231 | <+=?|> }+=?|> |
||
1232 | <+=?|> ]+=?|> |
||
1233 | <+=?|> };+=?|> |
||
1234 | <+=?|> var rules = this;+=?|> |
||
1235 | |||
1236 | <+=?|> addJavaScript("interpolation", /\]/, token_RPARE + "." + token_ITALIC);+=?|> |
||
1237 | <+=?|> addJavaScript("statement", /\)|}|;/);+=?|> |
||
1238 | <+=?|> addJavaScript("block", /\}/);+=?|> |
||
1239 | <+=?|> addCss();+=?|> |
||
1240 | <+=?|> addMarkdown();+=?|> |
||
1241 | <+=?|> addHtml();+=?|> |
||
1242 | |||
1243 | <+=?|> function addJavaScript(name, escape, closeType) {+=?|> |
||
1244 | <+=?|> var prfx = "js-" + name + "-",+=?|> |
||
1245 | <+=?|> rootTokens = name === "block" ? ["start"] : ["start", "no_regex"];+=?|> |
||
1246 | <+=?|> add(+=?|> |
||
1247 | <+=?|> JSRules+=?|> |
||
1248 | <+=?|> , prfx+=?|> |
||
1249 | <+=?|> , escape+=?|> |
||
1250 | <+=?|> , rootTokens+=?|> |
||
1251 | <+=?|> , closeType+=?|> |
||
1252 | <+=?|> );+=?|> |
||
1253 | <+=?|> }+=?|> |
||
1254 | <+=?|> function addCss() {+=?|> |
||
1255 | <+=?|> add(CssRules, "css-block-", /\}/);+=?|> |
||
1256 | <+=?|> }+=?|> |
||
1257 | <+=?|> function addMarkdown() {+=?|> |
||
1258 | <+=?|> add(MDRules, "md-multiline-", /("""|''')/, []);+=?|> |
||
1259 | <+=?|> }+=?|> |
||
1260 | <+=?|> function addHtml() {+=?|> |
||
1261 | <+=?|> add(HTMLRules, "html-multiline-", /("""|''')/);+=?|> |
||
1262 | <+=?|> }+=?|> |
||
1263 | <+=?|> function add(Rules, strPrfx, rgxEnd, rootTokens, closeType) {+=?|> |
||
1264 | <+=?|> var next = "pop";+=?|> |
||
1265 | <+=?|> var tokens = rootTokens || [ "start" ];+=?|> |
||
1266 | <+=?|> if (tokens.length === 0) {+=?|> |
||
1267 | <+=?|> tokens = null;+=?|> |
||
1268 | <+=?|> }+=?|> |
||
1269 | <+=?|> if (/block|multiline/.test(strPrfx)) {+=?|> |
||
1270 | <+=?|> next = strPrfx + "end";+=?|> |
||
1271 | <+=?|> rules.$rules[next] = [+=?|> |
||
1272 | <+=?|> Token("empty", "", "start")+=?|> |
||
1273 | <+=?|> ];+=?|> |
||
1274 | <+=?|> }+=?|> |
||
1275 | <+=?|> rules.embedRules(+=?|> |
||
1276 | <+=?|> Rules+=?|> |
||
1277 | <+=?|> , strPrfx+=?|> |
||
1278 | <+=?|> , [ Token(closeType || token_RPARE, rgxEnd, next) ]+=?|> |
||
1279 | <+=?|> , tokens+=?|> |
||
1280 | <+=?|> , tokens == null ? true : false+=?|> |
||
1281 | <+=?|> );+=?|> |
||
1282 | <+=?|> }+=?|> |
||
1283 | |||
1284 | <+=?|> this.normalizeRules();+=?|> |
||
1285 | <+=?|>}+=?|> |
||
1286 | <+=?|>oop.inherits(MaskHighlightRules, TextRules);+=?|> |
||
1287 | |||
1288 | <+=?|>var Blocks = {+=?|> |
||
1289 | <+=?|> string: function(str, next){+=?|> |
||
1290 | <+=?|> var token = Token(+=?|> |
||
1291 | <+=?|> "string.start"+=?|> |
||
1292 | <+=?|> , str+=?|> |
||
1293 | <+=?|> , [+=?|> |
||
1294 | <+=?|> Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()),+=?|> |
||
1295 | <+=?|> Token("string.end", str, "pop"),+=?|> |
||
1296 | <+=?|> {+=?|> |
||
1297 | <+=?|> defaultToken: "string"+=?|> |
||
1298 | <+=?|> }+=?|> |
||
1299 | <+=?|> ]+=?|> |
||
1300 | <+=?|> , next+=?|> |
||
1301 | <+=?|> );+=?|> |
||
1302 | <+=?|> if (str.length === 1){+=?|> |
||
1303 | <+=?|> var escaped = Token("string.escape", "\\\\" + str);+=?|> |
||
1304 | <+=?|> token.push.unshift(escaped);+=?|> |
||
1305 | <+=?|> }+=?|> |
||
1306 | <+=?|> return token;+=?|> |
||
1307 | <+=?|> },+=?|> |
||
1308 | <+=?|> interpolation: function(){+=?|> |
||
1309 | <+=?|> return [+=?|> |
||
1310 | <+=?|> Token(token_UTIL, /\s*\w*\s*:/),+=?|> |
||
1311 | <+=?|> "js-interpolation-start"+=?|> |
||
1312 | <+=?|> ];+=?|> |
||
1313 | <+=?|> },+=?|> |
||
1314 | <+=?|> tagHead: function (rgx) {+=?|> |
||
1315 | <+=?|> return Token(token_ATTR, rgx, [+=?|> |
||
1316 | <+=?|> Token(token_ATTR, /[\w\-_]+/),+=?|> |
||
1317 | <+=?|> Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()),+=?|> |
||
1318 | <+=?|> Blocks.goUp()+=?|> |
||
1319 | <+=?|> ]);+=?|> |
||
1320 | <+=?|> },+=?|> |
||
1321 | <+=?|> tag: function () {+=?|> |
||
1322 | <+=?|> return {+=?|> |
||
1323 | <+=?|> token: 'tag',+=?|> |
||
1324 | <+=?|> onMatch : function(value) {+=?|> |
||
1325 | <+=?|> if (void 0 !== const_KEYWORDS[value])+=?|> |
||
1326 | <+=?|> return token_KEYWORD;+=?|> |
||
1327 | <+=?|> if (void 0 !== const_CONST[value])+=?|> |
||
1328 | <+=?|> return token_LANG;+=?|> |
||
1329 | <+=?|> if (void 0 !== const_FUNCTIONS[value])+=?|> |
||
1330 | <+=?|> return "support.function";+=?|> |
||
1331 | <+=?|> if (void 0 !== const_TAGS[value.toLowerCase()])+=?|> |
||
1332 | <+=?|> return token_TAG;+=?|> |
||
1333 | |||
1334 | <+=?|> return token_COMPO;+=?|> |
||
1335 | <+=?|> },+=?|> |
||
1336 | <+=?|> regex : /([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/,+=?|> |
||
1337 | <+=?|> push: [+=?|> |
||
1338 | <+=?|> Blocks.tagHead(/\./) ,+=?|> |
||
1339 | <+=?|> Blocks.tagHead(/#/) ,+=?|> |
||
1340 | <+=?|> Blocks.expression(),+=?|> |
||
1341 | <+=?|> Blocks.attribute(),+=?|> |
||
1342 | |||
1343 | <+=?|> Token(token_LPARE, /[;>{]/, "pop")+=?|> |
||
1344 | <+=?|> ]+=?|> |
||
1345 | <+=?|> };+=?|> |
||
1346 | <+=?|> },+=?|> |
||
1347 | <+=?|> syntax: function(rgx, next, type){+=?|> |
||
1348 | <+=?|> return {+=?|> |
||
1349 | <+=?|> token: token_LANG,+=?|> |
||
1350 | <+=?|> regex : rgx,+=?|> |
||
1351 | <+=?|> push: ({+=?|> |
||
1352 | <+=?|> "attr": [+=?|> |
||
1353 | <+=?|> next + "-start",+=?|> |
||
1354 | <+=?|> Token(token_PUNKT, /;/, "start")+=?|> |
||
1355 | <+=?|> ],+=?|> |
||
1356 | <+=?|> "multiline": [+=?|> |
||
1357 | <+=?|> Blocks.tagHead(/\./) ,+=?|> |
||
1358 | <+=?|> Blocks.tagHead(/#/) ,+=?|> |
||
1359 | <+=?|> Blocks.attribute(),+=?|> |
||
1360 | <+=?|> Blocks.expression(),+=?|> |
||
1361 | <+=?|> Token(token_LPARE, /[>\{]/),+=?|> |
||
1362 | <+=?|> Token(token_PUNKT, /;/, "start"),+=?|> |
||
1363 | <+=?|> Token(token_LPARE, /'''|"""/, [ next + "-start" ])+=?|> |
||
1364 | <+=?|> ],+=?|> |
||
1365 | <+=?|> "block": [+=?|> |
||
1366 | <+=?|> Blocks.tagHead(/\./) ,+=?|> |
||
1367 | <+=?|> Blocks.tagHead(/#/) ,+=?|> |
||
1368 | <+=?|> Blocks.attribute(),+=?|> |
||
1369 | <+=?|> Blocks.expression(),+=?|> |
||
1370 | <+=?|> Token(token_LPARE, /\{/, [ next + "-start" ])+=?|> |
||
1371 | <+=?|> ]+=?|> |
||
1372 | <+=?|> })[type]+=?|> |
||
1373 | <+=?|> };+=?|> |
||
1374 | <+=?|> },+=?|> |
||
1375 | <+=?|> attribute: function(){+=?|> |
||
1376 | <+=?|> return Token(function(value){+=?|> |
||
1377 | <+=?|> return /^x\-/.test(value)+=?|> |
||
1378 | <+=?|> ? token_ATTR + "." + token_BOLD+=?|> |
||
1379 | <+=?|> : token_ATTR;+=?|> |
||
1380 | <+=?|> }, /[\w_-]+/, [+=?|> |
||
1381 | <+=?|> Token(token_PUNKT, /\s*=\s*/, [+=?|> |
||
1382 | <+=?|> Blocks.string('"'),+=?|> |
||
1383 | <+=?|> Blocks.string("'"),+=?|> |
||
1384 | <+=?|> Blocks.word(),+=?|> |
||
1385 | <+=?|> Blocks.goUp()+=?|> |
||
1386 | <+=?|> ]),+=?|> |
||
1387 | <+=?|> Blocks.goUp()+=?|> |
||
1388 | <+=?|> ]);+=?|> |
||
1389 | <+=?|> },+=?|> |
||
1390 | <+=?|> expression: function(){+=?|> |
||
1391 | <+=?|> return Token(token_LPARE, /\(/, [ "js-statement-start" ]);+=?|> |
||
1392 | <+=?|> },+=?|> |
||
1393 | <+=?|> word: function(){+=?|> |
||
1394 | <+=?|> return Token("string", /[\w-_]+/);+=?|> |
||
1395 | <+=?|> },+=?|> |
||
1396 | <+=?|> goUp: function(){+=?|> |
||
1397 | <+=?|> return Token("text", "", "pop");+=?|> |
||
1398 | <+=?|> },+=?|> |
||
1399 | <+=?|> goStart: function(){+=?|> |
||
1400 | <+=?|> return Token("text", "", "start");+=?|> |
||
1401 | <+=?|> }+=?|> |
||
1402 | <+=?|>};+=?|> |
||
1403 | |||
1404 | |||
1405 | <+=?|>function Token(token, rgx, mix) {+=?|> |
||
1406 | <+=?|> var push, next, onMatch;+=?|> |
||
1407 | <+=?|> if (arguments.length === 4) {+=?|> |
||
1408 | <+=?|> push = mix;+=?|> |
||
1409 | <+=?|> next = arguments[3];+=?|> |
||
1410 | <+=?|> }+=?|> |
||
1411 | <+=?|> else if (typeof mix === "string") {+=?|> |
||
1412 | <+=?|> next = mix;+=?|> |
||
1413 | <+=?|> }+=?|> |
||
1414 | <+=?|> else {+=?|> |
||
1415 | <+=?|> push = mix;+=?|> |
||
1416 | <+=?|> }+=?|> |
||
1417 | <+=?|> if (typeof token === "function") {+=?|> |
||
1418 | <+=?|> onMatch = token;+=?|> |
||
1419 | <+=?|> token = "empty";+=?|> |
||
1420 | <+=?|> }+=?|> |
||
1421 | <+=?|> return {+=?|> |
||
1422 | <+=?|> token: token,+=?|> |
||
1423 | <+=?|> regex: rgx,+=?|> |
||
1424 | <+=?|> push: push,+=?|> |
||
1425 | <+=?|> next: next,+=?|> |
||
1426 | <+=?|> onMatch: onMatch+=?|> |
||
1427 | <+=?|> };+=?|> |
||
1428 | <+=?|>}+=?|> |
||
1429 | |||
1430 | <+=?|>});+=?|> |
||
1431 | |||
1432 | <+=?|>define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {+=?|> |
||
1433 | <+=?|>"use strict";+=?|> |
||
1434 | |||
1435 | <+=?|>var Range = require("../range").Range;+=?|> |
||
1436 | |||
1437 | <+=?|>var MatchingBraceOutdent = function() {};+=?|> |
||
1438 | |||
1439 | <+=?|>(function() {+=?|> |
||
1440 | |||
1441 | <+=?|> this.checkOutdent = function(line, input) {+=?|> |
||
1442 | <+=?|> if (! /^\s+$/.test(line))+=?|> |
||
1443 | <+=?|> return false;+=?|> |
||
1444 | |||
1445 | <+=?|> return /^\s*\}/.test(input);+=?|> |
||
1446 | <+=?|> };+=?|> |
||
1447 | |||
1448 | <+=?|> this.autoOutdent = function(doc, row) {+=?|> |
||
1449 | <+=?|> var line = doc.getLine(row);+=?|> |
||
1450 | <+=?|> var match = line.match(/^(\s*\})/);+=?|> |
||
1451 | |||
1452 | <+=?|> if (!match) return 0;+=?|> |
||
1453 | |||
1454 | <+=?|> var column = match[1].length;+=?|> |
||
1455 | <+=?|> var openBracePos = doc.findMatchingBracket({row: row, column: column});+=?|> |
||
1456 | |||
1457 | <+=?|> if (!openBracePos || openBracePos.row == row) return 0;+=?|> |
||
1458 | |||
1459 | <+=?|> var indent = this.$getIndent(doc.getLine(openBracePos.row));+=?|> |
||
1460 | <+=?|> doc.replace(new Range(row, 0, row, column-1), indent);+=?|> |
||
1461 | <+=?|> };+=?|> |
||
1462 | |||
1463 | <+=?|> this.$getIndent = function(line) {+=?|> |
||
1464 | <+=?|> return line.match(/^\s*/)[0];+=?|> |
||
1465 | <+=?|> };+=?|> |
||
1466 | |||
1467 | <+=?|>}).call(MatchingBraceOutdent.prototype);+=?|> |
||
1468 | |||
1469 | <+=?|>exports.MatchingBraceOutdent = MatchingBraceOutdent;+=?|> |
||
1470 | <+=?|>});+=?|> |
||
1471 | |||
1472 | <+=?|>define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {+=?|> |
||
1473 | <+=?|>"use strict";+=?|> |
||
1474 | |||
1475 | <+=?|>var oop = require("../../lib/oop");+=?|> |
||
1476 | <+=?|>var Behaviour = require("../behaviour").Behaviour;+=?|> |
||
1477 | <+=?|>var CstyleBehaviour = require("./cstyle").CstyleBehaviour;+=?|> |
||
1478 | <+=?|>var TokenIterator = require("../../token_iterator").TokenIterator;+=?|> |
||
1479 | |||
1480 | <+=?|>var CssBehaviour = function () {+=?|> |
||
1481 | |||
1482 | <+=?|> this.inherit(CstyleBehaviour);+=?|> |
||
1483 | |||
1484 | <+=?|> this.add("colon", "insertion", function (state, action, editor, session, text) {+=?|> |
||
1485 | <+=?|> if (text === ':') {+=?|> |
||
1486 | <+=?|> var cursor = editor.getCursorPosition();+=?|> |
||
1487 | <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);+=?|> |
||
1488 | <+=?|> var token = iterator.getCurrentToken();+=?|> |
||
1489 | <+=?|> if (token && token.value.match(/\s+/)) {+=?|> |
||
1490 | <+=?|> token = iterator.stepBackward();+=?|> |
||
1491 | <+=?|> }+=?|> |
||
1492 | <+=?|> if (token && token.type === 'support.type') {+=?|> |
||
1493 | <+=?|> var line = session.doc.getLine(cursor.row);+=?|> |
||
1494 | <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);+=?|> |
||
1495 | <+=?|> if (rightChar === ':') {+=?|> |
||
1496 | <+=?|> return {+=?|> |
||
1497 | <+=?|> text: '',+=?|> |
||
1498 | <+=?|> selection: [1, 1]+=?|> |
||
1499 | <+=?|> }+=?|> |
||
1500 | <+=?|> }+=?|> |
||
1501 | <+=?|> if (!line.substring(cursor.column).match(/^\s*;/)) {+=?|> |
||
1502 | <+=?|> return {+=?|> |
||
1503 | <+=?|> text: ':;',+=?|> |
||
1504 | <+=?|> selection: [1, 1]+=?|> |
||
1505 | <+=?|> }+=?|> |
||
1506 | <+=?|> }+=?|> |
||
1507 | <+=?|> }+=?|> |
||
1508 | <+=?|> }+=?|> |
||
1509 | <+=?|> });+=?|> |
||
1510 | |||
1511 | <+=?|> this.add("colon", "deletion", function (state, action, editor, session, range) {+=?|> |
||
1512 | <+=?|> var selected = session.doc.getTextRange(range);+=?|> |
||
1513 | <+=?|> if (!range.isMultiLine() && selected === ':') {+=?|> |
||
1514 | <+=?|> var cursor = editor.getCursorPosition();+=?|> |
||
1515 | <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);+=?|> |
||
1516 | <+=?|> var token = iterator.getCurrentToken();+=?|> |
||
1517 | <+=?|> if (token && token.value.match(/\s+/)) {+=?|> |
||
1518 | <+=?|> token = iterator.stepBackward();+=?|> |
||
1519 | <+=?|> }+=?|> |
||
1520 | <+=?|> if (token && token.type === 'support.type') {+=?|> |
||
1521 | <+=?|> var line = session.doc.getLine(range.start.row);+=?|> |
||
1522 | <+=?|> var rightChar = line.substring(range.end.column, range.end.column + 1);+=?|> |
||
1523 | <+=?|> if (rightChar === ';') {+=?|> |
||
1524 | <+=?|> range.end.column ++;+=?|> |
||
1525 | <+=?|> return range;+=?|> |
||
1526 | <+=?|> }+=?|> |
||
1527 | <+=?|> }+=?|> |
||
1528 | <+=?|> }+=?|> |
||
1529 | <+=?|> });+=?|> |
||
1530 | |||
1531 | <+=?|> this.add("semicolon", "insertion", function (state, action, editor, session, text) {+=?|> |
||
1532 | <+=?|> if (text === ';') {+=?|> |
||
1533 | <+=?|> var cursor = editor.getCursorPosition();+=?|> |
||
1534 | <+=?|> var line = session.doc.getLine(cursor.row);+=?|> |
||
1535 | <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);+=?|> |
||
1536 | <+=?|> if (rightChar === ';') {+=?|> |
||
1537 | <+=?|> return {+=?|> |
||
1538 | <+=?|> text: '',+=?|> |
||
1539 | <+=?|> selection: [1, 1]+=?|> |
||
1540 | <+=?|> }+=?|> |
||
1541 | <+=?|> }+=?|> |
||
1542 | <+=?|> }+=?|> |
||
1543 | <+=?|> });+=?|> |
||
1544 | |||
1545 | <+=?|>}+=?|> |
||
1546 | <+=?|>oop.inherits(CssBehaviour, CstyleBehaviour);+=?|> |
||
1547 | |||
1548 | <+=?|>exports.CssBehaviour = CssBehaviour;+=?|> |
||
1549 | <+=?|>});+=?|> |
||
1550 | |||
1551 | <+=?|>define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {+=?|> |
||
1552 | <+=?|>"use strict";+=?|> |
||
1553 | |||
1554 | <+=?|>var oop = require("../../lib/oop");+=?|> |
||
1555 | <+=?|>var Range = require("../../range").Range;+=?|> |
||
1556 | <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;+=?|> |
||
1557 | |||
1558 | <+=?|>var FoldMode = exports.FoldMode = function(commentRegex) {+=?|> |
||
1559 | <+=?|> if (commentRegex) {+=?|> |
||
1560 | <+=?|> this.foldingStartMarker = new RegExp(+=?|> |
||
1561 | <+=?|> this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)+=?|> |
||
1562 | <+=?|> );+=?|> |
||
1563 | <+=?|> this.foldingStopMarker = new RegExp(+=?|> |
||
1564 | <+=?|> this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)+=?|> |
||
1565 | <+=?|> );+=?|> |
||
1566 | <+=?|> }+=?|> |
||
1567 | <+=?|>};+=?|> |
||
1568 | <+=?|>oop.inherits(FoldMode, BaseFoldMode);+=?|> |
||
1569 | |||
1570 | <+=?|>(function() {+=?|> |
||
1571 | |||
1572 | <+=?|> this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;+=?|> |
||
1573 | <+=?|> this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;+=?|> |
||
1574 | <+=?|> this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;+=?|> |
||
1575 | <+=?|> this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;+=?|> |
||
1576 | <+=?|> this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;+=?|> |
||
1577 | <+=?|> this._getFoldWidgetBase = this.getFoldWidget;+=?|> |
||
1578 | <+=?|> this.getFoldWidget = function(session, foldStyle, row) {+=?|> |
||
1579 | <+=?|> var line = session.getLine(row);+=?|> |
||
1580 | |||
1581 | <+=?|> if (this.singleLineBlockCommentRe.test(line)) {+=?|> |
||
1582 | <+=?|> if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))+=?|> |
||
1583 | <+=?|> return "";+=?|> |
||
1584 | <+=?|> }+=?|> |
||
1585 | |||
1586 | <+=?|> var fw = this._getFoldWidgetBase(session, foldStyle, row);+=?|> |
||
1587 | |||
1588 | <+=?|> if (!fw && this.startRegionRe.test(line))+=?|> |
||
1589 | <+=?|> return "start"; // lineCommentRegionStart+=?|> |
||
1590 | |||
1591 | <+=?|> return fw;+=?|> |
||
1592 | <+=?|> };+=?|> |
||
1593 | |||
1594 | <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {+=?|> |
||
1595 | <+=?|> var line = session.getLine(row);+=?|> |
||
1596 | |||
1597 | <+=?|> if (this.startRegionRe.test(line))+=?|> |
||
1598 | <+=?|> return this.getCommentRegionBlock(session, line, row);+=?|> |
||
1599 | |||
1600 | <+=?|> var match = line.match(this.foldingStartMarker);+=?|> |
||
1601 | <+=?|> if (match) {+=?|> |
||
1602 | <+=?|> var i = match.index;+=?|> |
||
1603 | |||
1604 | <+=?|> if (match[1])+=?|> |
||
1605 | <+=?|> return this.openingBracketBlock(session, match[1], row, i);+=?|> |
||
1606 | |||
1607 | <+=?|> var range = session.getCommentFoldRange(row, i + match[0].length, 1);+=?|> |
||
1608 | |||
1609 | <+=?|> if (range && !range.isMultiLine()) {+=?|> |
||
1610 | <+=?|> if (forceMultiline) {+=?|> |
||
1611 | <+=?|> range = this.getSectionRange(session, row);+=?|> |
||
1612 | <+=?|> } else if (foldStyle != "all")+=?|> |
||
1613 | <+=?|> range = null;+=?|> |
||
1614 | <+=?|> }+=?|> |
||
1615 | |||
1616 | <+=?|> return range;+=?|> |
||
1617 | <+=?|> }+=?|> |
||
1618 | |||
1619 | <+=?|> if (foldStyle === "markbegin")+=?|> |
||
1620 | <+=?|> return;+=?|> |
||
1621 | |||
1622 | <+=?|> var match = line.match(this.foldingStopMarker);+=?|> |
||
1623 | <+=?|> if (match) {+=?|> |
||
1624 | <+=?|> var i = match.index + match[0].length;+=?|> |
||
1625 | |||
1626 | <+=?|> if (match[1])+=?|> |
||
1627 | <+=?|> return this.closingBracketBlock(session, match[1], row, i);+=?|> |
||
1628 | |||
1629 | <+=?|> return session.getCommentFoldRange(row, i, -1);+=?|> |
||
1630 | <+=?|> }+=?|> |
||
1631 | <+=?|> };+=?|> |
||
1632 | |||
1633 | <+=?|> this.getSectionRange = function(session, row) {+=?|> |
||
1634 | <+=?|> var line = session.getLine(row);+=?|> |
||
1635 | <+=?|> var startIndent = line.search(/\S/);+=?|> |
||
1636 | <+=?|> var startRow = row;+=?|> |
||
1637 | <+=?|> var startColumn = line.length;+=?|> |
||
1638 | <+=?|> row = row + 1;+=?|> |
||
1639 | <+=?|> var endRow = row;+=?|> |
||
1640 | <+=?|> var maxRow = session.getLength();+=?|> |
||
1641 | <+=?|> while (++row < maxRow) {+=?|> |
||
1642 | <+=?|> line = session.getLine(row);+=?|> |
||
1643 | <+=?|> var indent = line.search(/\S/);+=?|> |
||
1644 | <+=?|> if (indent === -1)+=?|> |
||
1645 | <+=?|> continue;+=?|> |
||
1646 | <+=?|> if (startIndent > indent)+=?|> |
||
1647 | <+=?|> break;+=?|> |
||
1648 | <+=?|> var subRange = this.getFoldWidgetRange(session, "all", row);+=?|> |
||
1649 | |||
1650 | <+=?|> if (subRange) {+=?|> |
||
1651 | <+=?|> if (subRange.start.row <= startRow) {+=?|> |
||
1652 | <+=?|> break;+=?|> |
||
1653 | <+=?|> } else if (subRange.isMultiLine()) {+=?|> |
||
1654 | <+=?|> row = subRange.end.row;+=?|> |
||
1655 | <+=?|> } else if (startIndent == indent) {+=?|> |
||
1656 | <+=?|> break;+=?|> |
||
1657 | <+=?|> }+=?|> |
||
1658 | <+=?|> }+=?|> |
||
1659 | <+=?|> endRow = row;+=?|> |
||
1660 | <+=?|> }+=?|> |
||
1661 | |||
1662 | <+=?|> return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);+=?|> |
||
1663 | <+=?|> };+=?|> |
||
1664 | <+=?|> this.getCommentRegionBlock = function(session, line, row) {+=?|> |
||
1665 | <+=?|> var startColumn = line.search(/\s*$/);+=?|> |
||
1666 | <+=?|> var maxRow = session.getLength();+=?|> |
||
1667 | <+=?|> var startRow = row;+=?|> |
||
1668 | |||
1669 | <+=?|> var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;+=?|> |
||
1670 | <+=?|> var depth = 1;+=?|> |
||
1671 | <+=?|> while (++row < maxRow) {+=?|> |
||
1672 | <+=?|> line = session.getLine(row);+=?|> |
||
1673 | <+=?|> var m = re.exec(line);+=?|> |
||
1674 | <+=?|> if (!m) continue;+=?|> |
||
1675 | <+=?|> if (m[1]) depth--;+=?|> |
||
1676 | <+=?|> else depth++;+=?|> |
||
1677 | |||
1678 | <+=?|> if (!depth) break;+=?|> |
||
1679 | <+=?|> }+=?|> |
||
1680 | |||
1681 | <+=?|> var endRow = row;+=?|> |
||
1682 | <+=?|> if (endRow > startRow) {+=?|> |
||
1683 | <+=?|> return new Range(startRow, startColumn, endRow, line.length);+=?|> |
||
1684 | <+=?|> }+=?|> |
||
1685 | <+=?|> };+=?|> |
||
1686 | |||
1687 | <+=?|>}).call(FoldMode.prototype);+=?|> |
||
1688 | |||
1689 | <+=?|>});+=?|> |
||
1690 | |||
1691 | <+=?|>define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {+=?|> |
||
1692 | <+=?|>"use strict";+=?|> |
||
1693 | |||
1694 | <+=?|>var oop = require("../lib/oop");+=?|> |
||
1695 | <+=?|>var TextMode = require("./text").Mode;+=?|> |
||
1696 | <+=?|>var MaskHighlightRules = require("./mask_highlight_rules").MaskHighlightRules;+=?|> |
||
1697 | <+=?|>var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;+=?|> |
||
1698 | <+=?|>var CssBehaviour = require("./behaviour/css").CssBehaviour;+=?|> |
||
1699 | <+=?|>var CStyleFoldMode = require("./folding/cstyle").FoldMode;+=?|> |
||
1700 | |||
1701 | <+=?|>var Mode = function() {+=?|> |
||
1702 | <+=?|> this.HighlightRules = MaskHighlightRules;+=?|> |
||
1703 | <+=?|> this.$outdent = new MatchingBraceOutdent();+=?|> |
||
1704 | <+=?|> this.$behaviour = new CssBehaviour();+=?|> |
||
1705 | <+=?|> this.foldingRules = new CStyleFoldMode();+=?|> |
||
1706 | <+=?|>};+=?|> |
||
1707 | <+=?|>oop.inherits(Mode, TextMode);+=?|> |
||
1708 | |||
1709 | <+=?|>(function() {+=?|> |
||
1710 | |||
1711 | <+=?|> this.lineCommentStart = "//";+=?|> |
||
1712 | <+=?|> this.blockComment = {start: "/*", end: "*/"};+=?|> |
||
1713 | |||
1714 | <+=?|> this.getNextLineIndent = function(state, line, tab) {+=?|> |
||
1715 | <+=?|> var indent = this.$getIndent(line);+=?|> |
||
1716 | <+=?|> var tokens = this.getTokenizer().getLineTokens(line, state).tokens;+=?|> |
||
1717 | <+=?|> if (tokens.length && tokens[tokens.length-1].type == "comment") {+=?|> |
||
1718 | <+=?|> return indent;+=?|> |
||
1719 | <+=?|> }+=?|> |
||
1720 | |||
1721 | <+=?|> var match = line.match(/^.*\{\s*$/);+=?|> |
||
1722 | <+=?|> if (match) {+=?|> |
||
1723 | <+=?|> indent += tab;+=?|> |
||
1724 | <+=?|> }+=?|> |
||
1725 | |||
1726 | <+=?|> return indent;+=?|> |
||
1727 | <+=?|> };+=?|> |
||
1728 | |||
1729 | <+=?|> this.checkOutdent = function(state, line, input) {+=?|> |
||
1730 | <+=?|> return this.$outdent.checkOutdent(line, input);+=?|> |
||
1731 | <+=?|> };+=?|> |
||
1732 | |||
1733 | <+=?|> this.autoOutdent = function(state, doc, row) {+=?|> |
||
1734 | <+=?|> this.$outdent.autoOutdent(doc, row);+=?|> |
||
1735 | <+=?|> };+=?|> |
||
1736 | |||
1737 | <+=?|> this.$id = "ace/mode/mask";+=?|> |
||
1738 | <+=?|>}).call(Mode.prototype);+=?|> |
||
1739 | |||
1740 | <+=?|>exports.Mode = Mode;+=?|> |
||
1741 | |||
1742 | <+=?|>});+=?|> |