mode-csound_document.js 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989
  1. ace.define("ace/mode/csound_preprocessor_highlight_rules",[], function(require, exports, module) {
  2. "use strict";
  3. var oop = require("../lib/oop");
  4. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  5. var CsoundPreprocessorHighlightRules = function() {
  6. this.semicolonComments = {
  7. token : "comment.line.semicolon.csound",
  8. regex : ";.*$"
  9. };
  10. this.comments = [
  11. {
  12. token : "punctuation.definition.comment.begin.csound",
  13. regex : "/\\*",
  14. push : [
  15. {
  16. token : "punctuation.definition.comment.end.csound",
  17. regex : "\\*/",
  18. next : "pop"
  19. }, {
  20. defaultToken: "comment.block.csound"
  21. }
  22. ]
  23. }, {
  24. token : "comment.line.double-slash.csound",
  25. regex : "//.*$"
  26. },
  27. this.semicolonComments
  28. ];
  29. this.macroUses = [
  30. {
  31. token : ["entity.name.function.preprocessor.csound", "punctuation.definition.macro-parameter-value-list.begin.csound"],
  32. regex : /(\$[A-Z_a-z]\w*\.?)(\()/,
  33. next : "macro parameter value list"
  34. }, {
  35. token : "entity.name.function.preprocessor.csound",
  36. regex : /\$[A-Z_a-z]\w*(?:\.|\b)/
  37. }
  38. ];
  39. this.numbers = [
  40. {
  41. token : "constant.numeric.float.csound",
  42. regex : /(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/
  43. }, {
  44. token : ["storage.type.number.csound", "constant.numeric.integer.hexadecimal.csound"],
  45. regex : /(0[Xx])([0-9A-Fa-f]+)/
  46. }, {
  47. token : "constant.numeric.integer.decimal.csound",
  48. regex : /\d+/
  49. }
  50. ];
  51. this.bracedStringContents = [
  52. {
  53. token : "constant.character.escape.csound",
  54. regex : /\\(?:[\\abnrt"]|[0-7]{1,3})/
  55. },
  56. {
  57. token : "constant.character.placeholder.csound",
  58. regex : /%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/
  59. }, {
  60. token : "constant.character.escape.csound",
  61. regex : /%%/
  62. }
  63. ];
  64. this.quotedStringContents = [
  65. this.macroUses,
  66. this.bracedStringContents
  67. ];
  68. var start = [
  69. this.comments,
  70. {
  71. token : "keyword.preprocessor.csound",
  72. regex : /#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/
  73. }, {
  74. token : "keyword.preprocessor.csound",
  75. regex : /#include/,
  76. push : [
  77. this.comments,
  78. {
  79. token : "string.csound",
  80. regex : /([^ \t])(?:.*?\1)/,
  81. next : "pop"
  82. }
  83. ]
  84. }, {
  85. token : "keyword.preprocessor.csound",
  86. regex : /#[ \t]*define/,
  87. next : "define directive"
  88. }, {
  89. token : "keyword.preprocessor.csound",
  90. regex : /#(?:ifn?def|undef)\b/,
  91. next : "macro directive"
  92. },
  93. this.macroUses
  94. ];
  95. this.$rules = {
  96. "start": start,
  97. "define directive": [
  98. this.comments,
  99. {
  100. token : "entity.name.function.preprocessor.csound",
  101. regex : /[A-Z_a-z]\w*/
  102. }, {
  103. token : "punctuation.definition.macro-parameter-name-list.begin.csound",
  104. regex : /\(/,
  105. next : "macro parameter name list"
  106. }, {
  107. token : "punctuation.definition.macro.begin.csound",
  108. regex : /#/,
  109. next : "macro body"
  110. }
  111. ],
  112. "macro parameter name list": [
  113. {
  114. token : "variable.parameter.preprocessor.csound",
  115. regex : /[A-Z_a-z]\w*/
  116. }, {
  117. token : "punctuation.definition.macro-parameter-name-list.end.csound",
  118. regex : /\)/,
  119. next : "define directive"
  120. }
  121. ],
  122. "macro body": [
  123. {
  124. token : "constant.character.escape.csound",
  125. regex : /\\#/
  126. }, {
  127. token : "punctuation.definition.macro.end.csound",
  128. regex : /#/,
  129. next : "start"
  130. },
  131. start
  132. ],
  133. "macro directive": [
  134. this.comments,
  135. {
  136. token : "entity.name.function.preprocessor.csound",
  137. regex : /[A-Z_a-z]\w*/,
  138. next : "start"
  139. }
  140. ],
  141. "macro parameter value list": [
  142. {
  143. token : "punctuation.definition.macro-parameter-value-list.end.csound",
  144. regex : /\)/,
  145. next : "start"
  146. }, {
  147. token : "punctuation.definition.string.begin.csound",
  148. regex : /"/,
  149. next : "macro parameter value quoted string"
  150. }, this.pushRule({
  151. token : "punctuation.macro-parameter-value-parenthetical.begin.csound",
  152. regex : /\(/,
  153. next : "macro parameter value parenthetical"
  154. }), {
  155. token : "punctuation.macro-parameter-value-separator.csound",
  156. regex : "[#']"
  157. }
  158. ],
  159. "macro parameter value quoted string": [
  160. {
  161. token : "constant.character.escape.csound",
  162. regex : /\\[#'()]/
  163. }, {
  164. token : "invalid.illegal.csound",
  165. regex : /[#'()]/
  166. }, {
  167. token : "punctuation.definition.string.end.csound",
  168. regex : /"/,
  169. next : "macro parameter value list"
  170. },
  171. this.quotedStringContents,
  172. {
  173. defaultToken: "string.quoted.csound"
  174. }
  175. ],
  176. "macro parameter value parenthetical": [
  177. {
  178. token : "constant.character.escape.csound",
  179. regex : /\\\)/
  180. }, this.popRule({
  181. token : "punctuation.macro-parameter-value-parenthetical.end.csound",
  182. regex : /\)/
  183. }), this.pushRule({
  184. token : "punctuation.macro-parameter-value-parenthetical.begin.csound",
  185. regex : /\(/,
  186. next : "macro parameter value parenthetical"
  187. }),
  188. start
  189. ]
  190. };
  191. };
  192. oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
  193. (function() {
  194. this.pushRule = function(params) {
  195. return {
  196. regex : params.regex, onMatch: function(value, currentState, stack, line) {
  197. if (stack.length === 0)
  198. stack.push(currentState);
  199. if (Array.isArray(params.next)) {
  200. for (var i = 0; i < params.next.length; i++) {
  201. stack.push(params.next[i]);
  202. }
  203. } else {
  204. stack.push(params.next);
  205. }
  206. this.next = stack[stack.length - 1];
  207. return params.token;
  208. },
  209. get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; },
  210. set next(next) {
  211. if (Array.isArray(params.next)) {
  212. var oldNext = params.next[params.next.length - 1];
  213. var oldNextIndex = oldNext.length - 1;
  214. var newNextIndex = next.length - 1;
  215. if (newNextIndex > oldNextIndex) {
  216. while (oldNextIndex >= 0 && newNextIndex >= 0) {
  217. if (oldNext.charAt(oldNextIndex) !== next.charAt(newNextIndex)) {
  218. var prefix = next.substr(0, newNextIndex);
  219. for (var i = 0; i < params.next.length; i++) {
  220. params.next[i] = prefix + params.next[i];
  221. }
  222. break;
  223. }
  224. oldNextIndex--;
  225. newNextIndex--;
  226. }
  227. }
  228. } else {
  229. params.next = next;
  230. }
  231. },
  232. get token() { return params.token; }
  233. };
  234. };
  235. this.popRule = function(params) {
  236. return {
  237. regex : params.regex, onMatch: function(value, currentState, stack, line) {
  238. stack.pop();
  239. if (params.next) {
  240. stack.push(params.next);
  241. this.next = stack[stack.length - 1];
  242. } else {
  243. this.next = stack.length > 1 ? stack[stack.length - 1] : stack.pop();
  244. }
  245. return params.token;
  246. }
  247. };
  248. };
  249. }).call(CsoundPreprocessorHighlightRules.prototype);
  250. exports.CsoundPreprocessorHighlightRules = CsoundPreprocessorHighlightRules;
  251. });
  252. ace.define("ace/mode/csound_score_highlight_rules",[], function(require, exports, module) {
  253. "use strict";
  254. var oop = require("../lib/oop");
  255. var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules;
  256. var CsoundScoreHighlightRules = function() {
  257. CsoundPreprocessorHighlightRules.call(this);
  258. this.quotedStringContents.push({
  259. token : "invalid.illegal.csound-score",
  260. regex : /[^"]*$/
  261. });
  262. var start = this.$rules.start;
  263. start.push(
  264. {
  265. token : "keyword.control.csound-score",
  266. regex : /[abCdefiqstvxy]/
  267. }, {
  268. token : "invalid.illegal.csound-score",
  269. regex : /w/
  270. }, {
  271. token : "constant.numeric.language.csound-score",
  272. regex : /z/
  273. }, {
  274. token : ["keyword.control.csound-score", "constant.numeric.integer.decimal.csound-score"],
  275. regex : /([nNpP][pP])(\d+)/
  276. }, {
  277. token : "keyword.other.csound-score",
  278. regex : /[mn]/,
  279. push : [
  280. {
  281. token : "empty",
  282. regex : /$/,
  283. next : "pop"
  284. },
  285. this.comments,
  286. {
  287. token : "entity.name.label.csound-score",
  288. regex : /[A-Z_a-z]\w*/
  289. }
  290. ]
  291. }, {
  292. token : "keyword.preprocessor.csound-score",
  293. regex : /r\b/,
  294. next : "repeat section"
  295. },
  296. this.numbers,
  297. {
  298. token : "keyword.operator.csound-score",
  299. regex : "[!+\\-*/^%&|<>#~.]"
  300. },
  301. this.pushRule({
  302. token : "punctuation.definition.string.begin.csound-score",
  303. regex : /"/,
  304. next : "quoted string"
  305. }),
  306. this.pushRule({
  307. token : "punctuation.braced-loop.begin.csound-score",
  308. regex : /{/,
  309. next : "loop after left brace"
  310. })
  311. );
  312. this.addRules({
  313. "repeat section": [
  314. {
  315. token : "empty",
  316. regex : /$/,
  317. next : "start"
  318. },
  319. this.comments,
  320. {
  321. token : "constant.numeric.integer.decimal.csound-score",
  322. regex : /\d+/,
  323. next : "repeat section before label"
  324. }
  325. ],
  326. "repeat section before label": [
  327. {
  328. token : "empty",
  329. regex : /$/,
  330. next : "start"
  331. },
  332. this.comments,
  333. {
  334. token : "entity.name.label.csound-score",
  335. regex : /[A-Z_a-z]\w*/,
  336. next : "start"
  337. }
  338. ],
  339. "quoted string": [
  340. this.popRule({
  341. token : "punctuation.definition.string.end.csound-score",
  342. regex : /"/
  343. }),
  344. this.quotedStringContents,
  345. {
  346. defaultToken: "string.quoted.csound-score"
  347. }
  348. ],
  349. "loop after left brace": [
  350. this.popRule({
  351. token : "constant.numeric.integer.decimal.csound-score",
  352. regex : /\d+/,
  353. next : "loop after repeat count"
  354. }),
  355. this.comments,
  356. {
  357. token : "invalid.illegal.csound",
  358. regex : /\S.*/
  359. }
  360. ],
  361. "loop after repeat count": [
  362. this.popRule({
  363. token : "entity.name.function.preprocessor.csound-score",
  364. regex : /[A-Z_a-z]\w*\b/,
  365. next : "loop after macro name"
  366. }),
  367. this.comments,
  368. {
  369. token : "invalid.illegal.csound",
  370. regex : /\S.*/
  371. }
  372. ],
  373. "loop after macro name": [
  374. start,
  375. this.popRule({
  376. token : "punctuation.braced-loop.end.csound-score",
  377. regex : /}/
  378. })
  379. ]
  380. });
  381. this.normalizeRules();
  382. };
  383. oop.inherits(CsoundScoreHighlightRules, CsoundPreprocessorHighlightRules);
  384. exports.CsoundScoreHighlightRules = CsoundScoreHighlightRules;
  385. });
  386. ace.define("ace/mode/lua_highlight_rules",[], function(require, exports, module) {
  387. "use strict";
  388. var oop = require("../lib/oop");
  389. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  390. var LuaHighlightRules = function() {
  391. var keywords = (
  392. "break|do|else|elseif|end|for|function|if|in|local|repeat|"+
  393. "return|then|until|while|or|and|not"
  394. );
  395. var builtinConstants = ("true|false|nil|_G|_VERSION");
  396. var functions = (
  397. "string|xpcall|package|tostring|print|os|unpack|require|"+
  398. "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
  399. "collectgarbage|getmetatable|module|rawset|math|debug|"+
  400. "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
  401. "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
  402. "load|error|loadfile|"+
  403. "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
  404. "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
  405. "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
  406. "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
  407. "lines|write|close|flush|open|output|type|read|stderr|"+
  408. "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
  409. "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
  410. "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
  411. "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
  412. "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
  413. "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
  414. "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
  415. "status|wrap|create|running|"+
  416. "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
  417. "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"
  418. );
  419. var stdLibaries = ("string|package|os|io|math|debug|table|coroutine");
  420. var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
  421. var keywordMapper = this.createKeywordMapper({
  422. "keyword": keywords,
  423. "support.function": functions,
  424. "keyword.deprecated": deprecatedIn5152,
  425. "constant.library": stdLibaries,
  426. "constant.language": builtinConstants,
  427. "variable.language": "self"
  428. }, "identifier");
  429. var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
  430. var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
  431. var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
  432. var fraction = "(?:\\.\\d+)";
  433. var intPart = "(?:\\d+)";
  434. var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
  435. var floatNumber = "(?:" + pointFloat + ")";
  436. this.$rules = {
  437. "start" : [{
  438. stateName: "bracketedComment",
  439. onMatch : function(value, currentState, stack){
  440. stack.unshift(this.next, value.length - 2, currentState);
  441. return "comment";
  442. },
  443. regex : /\-\-\[=*\[/,
  444. next : [
  445. {
  446. onMatch : function(value, currentState, stack) {
  447. if (value.length == stack[1]) {
  448. stack.shift();
  449. stack.shift();
  450. this.next = stack.shift();
  451. } else {
  452. this.next = "";
  453. }
  454. return "comment";
  455. },
  456. regex : /\]=*\]/,
  457. next : "start"
  458. }, {
  459. defaultToken : "comment"
  460. }
  461. ]
  462. },
  463. {
  464. token : "comment",
  465. regex : "\\-\\-.*$"
  466. },
  467. {
  468. stateName: "bracketedString",
  469. onMatch : function(value, currentState, stack){
  470. stack.unshift(this.next, value.length, currentState);
  471. return "string.start";
  472. },
  473. regex : /\[=*\[/,
  474. next : [
  475. {
  476. onMatch : function(value, currentState, stack) {
  477. if (value.length == stack[1]) {
  478. stack.shift();
  479. stack.shift();
  480. this.next = stack.shift();
  481. } else {
  482. this.next = "";
  483. }
  484. return "string.end";
  485. },
  486. regex : /\]=*\]/,
  487. next : "start"
  488. }, {
  489. defaultToken : "string"
  490. }
  491. ]
  492. },
  493. {
  494. token : "string", // " string
  495. regex : '"(?:[^\\\\]|\\\\.)*?"'
  496. }, {
  497. token : "string", // ' string
  498. regex : "'(?:[^\\\\]|\\\\.)*?'"
  499. }, {
  500. token : "constant.numeric", // float
  501. regex : floatNumber
  502. }, {
  503. token : "constant.numeric", // integer
  504. regex : integer + "\\b"
  505. }, {
  506. token : keywordMapper,
  507. regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  508. }, {
  509. token : "keyword.operator",
  510. regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
  511. }, {
  512. token : "paren.lparen",
  513. regex : "[\\[\\(\\{]"
  514. }, {
  515. token : "paren.rparen",
  516. regex : "[\\]\\)\\}]"
  517. }, {
  518. token : "text",
  519. regex : "\\s+|\\w+"
  520. } ]
  521. };
  522. this.normalizeRules();
  523. };
  524. oop.inherits(LuaHighlightRules, TextHighlightRules);
  525. exports.LuaHighlightRules = LuaHighlightRules;
  526. });
  527. ace.define("ace/mode/python_highlight_rules",[], function(require, exports, module) {
  528. "use strict";
  529. var oop = require("../lib/oop");
  530. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  531. var PythonHighlightRules = function() {
  532. var keywords = (
  533. "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
  534. "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
  535. "raise|return|try|while|with|yield|async|await|nonlocal"
  536. );
  537. var builtinConstants = (
  538. "True|False|None|NotImplemented|Ellipsis|__debug__"
  539. );
  540. var builtinFunctions = (
  541. "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
  542. "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
  543. "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
  544. "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
  545. "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
  546. "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
  547. "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" +
  548. "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" +
  549. "ascii|breakpoint|bytes"
  550. );
  551. var keywordMapper = this.createKeywordMapper({
  552. "invalid.deprecated": "debugger",
  553. "support.function": builtinFunctions,
  554. "variable.language": "self|cls",
  555. "constant.language": builtinConstants,
  556. "keyword": keywords
  557. }, "identifier");
  558. var strPre = "[uU]?";
  559. var strRawPre = "[rR]";
  560. var strFormatPre = "[fF]";
  561. var strRawFormatPre = "(?:[rR][fF]|[fF][rR])";
  562. var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
  563. var octInteger = "(?:0[oO]?[0-7]+)";
  564. var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
  565. var binInteger = "(?:0[bB][01]+)";
  566. var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
  567. var exponent = "(?:[eE][+-]?\\d+)";
  568. var fraction = "(?:\\.\\d+)";
  569. var intPart = "(?:\\d+)";
  570. var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
  571. var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
  572. var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
  573. var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
  574. this.$rules = {
  575. "start" : [ {
  576. token : "comment",
  577. regex : "#.*$"
  578. }, {
  579. token : "string", // multi line """ string start
  580. regex : strPre + '"{3}',
  581. next : "qqstring3"
  582. }, {
  583. token : "string", // " string
  584. regex : strPre + '"(?=.)',
  585. next : "qqstring"
  586. }, {
  587. token : "string", // multi line ''' string start
  588. regex : strPre + "'{3}",
  589. next : "qstring3"
  590. }, {
  591. token : "string", // ' string
  592. regex : strPre + "'(?=.)",
  593. next : "qstring"
  594. }, {
  595. token: "string",
  596. regex: strRawPre + '"{3}',
  597. next: "rawqqstring3"
  598. }, {
  599. token: "string",
  600. regex: strRawPre + '"(?=.)',
  601. next: "rawqqstring"
  602. }, {
  603. token: "string",
  604. regex: strRawPre + "'{3}",
  605. next: "rawqstring3"
  606. }, {
  607. token: "string",
  608. regex: strRawPre + "'(?=.)",
  609. next: "rawqstring"
  610. }, {
  611. token: "string",
  612. regex: strFormatPre + '"{3}',
  613. next: "fqqstring3"
  614. }, {
  615. token: "string",
  616. regex: strFormatPre + '"(?=.)',
  617. next: "fqqstring"
  618. }, {
  619. token: "string",
  620. regex: strFormatPre + "'{3}",
  621. next: "fqstring3"
  622. }, {
  623. token: "string",
  624. regex: strFormatPre + "'(?=.)",
  625. next: "fqstring"
  626. },{
  627. token: "string",
  628. regex: strRawFormatPre + '"{3}',
  629. next: "rfqqstring3"
  630. }, {
  631. token: "string",
  632. regex: strRawFormatPre + '"(?=.)',
  633. next: "rfqqstring"
  634. }, {
  635. token: "string",
  636. regex: strRawFormatPre + "'{3}",
  637. next: "rfqstring3"
  638. }, {
  639. token: "string",
  640. regex: strRawFormatPre + "'(?=.)",
  641. next: "rfqstring"
  642. }, {
  643. token: "keyword.operator",
  644. regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
  645. }, {
  646. token: "punctuation",
  647. regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="
  648. }, {
  649. token: "paren.lparen",
  650. regex: "[\\[\\(\\{]"
  651. }, {
  652. token: "paren.rparen",
  653. regex: "[\\]\\)\\}]"
  654. }, {
  655. token: "text",
  656. regex: "\\s+"
  657. }, {
  658. include: "constants"
  659. }],
  660. "qqstring3": [{
  661. token: "constant.language.escape",
  662. regex: stringEscape
  663. }, {
  664. token: "string", // multi line """ string end
  665. regex: '"{3}',
  666. next: "start"
  667. }, {
  668. defaultToken: "string"
  669. }],
  670. "qstring3": [{
  671. token: "constant.language.escape",
  672. regex: stringEscape
  673. }, {
  674. token: "string", // multi line ''' string end
  675. regex: "'{3}",
  676. next: "start"
  677. }, {
  678. defaultToken: "string"
  679. }],
  680. "qqstring": [{
  681. token: "constant.language.escape",
  682. regex: stringEscape
  683. }, {
  684. token: "string",
  685. regex: "\\\\$",
  686. next: "qqstring"
  687. }, {
  688. token: "string",
  689. regex: '"|$',
  690. next: "start"
  691. }, {
  692. defaultToken: "string"
  693. }],
  694. "qstring": [{
  695. token: "constant.language.escape",
  696. regex: stringEscape
  697. }, {
  698. token: "string",
  699. regex: "\\\\$",
  700. next: "qstring"
  701. }, {
  702. token: "string",
  703. regex: "'|$",
  704. next: "start"
  705. }, {
  706. defaultToken: "string"
  707. }],
  708. "rawqqstring3": [{
  709. token: "string", // multi line """ string end
  710. regex: '"{3}',
  711. next: "start"
  712. }, {
  713. defaultToken: "string"
  714. }],
  715. "rawqstring3": [{
  716. token: "string", // multi line ''' string end
  717. regex: "'{3}",
  718. next: "start"
  719. }, {
  720. defaultToken: "string"
  721. }],
  722. "rawqqstring": [{
  723. token: "string",
  724. regex: "\\\\$",
  725. next: "rawqqstring"
  726. }, {
  727. token: "string",
  728. regex: '"|$',
  729. next: "start"
  730. }, {
  731. defaultToken: "string"
  732. }],
  733. "rawqstring": [{
  734. token: "string",
  735. regex: "\\\\$",
  736. next: "rawqstring"
  737. }, {
  738. token: "string",
  739. regex: "'|$",
  740. next: "start"
  741. }, {
  742. defaultToken: "string"
  743. }],
  744. "fqqstring3": [{
  745. token: "constant.language.escape",
  746. regex: stringEscape
  747. }, {
  748. token: "string", // multi line """ string end
  749. regex: '"{3}',
  750. next: "start"
  751. }, {
  752. token: "paren.lparen",
  753. regex: "{",
  754. push: "fqstringParRules"
  755. }, {
  756. defaultToken: "string"
  757. }],
  758. "fqstring3": [{
  759. token: "constant.language.escape",
  760. regex: stringEscape
  761. }, {
  762. token: "string", // multi line ''' string end
  763. regex: "'{3}",
  764. next: "start"
  765. }, {
  766. token: "paren.lparen",
  767. regex: "{",
  768. push: "fqstringParRules"
  769. }, {
  770. defaultToken: "string"
  771. }],
  772. "fqqstring": [{
  773. token: "constant.language.escape",
  774. regex: stringEscape
  775. }, {
  776. token: "string",
  777. regex: "\\\\$",
  778. next: "fqqstring"
  779. }, {
  780. token: "string",
  781. regex: '"|$',
  782. next: "start"
  783. }, {
  784. token: "paren.lparen",
  785. regex: "{",
  786. push: "fqstringParRules"
  787. }, {
  788. defaultToken: "string"
  789. }],
  790. "fqstring": [{
  791. token: "constant.language.escape",
  792. regex: stringEscape
  793. }, {
  794. token: "string",
  795. regex: "'|$",
  796. next: "start"
  797. }, {
  798. token: "paren.lparen",
  799. regex: "{",
  800. push: "fqstringParRules"
  801. }, {
  802. defaultToken: "string"
  803. }],
  804. "rfqqstring3": [{
  805. token: "string", // multi line """ string end
  806. regex: '"{3}',
  807. next: "start"
  808. }, {
  809. token: "paren.lparen",
  810. regex: "{",
  811. push: "fqstringParRules"
  812. }, {
  813. defaultToken: "string"
  814. }],
  815. "rfqstring3": [{
  816. token: "string", // multi line ''' string end
  817. regex: "'{3}",
  818. next: "start"
  819. }, {
  820. token: "paren.lparen",
  821. regex: "{",
  822. push: "fqstringParRules"
  823. }, {
  824. defaultToken: "string"
  825. }],
  826. "rfqqstring": [{
  827. token: "string",
  828. regex: "\\\\$",
  829. next: "rfqqstring"
  830. }, {
  831. token: "string",
  832. regex: '"|$',
  833. next: "start"
  834. }, {
  835. token: "paren.lparen",
  836. regex: "{",
  837. push: "fqstringParRules"
  838. }, {
  839. defaultToken: "string"
  840. }],
  841. "rfqstring": [{
  842. token: "string",
  843. regex: "'|$",
  844. next: "start"
  845. }, {
  846. token: "paren.lparen",
  847. regex: "{",
  848. push: "fqstringParRules"
  849. }, {
  850. defaultToken: "string"
  851. }],
  852. "fqstringParRules": [{//TODO: nested {}
  853. token: "paren.lparen",
  854. regex: "[\\[\\(]"
  855. }, {
  856. token: "paren.rparen",
  857. regex: "[\\]\\)]"
  858. }, {
  859. token: "string",
  860. regex: "\\s+"
  861. }, {
  862. token: "string",
  863. regex: "'(.)*'"
  864. }, {
  865. token: "string",
  866. regex: '"(.)*"'
  867. }, {
  868. token: "function.support",
  869. regex: "(!s|!r|!a)"
  870. }, {
  871. include: "constants"
  872. },{
  873. token: 'paren.rparen',
  874. regex: "}",
  875. next: 'pop'
  876. },{
  877. token: 'paren.lparen',
  878. regex: "{",
  879. push: "fqstringParRules"
  880. }],
  881. "constants": [{
  882. token: "constant.numeric", // imaginary
  883. regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b"
  884. }, {
  885. token: "constant.numeric", // float
  886. regex: floatNumber
  887. }, {
  888. token: "constant.numeric", // long integer
  889. regex: integer + "[lL]\\b"
  890. }, {
  891. token: "constant.numeric", // integer
  892. regex: integer + "\\b"
  893. }, {
  894. token: ["punctuation", "function.support"],// method
  895. regex: "(\\.)([a-zA-Z_]+)\\b"
  896. }, {
  897. token: keywordMapper,
  898. regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  899. }]
  900. };
  901. this.normalizeRules();
  902. };
  903. oop.inherits(PythonHighlightRules, TextHighlightRules);
  904. exports.PythonHighlightRules = PythonHighlightRules;
  905. });
  906. ace.define("ace/mode/csound_orchestra_highlight_rules",[], function(require, exports, module) {
  907. "use strict";
  908. var lang = require("../lib/lang");
  909. var oop = require("../lib/oop");
  910. var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules;
  911. var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules;
  912. var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
  913. var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
  914. var CsoundOrchestraHighlightRules = function() {
  915. CsoundPreprocessorHighlightRules.call(this);
  916. var opcodes = [
  917. "ATSadd",
  918. "ATSaddnz",
  919. "ATSbufread",
  920. "ATScross",
  921. "ATSinfo",
  922. "ATSinterpread",
  923. "ATSpartialtap",
  924. "ATSread",
  925. "ATSreadnz",
  926. "ATSsinnoi",
  927. "FLbox",
  928. "FLbutBank",
  929. "FLbutton",
  930. "FLcloseButton",
  931. "FLcolor",
  932. "FLcolor2",
  933. "FLcount",
  934. "FLexecButton",
  935. "FLgetsnap",
  936. "FLgroup",
  937. "FLgroupEnd",
  938. "FLgroup_end",
  939. "FLhide",
  940. "FLhvsBox",
  941. "FLhvsBoxSetValue",
  942. "FLjoy",
  943. "FLkeyIn",
  944. "FLknob",
  945. "FLlabel",
  946. "FLloadsnap",
  947. "FLmouse",
  948. "FLpack",
  949. "FLpackEnd",
  950. "FLpack_end",
  951. "FLpanel",
  952. "FLpanelEnd",
  953. "FLpanel_end",
  954. "FLprintk",
  955. "FLprintk2",
  956. "FLroller",
  957. "FLrun",
  958. "FLsavesnap",
  959. "FLscroll",
  960. "FLscrollEnd",
  961. "FLscroll_end",
  962. "FLsetAlign",
  963. "FLsetBox",
  964. "FLsetColor",
  965. "FLsetColor2",
  966. "FLsetFont",
  967. "FLsetPosition",
  968. "FLsetSize",
  969. "FLsetSnapGroup",
  970. "FLsetText",
  971. "FLsetTextColor",
  972. "FLsetTextSize",
  973. "FLsetTextType",
  974. "FLsetVal",
  975. "FLsetVal_i",
  976. "FLsetVali",
  977. "FLsetsnap",
  978. "FLshow",
  979. "FLslidBnk",
  980. "FLslidBnk2",
  981. "FLslidBnk2Set",
  982. "FLslidBnk2Setk",
  983. "FLslidBnkGetHandle",
  984. "FLslidBnkSet",
  985. "FLslidBnkSetk",
  986. "FLslider",
  987. "FLtabs",
  988. "FLtabsEnd",
  989. "FLtabs_end",
  990. "FLtext",
  991. "FLupdate",
  992. "FLvalue",
  993. "FLvkeybd",
  994. "FLvslidBnk",
  995. "FLvslidBnk2",
  996. "FLxyin",
  997. "JackoAudioIn",
  998. "JackoAudioInConnect",
  999. "JackoAudioOut",
  1000. "JackoAudioOutConnect",
  1001. "JackoFreewheel",
  1002. "JackoInfo",
  1003. "JackoInit",
  1004. "JackoMidiInConnect",
  1005. "JackoMidiOut",
  1006. "JackoMidiOutConnect",
  1007. "JackoNoteOut",
  1008. "JackoOn",
  1009. "JackoTransport",
  1010. "K35_hpf",
  1011. "K35_lpf",
  1012. "MixerClear",
  1013. "MixerGetLevel",
  1014. "MixerReceive",
  1015. "MixerSend",
  1016. "MixerSetLevel",
  1017. "MixerSetLevel_i",
  1018. "OSCbundle",
  1019. "OSCcount",
  1020. "OSCinit",
  1021. "OSCinitM",
  1022. "OSClisten",
  1023. "OSCraw",
  1024. "OSCsend",
  1025. "OSCsend_lo",
  1026. "S",
  1027. "STKBandedWG",
  1028. "STKBeeThree",
  1029. "STKBlowBotl",
  1030. "STKBlowHole",
  1031. "STKBowed",
  1032. "STKBrass",
  1033. "STKClarinet",
  1034. "STKDrummer",
  1035. "STKFMVoices",
  1036. "STKFlute",
  1037. "STKHevyMetl",
  1038. "STKMandolin",
  1039. "STKModalBar",
  1040. "STKMoog",
  1041. "STKPercFlut",
  1042. "STKPlucked",
  1043. "STKResonate",
  1044. "STKRhodey",
  1045. "STKSaxofony",
  1046. "STKShakers",
  1047. "STKSimple",
  1048. "STKSitar",
  1049. "STKStifKarp",
  1050. "STKTubeBell",
  1051. "STKVoicForm",
  1052. "STKWhistle",
  1053. "STKWurley",
  1054. "a",
  1055. "abs",
  1056. "active",
  1057. "adsr",
  1058. "adsyn",
  1059. "adsynt",
  1060. "adsynt2",
  1061. "aftouch",
  1062. "alpass",
  1063. "alwayson",
  1064. "ampdb",
  1065. "ampdbfs",
  1066. "ampmidi",
  1067. "ampmidid",
  1068. "areson",
  1069. "aresonk",
  1070. "atone",
  1071. "atonek",
  1072. "atonex",
  1073. "babo",
  1074. "balance",
  1075. "balance2",
  1076. "bamboo",
  1077. "barmodel",
  1078. "bbcutm",
  1079. "bbcuts",
  1080. "beadsynt",
  1081. "beosc",
  1082. "betarand",
  1083. "bexprnd",
  1084. "bformdec1",
  1085. "bformenc1",
  1086. "binit",
  1087. "biquad",
  1088. "biquada",
  1089. "birnd",
  1090. "bpf",
  1091. "bpfcos",
  1092. "bqrez",
  1093. "butbp",
  1094. "butbr",
  1095. "buthp",
  1096. "butlp",
  1097. "butterbp",
  1098. "butterbr",
  1099. "butterhp",
  1100. "butterlp",
  1101. "button",
  1102. "buzz",
  1103. "c2r",
  1104. "cabasa",
  1105. "cauchy",
  1106. "cauchyi",
  1107. "cbrt",
  1108. "ceil",
  1109. "cell",
  1110. "cent",
  1111. "centroid",
  1112. "ceps",
  1113. "cepsinv",
  1114. "chanctrl",
  1115. "changed",
  1116. "changed2",
  1117. "chani",
  1118. "chano",
  1119. "chebyshevpoly",
  1120. "checkbox",
  1121. "chn_S",
  1122. "chn_a",
  1123. "chn_k",
  1124. "chnclear",
  1125. "chnexport",
  1126. "chnget",
  1127. "chngetks",
  1128. "chnmix",
  1129. "chnparams",
  1130. "chnset",
  1131. "chnsetks",
  1132. "chuap",
  1133. "clear",
  1134. "clfilt",
  1135. "clip",
  1136. "clockoff",
  1137. "clockon",
  1138. "cmp",
  1139. "cmplxprod",
  1140. "comb",
  1141. "combinv",
  1142. "compilecsd",
  1143. "compileorc",
  1144. "compilestr",
  1145. "compress",
  1146. "compress2",
  1147. "connect",
  1148. "control",
  1149. "convle",
  1150. "convolve",
  1151. "copya2ftab",
  1152. "copyf2array",
  1153. "cos",
  1154. "cosh",
  1155. "cosinv",
  1156. "cosseg",
  1157. "cossegb",
  1158. "cossegr",
  1159. "cps2pch",
  1160. "cpsmidi",
  1161. "cpsmidib",
  1162. "cpsmidinn",
  1163. "cpsoct",
  1164. "cpspch",
  1165. "cpstmid",
  1166. "cpstun",
  1167. "cpstuni",
  1168. "cpsxpch",
  1169. "cpumeter",
  1170. "cpuprc",
  1171. "cross2",
  1172. "crossfm",
  1173. "crossfmi",
  1174. "crossfmpm",
  1175. "crossfmpmi",
  1176. "crosspm",
  1177. "crosspmi",
  1178. "crunch",
  1179. "ctlchn",
  1180. "ctrl14",
  1181. "ctrl21",
  1182. "ctrl7",
  1183. "ctrlinit",
  1184. "cuserrnd",
  1185. "dam",
  1186. "date",
  1187. "dates",
  1188. "db",
  1189. "dbamp",
  1190. "dbfsamp",
  1191. "dcblock",
  1192. "dcblock2",
  1193. "dconv",
  1194. "dct",
  1195. "dctinv",
  1196. "deinterleave",
  1197. "delay",
  1198. "delay1",
  1199. "delayk",
  1200. "delayr",
  1201. "delayw",
  1202. "deltap",
  1203. "deltap3",
  1204. "deltapi",
  1205. "deltapn",
  1206. "deltapx",
  1207. "deltapxw",
  1208. "denorm",
  1209. "diff",
  1210. "diode_ladder",
  1211. "directory",
  1212. "diskgrain",
  1213. "diskin",
  1214. "diskin2",
  1215. "dispfft",
  1216. "display",
  1217. "distort",
  1218. "distort1",
  1219. "divz",
  1220. "doppler",
  1221. "dot",
  1222. "downsamp",
  1223. "dripwater",
  1224. "dssiactivate",
  1225. "dssiaudio",
  1226. "dssictls",
  1227. "dssiinit",
  1228. "dssilist",
  1229. "dumpk",
  1230. "dumpk2",
  1231. "dumpk3",
  1232. "dumpk4",
  1233. "duserrnd",
  1234. "dust",
  1235. "dust2",
  1236. "envlpx",
  1237. "envlpxr",
  1238. "ephasor",
  1239. "eqfil",
  1240. "evalstr",
  1241. "event",
  1242. "event_i",
  1243. "exciter",
  1244. "exitnow",
  1245. "exp",
  1246. "expcurve",
  1247. "expon",
  1248. "exprand",
  1249. "exprandi",
  1250. "expseg",
  1251. "expsega",
  1252. "expsegb",
  1253. "expsegba",
  1254. "expsegr",
  1255. "fareylen",
  1256. "fareyleni",
  1257. "faustaudio",
  1258. "faustcompile",
  1259. "faustctl",
  1260. "faustdsp",
  1261. "faustgen",
  1262. "faustplay",
  1263. "fft",
  1264. "fftinv",
  1265. "ficlose",
  1266. "filebit",
  1267. "filelen",
  1268. "filenchnls",
  1269. "filepeak",
  1270. "filescal",
  1271. "filesr",
  1272. "filevalid",
  1273. "fillarray",
  1274. "filter2",
  1275. "fin",
  1276. "fini",
  1277. "fink",
  1278. "fiopen",
  1279. "flanger",
  1280. "flashtxt",
  1281. "flooper",
  1282. "flooper2",
  1283. "floor",
  1284. "fmanal",
  1285. "fmax",
  1286. "fmb3",
  1287. "fmbell",
  1288. "fmin",
  1289. "fmmetal",
  1290. "fmod",
  1291. "fmpercfl",
  1292. "fmrhode",
  1293. "fmvoice",
  1294. "fmwurlie",
  1295. "fof",
  1296. "fof2",
  1297. "fofilter",
  1298. "fog",
  1299. "fold",
  1300. "follow",
  1301. "follow2",
  1302. "foscil",
  1303. "foscili",
  1304. "fout",
  1305. "fouti",
  1306. "foutir",
  1307. "foutk",
  1308. "fprintks",
  1309. "fprints",
  1310. "frac",
  1311. "fractalnoise",
  1312. "framebuffer",
  1313. "freeverb",
  1314. "ftaudio",
  1315. "ftchnls",
  1316. "ftconv",
  1317. "ftcps",
  1318. "ftfree",
  1319. "ftgen",
  1320. "ftgenonce",
  1321. "ftgentmp",
  1322. "ftlen",
  1323. "ftload",
  1324. "ftloadk",
  1325. "ftlptim",
  1326. "ftmorf",
  1327. "ftom",
  1328. "ftprint",
  1329. "ftresize",
  1330. "ftresizei",
  1331. "ftsamplebank",
  1332. "ftsave",
  1333. "ftsavek",
  1334. "ftslice",
  1335. "ftsr",
  1336. "gain",
  1337. "gainslider",
  1338. "gauss",
  1339. "gaussi",
  1340. "gausstrig",
  1341. "gbuzz",
  1342. "genarray",
  1343. "genarray_i",
  1344. "gendy",
  1345. "gendyc",
  1346. "gendyx",
  1347. "getcfg",
  1348. "getcol",
  1349. "getftargs",
  1350. "getrow",
  1351. "getrowlin",
  1352. "getseed",
  1353. "gogobel",
  1354. "grain",
  1355. "grain2",
  1356. "grain3",
  1357. "granule",
  1358. "guiro",
  1359. "harmon",
  1360. "harmon2",
  1361. "harmon3",
  1362. "harmon4",
  1363. "hdf5read",
  1364. "hdf5write",
  1365. "hilbert",
  1366. "hilbert2",
  1367. "hrtfearly",
  1368. "hrtfmove",
  1369. "hrtfmove2",
  1370. "hrtfreverb",
  1371. "hrtfstat",
  1372. "hsboscil",
  1373. "hvs1",
  1374. "hvs2",
  1375. "hvs3",
  1376. "hypot",
  1377. "i",
  1378. "ihold",
  1379. "imagecreate",
  1380. "imagefree",
  1381. "imagegetpixel",
  1382. "imageload",
  1383. "imagesave",
  1384. "imagesetpixel",
  1385. "imagesize",
  1386. "in",
  1387. "in32",
  1388. "inch",
  1389. "inh",
  1390. "init",
  1391. "initc14",
  1392. "initc21",
  1393. "initc7",
  1394. "inleta",
  1395. "inletf",
  1396. "inletk",
  1397. "inletkid",
  1398. "inletv",
  1399. "ino",
  1400. "inq",
  1401. "inrg",
  1402. "ins",
  1403. "insglobal",
  1404. "insremot",
  1405. "int",
  1406. "integ",
  1407. "interleave",
  1408. "interp",
  1409. "invalue",
  1410. "inx",
  1411. "inz",
  1412. "jacktransport",
  1413. "jitter",
  1414. "jitter2",
  1415. "joystick",
  1416. "jspline",
  1417. "k",
  1418. "la_i_add_mc",
  1419. "la_i_add_mr",
  1420. "la_i_add_vc",
  1421. "la_i_add_vr",
  1422. "la_i_assign_mc",
  1423. "la_i_assign_mr",
  1424. "la_i_assign_t",
  1425. "la_i_assign_vc",
  1426. "la_i_assign_vr",
  1427. "la_i_conjugate_mc",
  1428. "la_i_conjugate_mr",
  1429. "la_i_conjugate_vc",
  1430. "la_i_conjugate_vr",
  1431. "la_i_distance_vc",
  1432. "la_i_distance_vr",
  1433. "la_i_divide_mc",
  1434. "la_i_divide_mr",
  1435. "la_i_divide_vc",
  1436. "la_i_divide_vr",
  1437. "la_i_dot_mc",
  1438. "la_i_dot_mc_vc",
  1439. "la_i_dot_mr",
  1440. "la_i_dot_mr_vr",
  1441. "la_i_dot_vc",
  1442. "la_i_dot_vr",
  1443. "la_i_get_mc",
  1444. "la_i_get_mr",
  1445. "la_i_get_vc",
  1446. "la_i_get_vr",
  1447. "la_i_invert_mc",
  1448. "la_i_invert_mr",
  1449. "la_i_lower_solve_mc",
  1450. "la_i_lower_solve_mr",
  1451. "la_i_lu_det_mc",
  1452. "la_i_lu_det_mr",
  1453. "la_i_lu_factor_mc",
  1454. "la_i_lu_factor_mr",
  1455. "la_i_lu_solve_mc",
  1456. "la_i_lu_solve_mr",
  1457. "la_i_mc_create",
  1458. "la_i_mc_set",
  1459. "la_i_mr_create",
  1460. "la_i_mr_set",
  1461. "la_i_multiply_mc",
  1462. "la_i_multiply_mr",
  1463. "la_i_multiply_vc",
  1464. "la_i_multiply_vr",
  1465. "la_i_norm1_mc",
  1466. "la_i_norm1_mr",
  1467. "la_i_norm1_vc",
  1468. "la_i_norm1_vr",
  1469. "la_i_norm_euclid_mc",
  1470. "la_i_norm_euclid_mr",
  1471. "la_i_norm_euclid_vc",
  1472. "la_i_norm_euclid_vr",
  1473. "la_i_norm_inf_mc",
  1474. "la_i_norm_inf_mr",
  1475. "la_i_norm_inf_vc",
  1476. "la_i_norm_inf_vr",
  1477. "la_i_norm_max_mc",
  1478. "la_i_norm_max_mr",
  1479. "la_i_print_mc",
  1480. "la_i_print_mr",
  1481. "la_i_print_vc",
  1482. "la_i_print_vr",
  1483. "la_i_qr_eigen_mc",
  1484. "la_i_qr_eigen_mr",
  1485. "la_i_qr_factor_mc",
  1486. "la_i_qr_factor_mr",
  1487. "la_i_qr_sym_eigen_mc",
  1488. "la_i_qr_sym_eigen_mr",
  1489. "la_i_random_mc",
  1490. "la_i_random_mr",
  1491. "la_i_random_vc",
  1492. "la_i_random_vr",
  1493. "la_i_size_mc",
  1494. "la_i_size_mr",
  1495. "la_i_size_vc",
  1496. "la_i_size_vr",
  1497. "la_i_subtract_mc",
  1498. "la_i_subtract_mr",
  1499. "la_i_subtract_vc",
  1500. "la_i_subtract_vr",
  1501. "la_i_t_assign",
  1502. "la_i_trace_mc",
  1503. "la_i_trace_mr",
  1504. "la_i_transpose_mc",
  1505. "la_i_transpose_mr",
  1506. "la_i_upper_solve_mc",
  1507. "la_i_upper_solve_mr",
  1508. "la_i_vc_create",
  1509. "la_i_vc_set",
  1510. "la_i_vr_create",
  1511. "la_i_vr_set",
  1512. "la_k_a_assign",
  1513. "la_k_add_mc",
  1514. "la_k_add_mr",
  1515. "la_k_add_vc",
  1516. "la_k_add_vr",
  1517. "la_k_assign_a",
  1518. "la_k_assign_f",
  1519. "la_k_assign_mc",
  1520. "la_k_assign_mr",
  1521. "la_k_assign_t",
  1522. "la_k_assign_vc",
  1523. "la_k_assign_vr",
  1524. "la_k_conjugate_mc",
  1525. "la_k_conjugate_mr",
  1526. "la_k_conjugate_vc",
  1527. "la_k_conjugate_vr",
  1528. "la_k_current_f",
  1529. "la_k_current_vr",
  1530. "la_k_distance_vc",
  1531. "la_k_distance_vr",
  1532. "la_k_divide_mc",
  1533. "la_k_divide_mr",
  1534. "la_k_divide_vc",
  1535. "la_k_divide_vr",
  1536. "la_k_dot_mc",
  1537. "la_k_dot_mc_vc",
  1538. "la_k_dot_mr",
  1539. "la_k_dot_mr_vr",
  1540. "la_k_dot_vc",
  1541. "la_k_dot_vr",
  1542. "la_k_f_assign",
  1543. "la_k_get_mc",
  1544. "la_k_get_mr",
  1545. "la_k_get_vc",
  1546. "la_k_get_vr",
  1547. "la_k_invert_mc",
  1548. "la_k_invert_mr",
  1549. "la_k_lower_solve_mc",
  1550. "la_k_lower_solve_mr",
  1551. "la_k_lu_det_mc",
  1552. "la_k_lu_det_mr",
  1553. "la_k_lu_factor_mc",
  1554. "la_k_lu_factor_mr",
  1555. "la_k_lu_solve_mc",
  1556. "la_k_lu_solve_mr",
  1557. "la_k_mc_set",
  1558. "la_k_mr_set",
  1559. "la_k_multiply_mc",
  1560. "la_k_multiply_mr",
  1561. "la_k_multiply_vc",
  1562. "la_k_multiply_vr",
  1563. "la_k_norm1_mc",
  1564. "la_k_norm1_mr",
  1565. "la_k_norm1_vc",
  1566. "la_k_norm1_vr",
  1567. "la_k_norm_euclid_mc",
  1568. "la_k_norm_euclid_mr",
  1569. "la_k_norm_euclid_vc",
  1570. "la_k_norm_euclid_vr",
  1571. "la_k_norm_inf_mc",
  1572. "la_k_norm_inf_mr",
  1573. "la_k_norm_inf_vc",
  1574. "la_k_norm_inf_vr",
  1575. "la_k_norm_max_mc",
  1576. "la_k_norm_max_mr",
  1577. "la_k_qr_eigen_mc",
  1578. "la_k_qr_eigen_mr",
  1579. "la_k_qr_factor_mc",
  1580. "la_k_qr_factor_mr",
  1581. "la_k_qr_sym_eigen_mc",
  1582. "la_k_qr_sym_eigen_mr",
  1583. "la_k_random_mc",
  1584. "la_k_random_mr",
  1585. "la_k_random_vc",
  1586. "la_k_random_vr",
  1587. "la_k_subtract_mc",
  1588. "la_k_subtract_mr",
  1589. "la_k_subtract_vc",
  1590. "la_k_subtract_vr",
  1591. "la_k_t_assign",
  1592. "la_k_trace_mc",
  1593. "la_k_trace_mr",
  1594. "la_k_upper_solve_mc",
  1595. "la_k_upper_solve_mr",
  1596. "la_k_vc_set",
  1597. "la_k_vr_set",
  1598. "lenarray",
  1599. "lfo",
  1600. "limit",
  1601. "limit1",
  1602. "lincos",
  1603. "line",
  1604. "linen",
  1605. "linenr",
  1606. "lineto",
  1607. "link_beat_force",
  1608. "link_beat_get",
  1609. "link_beat_request",
  1610. "link_create",
  1611. "link_enable",
  1612. "link_is_enabled",
  1613. "link_metro",
  1614. "link_peers",
  1615. "link_tempo_get",
  1616. "link_tempo_set",
  1617. "linlin",
  1618. "linrand",
  1619. "linseg",
  1620. "linsegb",
  1621. "linsegr",
  1622. "liveconv",
  1623. "locsend",
  1624. "locsig",
  1625. "log",
  1626. "log10",
  1627. "log2",
  1628. "logbtwo",
  1629. "logcurve",
  1630. "loopseg",
  1631. "loopsegp",
  1632. "looptseg",
  1633. "loopxseg",
  1634. "lorenz",
  1635. "loscil",
  1636. "loscil3",
  1637. "loscil3phs",
  1638. "loscilphs",
  1639. "loscilx",
  1640. "lowpass2",
  1641. "lowres",
  1642. "lowresx",
  1643. "lpf18",
  1644. "lpform",
  1645. "lpfreson",
  1646. "lphasor",
  1647. "lpinterp",
  1648. "lposcil",
  1649. "lposcil3",
  1650. "lposcila",
  1651. "lposcilsa",
  1652. "lposcilsa2",
  1653. "lpread",
  1654. "lpreson",
  1655. "lpshold",
  1656. "lpsholdp",
  1657. "lpslot",
  1658. "lua_exec",
  1659. "lua_iaopcall",
  1660. "lua_iaopcall_off",
  1661. "lua_ikopcall",
  1662. "lua_ikopcall_off",
  1663. "lua_iopcall",
  1664. "lua_iopcall_off",
  1665. "lua_opdef",
  1666. "mac",
  1667. "maca",
  1668. "madsr",
  1669. "mags",
  1670. "mandel",
  1671. "mandol",
  1672. "maparray",
  1673. "maparray_i",
  1674. "marimba",
  1675. "massign",
  1676. "max",
  1677. "max_k",
  1678. "maxabs",
  1679. "maxabsaccum",
  1680. "maxaccum",
  1681. "maxalloc",
  1682. "maxarray",
  1683. "mclock",
  1684. "mdelay",
  1685. "median",
  1686. "mediank",
  1687. "metro",
  1688. "mfb",
  1689. "midglobal",
  1690. "midiarp",
  1691. "midic14",
  1692. "midic21",
  1693. "midic7",
  1694. "midichannelaftertouch",
  1695. "midichn",
  1696. "midicontrolchange",
  1697. "midictrl",
  1698. "mididefault",
  1699. "midifilestatus",
  1700. "midiin",
  1701. "midinoteoff",
  1702. "midinoteoncps",
  1703. "midinoteonkey",
  1704. "midinoteonoct",
  1705. "midinoteonpch",
  1706. "midion",
  1707. "midion2",
  1708. "midiout",
  1709. "midiout_i",
  1710. "midipgm",
  1711. "midipitchbend",
  1712. "midipolyaftertouch",
  1713. "midiprogramchange",
  1714. "miditempo",
  1715. "midremot",
  1716. "min",
  1717. "minabs",
  1718. "minabsaccum",
  1719. "minaccum",
  1720. "minarray",
  1721. "mincer",
  1722. "mirror",
  1723. "mode",
  1724. "modmatrix",
  1725. "monitor",
  1726. "moog",
  1727. "moogladder",
  1728. "moogladder2",
  1729. "moogvcf",
  1730. "moogvcf2",
  1731. "moscil",
  1732. "mp3bitrate",
  1733. "mp3in",
  1734. "mp3len",
  1735. "mp3nchnls",
  1736. "mp3scal",
  1737. "mp3sr",
  1738. "mpulse",
  1739. "mrtmsg",
  1740. "mtof",
  1741. "mton",
  1742. "multitap",
  1743. "mute",
  1744. "mvchpf",
  1745. "mvclpf1",
  1746. "mvclpf2",
  1747. "mvclpf3",
  1748. "mvclpf4",
  1749. "mxadsr",
  1750. "nchnls_hw",
  1751. "nestedap",
  1752. "nlalp",
  1753. "nlfilt",
  1754. "nlfilt2",
  1755. "noise",
  1756. "noteoff",
  1757. "noteon",
  1758. "noteondur",
  1759. "noteondur2",
  1760. "notnum",
  1761. "nreverb",
  1762. "nrpn",
  1763. "nsamp",
  1764. "nstance",
  1765. "nstrnum",
  1766. "ntom",
  1767. "ntrpol",
  1768. "nxtpow2",
  1769. "octave",
  1770. "octcps",
  1771. "octmidi",
  1772. "octmidib",
  1773. "octmidinn",
  1774. "octpch",
  1775. "olabuffer",
  1776. "oscbnk",
  1777. "oscil",
  1778. "oscil1",
  1779. "oscil1i",
  1780. "oscil3",
  1781. "oscili",
  1782. "oscilikt",
  1783. "osciliktp",
  1784. "oscilikts",
  1785. "osciln",
  1786. "oscils",
  1787. "oscilx",
  1788. "out",
  1789. "out32",
  1790. "outc",
  1791. "outch",
  1792. "outh",
  1793. "outiat",
  1794. "outic",
  1795. "outic14",
  1796. "outipat",
  1797. "outipb",
  1798. "outipc",
  1799. "outkat",
  1800. "outkc",
  1801. "outkc14",
  1802. "outkpat",
  1803. "outkpb",
  1804. "outkpc",
  1805. "outleta",
  1806. "outletf",
  1807. "outletk",
  1808. "outletkid",
  1809. "outletv",
  1810. "outo",
  1811. "outq",
  1812. "outq1",
  1813. "outq2",
  1814. "outq3",
  1815. "outq4",
  1816. "outrg",
  1817. "outs",
  1818. "outs1",
  1819. "outs2",
  1820. "outvalue",
  1821. "outx",
  1822. "outz",
  1823. "p",
  1824. "p5gconnect",
  1825. "p5gdata",
  1826. "pan",
  1827. "pan2",
  1828. "pareq",
  1829. "part2txt",
  1830. "partials",
  1831. "partikkel",
  1832. "partikkelget",
  1833. "partikkelset",
  1834. "partikkelsync",
  1835. "passign",
  1836. "paulstretch",
  1837. "pcauchy",
  1838. "pchbend",
  1839. "pchmidi",
  1840. "pchmidib",
  1841. "pchmidinn",
  1842. "pchoct",
  1843. "pchtom",
  1844. "pconvolve",
  1845. "pcount",
  1846. "pdclip",
  1847. "pdhalf",
  1848. "pdhalfy",
  1849. "peak",
  1850. "pgmassign",
  1851. "pgmchn",
  1852. "phaser1",
  1853. "phaser2",
  1854. "phasor",
  1855. "phasorbnk",
  1856. "phs",
  1857. "pindex",
  1858. "pinker",
  1859. "pinkish",
  1860. "pitch",
  1861. "pitchac",
  1862. "pitchamdf",
  1863. "planet",
  1864. "platerev",
  1865. "plltrack",
  1866. "pluck",
  1867. "poisson",
  1868. "pol2rect",
  1869. "polyaft",
  1870. "polynomial",
  1871. "port",
  1872. "portk",
  1873. "poscil",
  1874. "poscil3",
  1875. "pow",
  1876. "powershape",
  1877. "powoftwo",
  1878. "pows",
  1879. "prealloc",
  1880. "prepiano",
  1881. "print",
  1882. "print_type",
  1883. "printarray",
  1884. "printf",
  1885. "printf_i",
  1886. "printk",
  1887. "printk2",
  1888. "printks",
  1889. "printks2",
  1890. "prints",
  1891. "product",
  1892. "pset",
  1893. "ptable",
  1894. "ptable3",
  1895. "ptablei",
  1896. "ptableiw",
  1897. "ptablew",
  1898. "ptrack",
  1899. "puts",
  1900. "pvadd",
  1901. "pvbufread",
  1902. "pvcross",
  1903. "pvinterp",
  1904. "pvoc",
  1905. "pvread",
  1906. "pvs2array",
  1907. "pvs2tab",
  1908. "pvsadsyn",
  1909. "pvsanal",
  1910. "pvsarp",
  1911. "pvsbandp",
  1912. "pvsbandr",
  1913. "pvsbin",
  1914. "pvsblur",
  1915. "pvsbuffer",
  1916. "pvsbufread",
  1917. "pvsbufread2",
  1918. "pvscale",
  1919. "pvscent",
  1920. "pvsceps",
  1921. "pvscross",
  1922. "pvsdemix",
  1923. "pvsdiskin",
  1924. "pvsdisp",
  1925. "pvsenvftw",
  1926. "pvsfilter",
  1927. "pvsfread",
  1928. "pvsfreeze",
  1929. "pvsfromarray",
  1930. "pvsftr",
  1931. "pvsftw",
  1932. "pvsfwrite",
  1933. "pvsgain",
  1934. "pvshift",
  1935. "pvsifd",
  1936. "pvsin",
  1937. "pvsinfo",
  1938. "pvsinit",
  1939. "pvslock",
  1940. "pvsmaska",
  1941. "pvsmix",
  1942. "pvsmooth",
  1943. "pvsmorph",
  1944. "pvsosc",
  1945. "pvsout",
  1946. "pvspitch",
  1947. "pvstanal",
  1948. "pvstencil",
  1949. "pvstrace",
  1950. "pvsvoc",
  1951. "pvswarp",
  1952. "pvsynth",
  1953. "pwd",
  1954. "pyassign",
  1955. "pyassigni",
  1956. "pyassignt",
  1957. "pycall",
  1958. "pycall1",
  1959. "pycall1i",
  1960. "pycall1t",
  1961. "pycall2",
  1962. "pycall2i",
  1963. "pycall2t",
  1964. "pycall3",
  1965. "pycall3i",
  1966. "pycall3t",
  1967. "pycall4",
  1968. "pycall4i",
  1969. "pycall4t",
  1970. "pycall5",
  1971. "pycall5i",
  1972. "pycall5t",
  1973. "pycall6",
  1974. "pycall6i",
  1975. "pycall6t",
  1976. "pycall7",
  1977. "pycall7i",
  1978. "pycall7t",
  1979. "pycall8",
  1980. "pycall8i",
  1981. "pycall8t",
  1982. "pycalli",
  1983. "pycalln",
  1984. "pycallni",
  1985. "pycallt",
  1986. "pyeval",
  1987. "pyevali",
  1988. "pyevalt",
  1989. "pyexec",
  1990. "pyexeci",
  1991. "pyexect",
  1992. "pyinit",
  1993. "pylassign",
  1994. "pylassigni",
  1995. "pylassignt",
  1996. "pylcall",
  1997. "pylcall1",
  1998. "pylcall1i",
  1999. "pylcall1t",
  2000. "pylcall2",
  2001. "pylcall2i",
  2002. "pylcall2t",
  2003. "pylcall3",
  2004. "pylcall3i",
  2005. "pylcall3t",
  2006. "pylcall4",
  2007. "pylcall4i",
  2008. "pylcall4t",
  2009. "pylcall5",
  2010. "pylcall5i",
  2011. "pylcall5t",
  2012. "pylcall6",
  2013. "pylcall6i",
  2014. "pylcall6t",
  2015. "pylcall7",
  2016. "pylcall7i",
  2017. "pylcall7t",
  2018. "pylcall8",
  2019. "pylcall8i",
  2020. "pylcall8t",
  2021. "pylcalli",
  2022. "pylcalln",
  2023. "pylcallni",
  2024. "pylcallt",
  2025. "pyleval",
  2026. "pylevali",
  2027. "pylevalt",
  2028. "pylexec",
  2029. "pylexeci",
  2030. "pylexect",
  2031. "pylrun",
  2032. "pylruni",
  2033. "pylrunt",
  2034. "pyrun",
  2035. "pyruni",
  2036. "pyrunt",
  2037. "qinf",
  2038. "qnan",
  2039. "r2c",
  2040. "rand",
  2041. "randh",
  2042. "randi",
  2043. "random",
  2044. "randomh",
  2045. "randomi",
  2046. "rbjeq",
  2047. "readclock",
  2048. "readf",
  2049. "readfi",
  2050. "readk",
  2051. "readk2",
  2052. "readk3",
  2053. "readk4",
  2054. "readks",
  2055. "readscore",
  2056. "readscratch",
  2057. "rect2pol",
  2058. "release",
  2059. "remoteport",
  2060. "remove",
  2061. "repluck",
  2062. "reshapearray",
  2063. "reson",
  2064. "resonk",
  2065. "resonr",
  2066. "resonx",
  2067. "resonxk",
  2068. "resony",
  2069. "resonz",
  2070. "resyn",
  2071. "reverb",
  2072. "reverb2",
  2073. "reverbsc",
  2074. "rewindscore",
  2075. "rezzy",
  2076. "rfft",
  2077. "rifft",
  2078. "rms",
  2079. "rnd",
  2080. "rnd31",
  2081. "round",
  2082. "rspline",
  2083. "rtclock",
  2084. "s16b14",
  2085. "s32b14",
  2086. "samphold",
  2087. "sandpaper",
  2088. "sc_lag",
  2089. "sc_lagud",
  2090. "sc_phasor",
  2091. "sc_trig",
  2092. "scale",
  2093. "scalearray",
  2094. "scanhammer",
  2095. "scans",
  2096. "scantable",
  2097. "scanu",
  2098. "schedkwhen",
  2099. "schedkwhennamed",
  2100. "schedule",
  2101. "schedwhen",
  2102. "scoreline",
  2103. "scoreline_i",
  2104. "seed",
  2105. "sekere",
  2106. "select",
  2107. "semitone",
  2108. "sense",
  2109. "sensekey",
  2110. "seqtime",
  2111. "seqtime2",
  2112. "serialBegin",
  2113. "serialEnd",
  2114. "serialFlush",
  2115. "serialPrint",
  2116. "serialRead",
  2117. "serialWrite",
  2118. "serialWrite_i",
  2119. "setcol",
  2120. "setctrl",
  2121. "setksmps",
  2122. "setrow",
  2123. "setscorepos",
  2124. "sfilist",
  2125. "sfinstr",
  2126. "sfinstr3",
  2127. "sfinstr3m",
  2128. "sfinstrm",
  2129. "sfload",
  2130. "sflooper",
  2131. "sfpassign",
  2132. "sfplay",
  2133. "sfplay3",
  2134. "sfplay3m",
  2135. "sfplaym",
  2136. "sfplist",
  2137. "sfpreset",
  2138. "shaker",
  2139. "shiftin",
  2140. "shiftout",
  2141. "signum",
  2142. "sin",
  2143. "sinh",
  2144. "sininv",
  2145. "sinsyn",
  2146. "sleighbells",
  2147. "slicearray",
  2148. "slicearray_i",
  2149. "slider16",
  2150. "slider16f",
  2151. "slider16table",
  2152. "slider16tablef",
  2153. "slider32",
  2154. "slider32f",
  2155. "slider32table",
  2156. "slider32tablef",
  2157. "slider64",
  2158. "slider64f",
  2159. "slider64table",
  2160. "slider64tablef",
  2161. "slider8",
  2162. "slider8f",
  2163. "slider8table",
  2164. "slider8tablef",
  2165. "sliderKawai",
  2166. "sndloop",
  2167. "sndwarp",
  2168. "sndwarpst",
  2169. "sockrecv",
  2170. "sockrecvs",
  2171. "socksend",
  2172. "socksends",
  2173. "sorta",
  2174. "sortd",
  2175. "soundin",
  2176. "space",
  2177. "spat3d",
  2178. "spat3di",
  2179. "spat3dt",
  2180. "spdist",
  2181. "splitrig",
  2182. "sprintf",
  2183. "sprintfk",
  2184. "spsend",
  2185. "sqrt",
  2186. "squinewave",
  2187. "statevar",
  2188. "stix",
  2189. "strcat",
  2190. "strcatk",
  2191. "strchar",
  2192. "strchark",
  2193. "strcmp",
  2194. "strcmpk",
  2195. "strcpy",
  2196. "strcpyk",
  2197. "strecv",
  2198. "streson",
  2199. "strfromurl",
  2200. "strget",
  2201. "strindex",
  2202. "strindexk",
  2203. "strlen",
  2204. "strlenk",
  2205. "strlower",
  2206. "strlowerk",
  2207. "strrindex",
  2208. "strrindexk",
  2209. "strset",
  2210. "strsub",
  2211. "strsubk",
  2212. "strtod",
  2213. "strtodk",
  2214. "strtol",
  2215. "strtolk",
  2216. "strupper",
  2217. "strupperk",
  2218. "stsend",
  2219. "subinstr",
  2220. "subinstrinit",
  2221. "sum",
  2222. "sumarray",
  2223. "svfilter",
  2224. "syncgrain",
  2225. "syncloop",
  2226. "syncphasor",
  2227. "system",
  2228. "system_i",
  2229. "tab",
  2230. "tab2array",
  2231. "tab2pvs",
  2232. "tab_i",
  2233. "tabifd",
  2234. "table",
  2235. "table3",
  2236. "table3kt",
  2237. "tablecopy",
  2238. "tablefilter",
  2239. "tablefilteri",
  2240. "tablegpw",
  2241. "tablei",
  2242. "tableicopy",
  2243. "tableigpw",
  2244. "tableikt",
  2245. "tableimix",
  2246. "tableiw",
  2247. "tablekt",
  2248. "tablemix",
  2249. "tableng",
  2250. "tablera",
  2251. "tableseg",
  2252. "tableshuffle",
  2253. "tableshufflei",
  2254. "tablew",
  2255. "tablewa",
  2256. "tablewkt",
  2257. "tablexkt",
  2258. "tablexseg",
  2259. "tabmorph",
  2260. "tabmorpha",
  2261. "tabmorphak",
  2262. "tabmorphi",
  2263. "tabplay",
  2264. "tabrec",
  2265. "tabrowlin",
  2266. "tabsum",
  2267. "tabw",
  2268. "tabw_i",
  2269. "tambourine",
  2270. "tan",
  2271. "tanh",
  2272. "taninv",
  2273. "taninv2",
  2274. "tbvcf",
  2275. "tempest",
  2276. "tempo",
  2277. "temposcal",
  2278. "tempoval",
  2279. "timedseq",
  2280. "timeinstk",
  2281. "timeinsts",
  2282. "timek",
  2283. "times",
  2284. "tival",
  2285. "tlineto",
  2286. "tone",
  2287. "tonek",
  2288. "tonex",
  2289. "tradsyn",
  2290. "trandom",
  2291. "transeg",
  2292. "transegb",
  2293. "transegr",
  2294. "trcross",
  2295. "trfilter",
  2296. "trhighest",
  2297. "trigger",
  2298. "trigseq",
  2299. "trim",
  2300. "trim_i",
  2301. "trirand",
  2302. "trlowest",
  2303. "trmix",
  2304. "trscale",
  2305. "trshift",
  2306. "trsplit",
  2307. "turnoff",
  2308. "turnoff2",
  2309. "turnon",
  2310. "tvconv",
  2311. "unirand",
  2312. "unwrap",
  2313. "upsamp",
  2314. "urandom",
  2315. "urd",
  2316. "vactrol",
  2317. "vadd",
  2318. "vadd_i",
  2319. "vaddv",
  2320. "vaddv_i",
  2321. "vaget",
  2322. "valpass",
  2323. "vaset",
  2324. "vbap",
  2325. "vbapg",
  2326. "vbapgmove",
  2327. "vbaplsinit",
  2328. "vbapmove",
  2329. "vbapz",
  2330. "vbapzmove",
  2331. "vcella",
  2332. "vco",
  2333. "vco2",
  2334. "vco2ft",
  2335. "vco2ift",
  2336. "vco2init",
  2337. "vcomb",
  2338. "vcopy",
  2339. "vcopy_i",
  2340. "vdel_k",
  2341. "vdelay",
  2342. "vdelay3",
  2343. "vdelayk",
  2344. "vdelayx",
  2345. "vdelayxq",
  2346. "vdelayxs",
  2347. "vdelayxw",
  2348. "vdelayxwq",
  2349. "vdelayxws",
  2350. "vdivv",
  2351. "vdivv_i",
  2352. "vecdelay",
  2353. "veloc",
  2354. "vexp",
  2355. "vexp_i",
  2356. "vexpseg",
  2357. "vexpv",
  2358. "vexpv_i",
  2359. "vibes",
  2360. "vibr",
  2361. "vibrato",
  2362. "vincr",
  2363. "vlimit",
  2364. "vlinseg",
  2365. "vlowres",
  2366. "vmap",
  2367. "vmirror",
  2368. "vmult",
  2369. "vmult_i",
  2370. "vmultv",
  2371. "vmultv_i",
  2372. "voice",
  2373. "vosim",
  2374. "vphaseseg",
  2375. "vport",
  2376. "vpow",
  2377. "vpow_i",
  2378. "vpowv",
  2379. "vpowv_i",
  2380. "vpvoc",
  2381. "vrandh",
  2382. "vrandi",
  2383. "vsubv",
  2384. "vsubv_i",
  2385. "vtaba",
  2386. "vtabi",
  2387. "vtabk",
  2388. "vtable1k",
  2389. "vtablea",
  2390. "vtablei",
  2391. "vtablek",
  2392. "vtablewa",
  2393. "vtablewi",
  2394. "vtablewk",
  2395. "vtabwa",
  2396. "vtabwi",
  2397. "vtabwk",
  2398. "vwrap",
  2399. "waveset",
  2400. "websocket",
  2401. "weibull",
  2402. "wgbow",
  2403. "wgbowedbar",
  2404. "wgbrass",
  2405. "wgclar",
  2406. "wgflute",
  2407. "wgpluck",
  2408. "wgpluck2",
  2409. "wguide1",
  2410. "wguide2",
  2411. "wiiconnect",
  2412. "wiidata",
  2413. "wiirange",
  2414. "wiisend",
  2415. "window",
  2416. "wrap",
  2417. "writescratch",
  2418. "wterrain",
  2419. "xadsr",
  2420. "xin",
  2421. "xout",
  2422. "xscanmap",
  2423. "xscans",
  2424. "xscansmap",
  2425. "xscanu",
  2426. "xtratim",
  2427. "xyscale",
  2428. "zacl",
  2429. "zakinit",
  2430. "zamod",
  2431. "zar",
  2432. "zarg",
  2433. "zaw",
  2434. "zawm",
  2435. "zdf_1pole",
  2436. "zdf_1pole_mode",
  2437. "zdf_2pole",
  2438. "zdf_2pole_mode",
  2439. "zdf_ladder",
  2440. "zfilter2",
  2441. "zir",
  2442. "ziw",
  2443. "ziwm",
  2444. "zkcl",
  2445. "zkmod",
  2446. "zkr",
  2447. "zkw",
  2448. "zkwm"
  2449. ];
  2450. var deprecatedOpcodes = [
  2451. "array",
  2452. "bformdec",
  2453. "bformenc",
  2454. "copy2ftab",
  2455. "copy2ttab",
  2456. "hrtfer",
  2457. "ktableseg",
  2458. "lentab",
  2459. "maxtab",
  2460. "mintab",
  2461. "pop",
  2462. "pop_f",
  2463. "push",
  2464. "push_f",
  2465. "scalet",
  2466. "sndload",
  2467. "soundout",
  2468. "soundouts",
  2469. "specaddm",
  2470. "specdiff",
  2471. "specdisp",
  2472. "specfilt",
  2473. "spechist",
  2474. "specptrk",
  2475. "specscal",
  2476. "specsum",
  2477. "spectrum",
  2478. "stack",
  2479. "sumtab",
  2480. "tabgen",
  2481. "tabmap",
  2482. "tabmap_i",
  2483. "tabslice",
  2484. "tb0",
  2485. "tb0_init",
  2486. "tb1",
  2487. "tb10",
  2488. "tb10_init",
  2489. "tb11",
  2490. "tb11_init",
  2491. "tb12",
  2492. "tb12_init",
  2493. "tb13",
  2494. "tb13_init",
  2495. "tb14",
  2496. "tb14_init",
  2497. "tb15",
  2498. "tb15_init",
  2499. "tb1_init",
  2500. "tb2",
  2501. "tb2_init",
  2502. "tb3",
  2503. "tb3_init",
  2504. "tb4",
  2505. "tb4_init",
  2506. "tb5",
  2507. "tb5_init",
  2508. "tb6",
  2509. "tb6_init",
  2510. "tb7",
  2511. "tb7_init",
  2512. "tb8",
  2513. "tb8_init",
  2514. "tb9",
  2515. "tb9_init",
  2516. "vbap16",
  2517. "vbap4",
  2518. "vbap4move",
  2519. "vbap8",
  2520. "vbap8move",
  2521. "xyin"
  2522. ];
  2523. opcodes = lang.arrayToMap(opcodes);
  2524. deprecatedOpcodes = lang.arrayToMap(deprecatedOpcodes);
  2525. this.lineContinuations = [
  2526. {
  2527. token : "constant.character.escape.line-continuation.csound",
  2528. regex : /\\$/
  2529. }, this.pushRule({
  2530. token : "constant.character.escape.line-continuation.csound",
  2531. regex : /\\/,
  2532. next : "line continuation"
  2533. })
  2534. ];
  2535. this.comments.push(this.lineContinuations);
  2536. this.quotedStringContents.push(
  2537. this.lineContinuations,
  2538. {
  2539. token : "invalid.illegal",
  2540. regex : /[^"\\]*$/
  2541. }
  2542. );
  2543. var start = this.$rules.start;
  2544. start.splice(1, 0, {
  2545. token : ["text.csound", "entity.name.label.csound", "entity.punctuation.label.csound", "text.csound"],
  2546. regex : /^([ \t]*)(\w+)(:)([ \t]+|$)/
  2547. });
  2548. start.push(
  2549. this.pushRule({
  2550. token : "keyword.function.csound",
  2551. regex : /\binstr\b/,
  2552. next : "instrument numbers and identifiers"
  2553. }), this.pushRule({
  2554. token : "keyword.function.csound",
  2555. regex : /\bopcode\b/,
  2556. next : "after opcode keyword"
  2557. }), {
  2558. token : "keyword.other.csound",
  2559. regex : /\bend(?:in|op)\b/
  2560. },
  2561. {
  2562. token : "variable.language.csound",
  2563. regex : /\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b/
  2564. },
  2565. this.numbers,
  2566. {
  2567. token : "keyword.operator.csound",
  2568. regex : "\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~¬]|[=!+\\-*/^%&|<>#?:]"
  2569. },
  2570. this.pushRule({
  2571. token : "punctuation.definition.string.begin.csound",
  2572. regex : /"/,
  2573. next : "quoted string"
  2574. }), this.pushRule({
  2575. token : "punctuation.definition.string.begin.csound",
  2576. regex : /{{/,
  2577. next : "braced string"
  2578. }),
  2579. {
  2580. token : "keyword.control.csound",
  2581. regex : /\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\b/
  2582. },
  2583. this.pushRule({
  2584. token : "keyword.control.csound",
  2585. regex : /\b[ik]?goto\b/,
  2586. next : "goto before label"
  2587. }), this.pushRule({
  2588. token : "keyword.control.csound",
  2589. regex : /\b(?:r(?:einit|igoto)|tigoto)\b/,
  2590. next : "goto before label"
  2591. }), this.pushRule({
  2592. token : "keyword.control.csound",
  2593. regex : /\bc(?:g|in?|k|nk?)goto\b/,
  2594. next : ["goto before label", "goto before argument"]
  2595. }), this.pushRule({
  2596. token : "keyword.control.csound",
  2597. regex : /\btimout\b/,
  2598. next : ["goto before label", "goto before argument", "goto before argument"]
  2599. }), this.pushRule({
  2600. token : "keyword.control.csound",
  2601. regex : /\bloop_[gl][et]\b/,
  2602. next : ["goto before label", "goto before argument", "goto before argument", "goto before argument"]
  2603. }),
  2604. this.pushRule({
  2605. token : "support.function.csound",
  2606. regex : /\b(?:readscore|scoreline(?:_i)?)\b/,
  2607. next : "Csound score opcode"
  2608. }), this.pushRule({
  2609. token : "support.function.csound",
  2610. regex : /\bpyl?run[it]?\b(?!$)/,
  2611. next : "Python opcode"
  2612. }), this.pushRule({
  2613. token : "support.function.csound",
  2614. regex : /\blua_(?:exec|opdef)\b(?!$)/,
  2615. next : "Lua opcode"
  2616. }),
  2617. {
  2618. token : "support.variable.csound",
  2619. regex : /\bp\d+\b/
  2620. }, {
  2621. regex : /\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b/, onMatch: function(value, currentState, stack, line) {
  2622. var tokens = value.split(this.splitRegex);
  2623. var name = tokens[1];
  2624. var type;
  2625. if (opcodes.hasOwnProperty(name))
  2626. type = "support.function.csound";
  2627. else if (deprecatedOpcodes.hasOwnProperty(name))
  2628. type = "invalid.deprecated.csound";
  2629. if (type) {
  2630. if (tokens[2]) {
  2631. return [
  2632. {type: type, value: name},
  2633. {type: "punctuation.type-annotation.csound", value: tokens[2]},
  2634. {type: "type-annotation.storage.type.csound", value: tokens[3]}
  2635. ];
  2636. }
  2637. return type;
  2638. }
  2639. return "text.csound";
  2640. }
  2641. }
  2642. );
  2643. this.$rules["macro parameter value list"].splice(2, 0, {
  2644. token : "punctuation.definition.string.begin.csound",
  2645. regex : /{{/,
  2646. next : "macro parameter value braced string"
  2647. });
  2648. this.addRules({
  2649. "macro parameter value braced string": [
  2650. {
  2651. token : "constant.character.escape.csound",
  2652. regex : /\\[#'()]/
  2653. }, {
  2654. token : "invalid.illegal.csound.csound",
  2655. regex : /[#'()]/
  2656. }, {
  2657. token : "punctuation.definition.string.end.csound",
  2658. regex : /}}/,
  2659. next : "macro parameter value list"
  2660. }, {
  2661. defaultToken: "string.braced.csound"
  2662. }
  2663. ],
  2664. "instrument numbers and identifiers": [
  2665. this.comments,
  2666. {
  2667. token : "entity.name.function.csound",
  2668. regex : /\d+|[A-Z_a-z]\w*/
  2669. }, this.popRule({
  2670. token : "empty",
  2671. regex : /$/
  2672. })
  2673. ],
  2674. "after opcode keyword": [
  2675. this.comments,
  2676. this.popRule({
  2677. token : "empty",
  2678. regex : /$/
  2679. }), this.popRule({
  2680. token : "entity.name.function.opcode.csound",
  2681. regex : /[A-Z_a-z]\w*/,
  2682. next : "opcode type signatures"
  2683. })
  2684. ],
  2685. "opcode type signatures": [
  2686. this.comments,
  2687. this.popRule({
  2688. token : "empty",
  2689. regex : /$/
  2690. }), {
  2691. token : "storage.type.csound",
  2692. regex : /\b(?:0|[afijkKoOpPStV\[\]]+)/
  2693. }
  2694. ],
  2695. "quoted string": [
  2696. this.popRule({
  2697. token : "punctuation.definition.string.end.csound",
  2698. regex : /"/
  2699. }),
  2700. this.quotedStringContents,
  2701. {
  2702. defaultToken: "string.quoted.csound"
  2703. }
  2704. ],
  2705. "braced string": [
  2706. this.popRule({
  2707. token : "punctuation.definition.string.end.csound",
  2708. regex : /}}/
  2709. }),
  2710. this.bracedStringContents,
  2711. {
  2712. defaultToken: "string.braced.csound"
  2713. }
  2714. ],
  2715. "goto before argument": [
  2716. this.popRule({
  2717. token : "text.csound",
  2718. regex : /,/
  2719. }),
  2720. start
  2721. ],
  2722. "goto before label": [
  2723. {
  2724. token : "text.csound",
  2725. regex : /\s+/
  2726. },
  2727. this.comments,
  2728. this.popRule({
  2729. token : "entity.name.label.csound",
  2730. regex : /\w+/
  2731. }), this.popRule({
  2732. token : "empty",
  2733. regex : /(?!\w)/
  2734. })
  2735. ],
  2736. "Csound score opcode": [
  2737. this.comments,
  2738. {
  2739. token : "punctuation.definition.string.begin.csound",
  2740. regex : /{{/,
  2741. next : "csound-score-start"
  2742. }, this.popRule({
  2743. token : "empty",
  2744. regex : /$/
  2745. })
  2746. ],
  2747. "Python opcode": [
  2748. this.comments,
  2749. {
  2750. token : "punctuation.definition.string.begin.csound",
  2751. regex : /{{/,
  2752. next : "python-start"
  2753. }, this.popRule({
  2754. token : "empty",
  2755. regex : /$/
  2756. })
  2757. ],
  2758. "Lua opcode": [
  2759. this.comments,
  2760. {
  2761. token : "punctuation.definition.string.begin.csound",
  2762. regex : /{{/,
  2763. next : "lua-start"
  2764. }, this.popRule({
  2765. token : "empty",
  2766. regex : /$/
  2767. })
  2768. ],
  2769. "line continuation": [
  2770. this.popRule({
  2771. token : "empty",
  2772. regex : /$/
  2773. }),
  2774. this.semicolonComments,
  2775. {
  2776. token : "invalid.illegal.csound",
  2777. regex : /\S.*/
  2778. }
  2779. ]
  2780. });
  2781. var rules = [
  2782. this.popRule({
  2783. token : "punctuation.definition.string.end.csound",
  2784. regex : /}}/
  2785. })
  2786. ];
  2787. this.embedRules(CsoundScoreHighlightRules, "csound-score-", rules);
  2788. this.embedRules(PythonHighlightRules, "python-", rules);
  2789. this.embedRules(LuaHighlightRules, "lua-", rules);
  2790. this.normalizeRules();
  2791. };
  2792. oop.inherits(CsoundOrchestraHighlightRules, CsoundPreprocessorHighlightRules);
  2793. exports.CsoundOrchestraHighlightRules = CsoundOrchestraHighlightRules;
  2794. });
  2795. ace.define("ace/mode/css_highlight_rules",[], function(require, exports, module) {
  2796. "use strict";
  2797. var oop = require("../lib/oop");
  2798. var lang = require("../lib/lang");
  2799. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  2800. 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";
  2801. var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
  2802. 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";
  2803. 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";
  2804. 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";
  2805. var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
  2806. var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
  2807. 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";
  2808. var CssHighlightRules = function() {
  2809. var keywordMapper = this.createKeywordMapper({
  2810. "support.function": supportFunction,
  2811. "support.constant": supportConstant,
  2812. "support.type": supportType,
  2813. "support.constant.color": supportConstantColor,
  2814. "support.constant.fonts": supportConstantFonts
  2815. }, "text", true);
  2816. this.$rules = {
  2817. "start" : [{
  2818. include : ["strings", "url", "comments"]
  2819. }, {
  2820. token: "paren.lparen",
  2821. regex: "\\{",
  2822. next: "ruleset"
  2823. }, {
  2824. token: "paren.rparen",
  2825. regex: "\\}"
  2826. }, {
  2827. token: "string",
  2828. regex: "@(?!viewport)",
  2829. next: "media"
  2830. }, {
  2831. token: "keyword",
  2832. regex: "#[a-z0-9-_]+"
  2833. }, {
  2834. token: "keyword",
  2835. regex: "%"
  2836. }, {
  2837. token: "variable",
  2838. regex: "\\.[a-z0-9-_]+"
  2839. }, {
  2840. token: "string",
  2841. regex: ":[a-z0-9-_]+"
  2842. }, {
  2843. token : "constant.numeric",
  2844. regex : numRe
  2845. }, {
  2846. token: "constant",
  2847. regex: "[a-z0-9-_]+"
  2848. }, {
  2849. caseInsensitive: true
  2850. }],
  2851. "media": [{
  2852. include : ["strings", "url", "comments"]
  2853. }, {
  2854. token: "paren.lparen",
  2855. regex: "\\{",
  2856. next: "start"
  2857. }, {
  2858. token: "paren.rparen",
  2859. regex: "\\}",
  2860. next: "start"
  2861. }, {
  2862. token: "string",
  2863. regex: ";",
  2864. next: "start"
  2865. }, {
  2866. token: "keyword",
  2867. regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
  2868. + "|page|font|keyframes|viewport|counter-style|font-feature-values"
  2869. + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
  2870. }],
  2871. "comments" : [{
  2872. token: "comment", // multi line comment
  2873. regex: "\\/\\*",
  2874. push: [{
  2875. token : "comment",
  2876. regex : "\\*\\/",
  2877. next : "pop"
  2878. }, {
  2879. defaultToken : "comment"
  2880. }]
  2881. }],
  2882. "ruleset" : [{
  2883. regex : "-(webkit|ms|moz|o)-",
  2884. token : "text"
  2885. }, {
  2886. token : "punctuation.operator",
  2887. regex : "[:;]"
  2888. }, {
  2889. token : "paren.rparen",
  2890. regex : "\\}",
  2891. next : "start"
  2892. }, {
  2893. include : ["strings", "url", "comments"]
  2894. }, {
  2895. token : ["constant.numeric", "keyword"],
  2896. 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|%)"
  2897. }, {
  2898. token : "constant.numeric",
  2899. regex : numRe
  2900. }, {
  2901. token : "constant.numeric", // hex6 color
  2902. regex : "#[a-f0-9]{6}"
  2903. }, {
  2904. token : "constant.numeric", // hex3 color
  2905. regex : "#[a-f0-9]{3}"
  2906. }, {
  2907. token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
  2908. regex : pseudoElements
  2909. }, {
  2910. token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
  2911. regex : pseudoClasses
  2912. }, {
  2913. include: "url"
  2914. }, {
  2915. token : keywordMapper,
  2916. regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
  2917. }, {
  2918. caseInsensitive: true
  2919. }],
  2920. url: [{
  2921. token : "support.function",
  2922. regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
  2923. push: [{
  2924. token : "support.function",
  2925. regex : "\\)",
  2926. next : "pop"
  2927. }, {
  2928. defaultToken: "string"
  2929. }]
  2930. }],
  2931. strings: [{
  2932. token : "string.start",
  2933. regex : "'",
  2934. push : [{
  2935. token : "string.end",
  2936. regex : "'|$",
  2937. next: "pop"
  2938. }, {
  2939. include : "escapes"
  2940. }, {
  2941. token : "constant.language.escape",
  2942. regex : /\\$/,
  2943. consumeLineEnd: true
  2944. }, {
  2945. defaultToken: "string"
  2946. }]
  2947. }, {
  2948. token : "string.start",
  2949. regex : '"',
  2950. push : [{
  2951. token : "string.end",
  2952. regex : '"|$',
  2953. next: "pop"
  2954. }, {
  2955. include : "escapes"
  2956. }, {
  2957. token : "constant.language.escape",
  2958. regex : /\\$/,
  2959. consumeLineEnd: true
  2960. }, {
  2961. defaultToken: "string"
  2962. }]
  2963. }],
  2964. escapes: [{
  2965. token : "constant.language.escape",
  2966. regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
  2967. }]
  2968. };
  2969. this.normalizeRules();
  2970. };
  2971. oop.inherits(CssHighlightRules, TextHighlightRules);
  2972. exports.CssHighlightRules = CssHighlightRules;
  2973. });
  2974. ace.define("ace/mode/doc_comment_highlight_rules",[], function(require, exports, module) {
  2975. "use strict";
  2976. var oop = require("../lib/oop");
  2977. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  2978. var DocCommentHighlightRules = function() {
  2979. this.$rules = {
  2980. "start" : [ {
  2981. token : "comment.doc.tag",
  2982. regex : "@[\\w\\d_]+" // TODO: fix email addresses
  2983. },
  2984. DocCommentHighlightRules.getTagRule(),
  2985. {
  2986. defaultToken : "comment.doc",
  2987. caseInsensitive: true
  2988. }]
  2989. };
  2990. };
  2991. oop.inherits(DocCommentHighlightRules, TextHighlightRules);
  2992. DocCommentHighlightRules.getTagRule = function(start) {
  2993. return {
  2994. token : "comment.doc.tag.storage.type",
  2995. regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
  2996. };
  2997. };
  2998. DocCommentHighlightRules.getStartRule = function(start) {
  2999. return {
  3000. token : "comment.doc", // doc comment
  3001. regex : "\\/\\*(?=\\*)",
  3002. next : start
  3003. };
  3004. };
  3005. DocCommentHighlightRules.getEndRule = function (start) {
  3006. return {
  3007. token : "comment.doc", // closing comment
  3008. regex : "\\*\\/",
  3009. next : start
  3010. };
  3011. };
  3012. exports.DocCommentHighlightRules = DocCommentHighlightRules;
  3013. });
  3014. ace.define("ace/mode/javascript_highlight_rules",[], function(require, exports, module) {
  3015. "use strict";
  3016. var oop = require("../lib/oop");
  3017. var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
  3018. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  3019. var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
  3020. var JavaScriptHighlightRules = function(options) {
  3021. var keywordMapper = this.createKeywordMapper({
  3022. "variable.language":
  3023. "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
  3024. "Namespace|QName|XML|XMLList|" + // E4X
  3025. "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
  3026. "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
  3027. "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
  3028. "SyntaxError|TypeError|URIError|" +
  3029. "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
  3030. "isNaN|parseFloat|parseInt|" +
  3031. "JSON|Math|" + // Other
  3032. "this|arguments|prototype|window|document" , // Pseudo
  3033. "keyword":
  3034. "const|yield|import|get|set|async|await|" +
  3035. "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
  3036. "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
  3037. "__parent__|__count__|escape|unescape|with|__proto__|" +
  3038. "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
  3039. "storage.type":
  3040. "const|let|var|function",
  3041. "constant.language":
  3042. "null|Infinity|NaN|undefined",
  3043. "support.function":
  3044. "alert",
  3045. "constant.language.boolean": "true|false"
  3046. }, "identifier");
  3047. var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
  3048. var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
  3049. "u[0-9a-fA-F]{4}|" + // unicode
  3050. "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
  3051. "[0-2][0-7]{0,2}|" + // oct
  3052. "3[0-7][0-7]?|" + // oct
  3053. "[4-7][0-7]?|" + //oct
  3054. ".)";
  3055. this.$rules = {
  3056. "no_regex" : [
  3057. DocCommentHighlightRules.getStartRule("doc-start"),
  3058. comments("no_regex"),
  3059. {
  3060. token : "string",
  3061. regex : "'(?=.)",
  3062. next : "qstring"
  3063. }, {
  3064. token : "string",
  3065. regex : '"(?=.)',
  3066. next : "qqstring"
  3067. }, {
  3068. token : "constant.numeric", // hexadecimal, octal and binary
  3069. regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
  3070. }, {
  3071. token : "constant.numeric", // decimal integers and floats
  3072. regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
  3073. }, {
  3074. token : [
  3075. "storage.type", "punctuation.operator", "support.function",
  3076. "punctuation.operator", "entity.name.function", "text","keyword.operator"
  3077. ],
  3078. regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
  3079. next: "function_arguments"
  3080. }, {
  3081. token : [
  3082. "storage.type", "punctuation.operator", "entity.name.function", "text",
  3083. "keyword.operator", "text", "storage.type", "text", "paren.lparen"
  3084. ],
  3085. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  3086. next: "function_arguments"
  3087. }, {
  3088. token : [
  3089. "entity.name.function", "text", "keyword.operator", "text", "storage.type",
  3090. "text", "paren.lparen"
  3091. ],
  3092. regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  3093. next: "function_arguments"
  3094. }, {
  3095. token : [
  3096. "storage.type", "punctuation.operator", "entity.name.function", "text",
  3097. "keyword.operator", "text",
  3098. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  3099. ],
  3100. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
  3101. next: "function_arguments"
  3102. }, {
  3103. token : [
  3104. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  3105. ],
  3106. regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
  3107. next: "function_arguments"
  3108. }, {
  3109. token : [
  3110. "entity.name.function", "text", "punctuation.operator",
  3111. "text", "storage.type", "text", "paren.lparen"
  3112. ],
  3113. regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
  3114. next: "function_arguments"
  3115. }, {
  3116. token : [
  3117. "text", "text", "storage.type", "text", "paren.lparen"
  3118. ],
  3119. regex : "(:)(\\s*)(function)(\\s*)(\\()",
  3120. next: "function_arguments"
  3121. }, {
  3122. token : "keyword",
  3123. regex : "from(?=\\s*('|\"))"
  3124. }, {
  3125. token : "keyword",
  3126. regex : "(?:" + kwBeforeRe + ")\\b",
  3127. next : "start"
  3128. }, {
  3129. token : ["support.constant"],
  3130. regex : /that\b/
  3131. }, {
  3132. token : ["storage.type", "punctuation.operator", "support.function.firebug"],
  3133. regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
  3134. }, {
  3135. token : keywordMapper,
  3136. regex : identifierRe
  3137. }, {
  3138. token : "punctuation.operator",
  3139. regex : /[.](?![.])/,
  3140. next : "property"
  3141. }, {
  3142. token : "storage.type",
  3143. regex : /=>/,
  3144. next : "start"
  3145. }, {
  3146. token : "keyword.operator",
  3147. regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
  3148. next : "start"
  3149. }, {
  3150. token : "punctuation.operator",
  3151. regex : /[?:,;.]/,
  3152. next : "start"
  3153. }, {
  3154. token : "paren.lparen",
  3155. regex : /[\[({]/,
  3156. next : "start"
  3157. }, {
  3158. token : "paren.rparen",
  3159. regex : /[\])}]/
  3160. }, {
  3161. token: "comment",
  3162. regex: /^#!.*$/
  3163. }
  3164. ],
  3165. property: [{
  3166. token : "text",
  3167. regex : "\\s+"
  3168. }, {
  3169. token : [
  3170. "storage.type", "punctuation.operator", "entity.name.function", "text",
  3171. "keyword.operator", "text",
  3172. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  3173. ],
  3174. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
  3175. next: "function_arguments"
  3176. }, {
  3177. token : "punctuation.operator",
  3178. regex : /[.](?![.])/
  3179. }, {
  3180. token : "support.function",
  3181. 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(?=\()/
  3182. }, {
  3183. token : "support.function.dom",
  3184. 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(?=\()/
  3185. }, {
  3186. token : "support.constant",
  3187. 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/
  3188. }, {
  3189. token : "identifier",
  3190. regex : identifierRe
  3191. }, {
  3192. regex: "",
  3193. token: "empty",
  3194. next: "no_regex"
  3195. }
  3196. ],
  3197. "start": [
  3198. DocCommentHighlightRules.getStartRule("doc-start"),
  3199. comments("start"),
  3200. {
  3201. token: "string.regexp",
  3202. regex: "\\/",
  3203. next: "regex"
  3204. }, {
  3205. token : "text",
  3206. regex : "\\s+|^$",
  3207. next : "start"
  3208. }, {
  3209. token: "empty",
  3210. regex: "",
  3211. next: "no_regex"
  3212. }
  3213. ],
  3214. "regex": [
  3215. {
  3216. token: "regexp.keyword.operator",
  3217. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  3218. }, {
  3219. token: "string.regexp",
  3220. regex: "/[sxngimy]*",
  3221. next: "no_regex"
  3222. }, {
  3223. token : "invalid",
  3224. regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
  3225. }, {
  3226. token : "constant.language.escape",
  3227. regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
  3228. }, {
  3229. token : "constant.language.delimiter",
  3230. regex: /\|/
  3231. }, {
  3232. token: "constant.language.escape",
  3233. regex: /\[\^?/,
  3234. next: "regex_character_class"
  3235. }, {
  3236. token: "empty",
  3237. regex: "$",
  3238. next: "no_regex"
  3239. }, {
  3240. defaultToken: "string.regexp"
  3241. }
  3242. ],
  3243. "regex_character_class": [
  3244. {
  3245. token: "regexp.charclass.keyword.operator",
  3246. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  3247. }, {
  3248. token: "constant.language.escape",
  3249. regex: "]",
  3250. next: "regex"
  3251. }, {
  3252. token: "constant.language.escape",
  3253. regex: "-"
  3254. }, {
  3255. token: "empty",
  3256. regex: "$",
  3257. next: "no_regex"
  3258. }, {
  3259. defaultToken: "string.regexp.charachterclass"
  3260. }
  3261. ],
  3262. "function_arguments": [
  3263. {
  3264. token: "variable.parameter",
  3265. regex: identifierRe
  3266. }, {
  3267. token: "punctuation.operator",
  3268. regex: "[, ]+"
  3269. }, {
  3270. token: "punctuation.operator",
  3271. regex: "$"
  3272. }, {
  3273. token: "empty",
  3274. regex: "",
  3275. next: "no_regex"
  3276. }
  3277. ],
  3278. "qqstring" : [
  3279. {
  3280. token : "constant.language.escape",
  3281. regex : escapedRe
  3282. }, {
  3283. token : "string",
  3284. regex : "\\\\$",
  3285. consumeLineEnd : true
  3286. }, {
  3287. token : "string",
  3288. regex : '"|$',
  3289. next : "no_regex"
  3290. }, {
  3291. defaultToken: "string"
  3292. }
  3293. ],
  3294. "qstring" : [
  3295. {
  3296. token : "constant.language.escape",
  3297. regex : escapedRe
  3298. }, {
  3299. token : "string",
  3300. regex : "\\\\$",
  3301. consumeLineEnd : true
  3302. }, {
  3303. token : "string",
  3304. regex : "'|$",
  3305. next : "no_regex"
  3306. }, {
  3307. defaultToken: "string"
  3308. }
  3309. ]
  3310. };
  3311. if (!options || !options.noES6) {
  3312. this.$rules.no_regex.unshift({
  3313. regex: "[{}]", onMatch: function(val, state, stack) {
  3314. this.next = val == "{" ? this.nextState : "";
  3315. if (val == "{" && stack.length) {
  3316. stack.unshift("start", state);
  3317. }
  3318. else if (val == "}" && stack.length) {
  3319. stack.shift();
  3320. this.next = stack.shift();
  3321. if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
  3322. return "paren.quasi.end";
  3323. }
  3324. return val == "{" ? "paren.lparen" : "paren.rparen";
  3325. },
  3326. nextState: "start"
  3327. }, {
  3328. token : "string.quasi.start",
  3329. regex : /`/,
  3330. push : [{
  3331. token : "constant.language.escape",
  3332. regex : escapedRe
  3333. }, {
  3334. token : "paren.quasi.start",
  3335. regex : /\${/,
  3336. push : "start"
  3337. }, {
  3338. token : "string.quasi.end",
  3339. regex : /`/,
  3340. next : "pop"
  3341. }, {
  3342. defaultToken: "string.quasi"
  3343. }]
  3344. });
  3345. if (!options || options.jsx != false)
  3346. JSX.call(this);
  3347. }
  3348. this.embedRules(DocCommentHighlightRules, "doc-",
  3349. [ DocCommentHighlightRules.getEndRule("no_regex") ]);
  3350. this.normalizeRules();
  3351. };
  3352. oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
  3353. function JSX() {
  3354. var tagRegex = identifierRe.replace("\\d", "\\d\\-");
  3355. var jsxTag = {
  3356. onMatch : function(val, state, stack) {
  3357. var offset = val.charAt(1) == "/" ? 2 : 1;
  3358. if (offset == 1) {
  3359. if (state != this.nextState)
  3360. stack.unshift(this.next, this.nextState, 0);
  3361. else
  3362. stack.unshift(this.next);
  3363. stack[2]++;
  3364. } else if (offset == 2) {
  3365. if (state == this.nextState) {
  3366. stack[1]--;
  3367. if (!stack[1] || stack[1] < 0) {
  3368. stack.shift();
  3369. stack.shift();
  3370. }
  3371. }
  3372. }
  3373. return [{
  3374. type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
  3375. value: val.slice(0, offset)
  3376. }, {
  3377. type: "meta.tag.tag-name.xml",
  3378. value: val.substr(offset)
  3379. }];
  3380. },
  3381. regex : "</?" + tagRegex + "",
  3382. next: "jsxAttributes",
  3383. nextState: "jsx"
  3384. };
  3385. this.$rules.start.unshift(jsxTag);
  3386. var jsxJsRule = {
  3387. regex: "{",
  3388. token: "paren.quasi.start",
  3389. push: "start"
  3390. };
  3391. this.$rules.jsx = [
  3392. jsxJsRule,
  3393. jsxTag,
  3394. {include : "reference"},
  3395. {defaultToken: "string"}
  3396. ];
  3397. this.$rules.jsxAttributes = [{
  3398. token : "meta.tag.punctuation.tag-close.xml",
  3399. regex : "/?>",
  3400. onMatch : function(value, currentState, stack) {
  3401. if (currentState == stack[0])
  3402. stack.shift();
  3403. if (value.length == 2) {
  3404. if (stack[0] == this.nextState)
  3405. stack[1]--;
  3406. if (!stack[1] || stack[1] < 0) {
  3407. stack.splice(0, 2);
  3408. }
  3409. }
  3410. this.next = stack[0] || "start";
  3411. return [{type: this.token, value: value}];
  3412. },
  3413. nextState: "jsx"
  3414. },
  3415. jsxJsRule,
  3416. comments("jsxAttributes"),
  3417. {
  3418. token : "entity.other.attribute-name.xml",
  3419. regex : tagRegex
  3420. }, {
  3421. token : "keyword.operator.attribute-equals.xml",
  3422. regex : "="
  3423. }, {
  3424. token : "text.tag-whitespace.xml",
  3425. regex : "\\s+"
  3426. }, {
  3427. token : "string.attribute-value.xml",
  3428. regex : "'",
  3429. stateName : "jsx_attr_q",
  3430. push : [
  3431. {token : "string.attribute-value.xml", regex: "'", next: "pop"},
  3432. {include : "reference"},
  3433. {defaultToken : "string.attribute-value.xml"}
  3434. ]
  3435. }, {
  3436. token : "string.attribute-value.xml",
  3437. regex : '"',
  3438. stateName : "jsx_attr_qq",
  3439. push : [
  3440. {token : "string.attribute-value.xml", regex: '"', next: "pop"},
  3441. {include : "reference"},
  3442. {defaultToken : "string.attribute-value.xml"}
  3443. ]
  3444. },
  3445. jsxTag
  3446. ];
  3447. this.$rules.reference = [{
  3448. token : "constant.language.escape.reference.xml",
  3449. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  3450. }];
  3451. }
  3452. function comments(next) {
  3453. return [
  3454. {
  3455. token : "comment", // multi line comment
  3456. regex : /\/\*/,
  3457. next: [
  3458. DocCommentHighlightRules.getTagRule(),
  3459. {token : "comment", regex : "\\*\\/", next : next || "pop"},
  3460. {defaultToken : "comment", caseInsensitive: true}
  3461. ]
  3462. }, {
  3463. token : "comment",
  3464. regex : "\\/\\/",
  3465. next: [
  3466. DocCommentHighlightRules.getTagRule(),
  3467. {token : "comment", regex : "$|^", next : next || "pop"},
  3468. {defaultToken : "comment", caseInsensitive: true}
  3469. ]
  3470. }
  3471. ];
  3472. }
  3473. exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
  3474. });
  3475. ace.define("ace/mode/xml_highlight_rules",[], function(require, exports, module) {
  3476. "use strict";
  3477. var oop = require("../lib/oop");
  3478. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  3479. var XmlHighlightRules = function(normalize) {
  3480. var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
  3481. this.$rules = {
  3482. start : [
  3483. {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
  3484. {
  3485. token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
  3486. regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
  3487. },
  3488. {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
  3489. {
  3490. token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
  3491. regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
  3492. },
  3493. {include : "tag"},
  3494. {token : "text.end-tag-open.xml", regex: "</"},
  3495. {token : "text.tag-open.xml", regex: "<"},
  3496. {include : "reference"},
  3497. {defaultToken : "text.xml"}
  3498. ],
  3499. processing_instruction : [{
  3500. token : "entity.other.attribute-name.decl-attribute-name.xml",
  3501. regex : tagRegex
  3502. }, {
  3503. token : "keyword.operator.decl-attribute-equals.xml",
  3504. regex : "="
  3505. }, {
  3506. include: "whitespace"
  3507. }, {
  3508. include: "string"
  3509. }, {
  3510. token : "punctuation.xml-decl.xml",
  3511. regex : "\\?>",
  3512. next : "start"
  3513. }],
  3514. doctype : [
  3515. {include : "whitespace"},
  3516. {include : "string"},
  3517. {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
  3518. {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
  3519. {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
  3520. ],
  3521. int_subset : [{
  3522. token : "text.xml",
  3523. regex : "\\s+"
  3524. }, {
  3525. token: "punctuation.int-subset.xml",
  3526. regex: "]",
  3527. next: "pop"
  3528. }, {
  3529. token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
  3530. regex : "(<\\!)(" + tagRegex + ")",
  3531. push : [{
  3532. token : "text",
  3533. regex : "\\s+"
  3534. },
  3535. {
  3536. token : "punctuation.markup-decl.xml",
  3537. regex : ">",
  3538. next : "pop"
  3539. },
  3540. {include : "string"}]
  3541. }],
  3542. cdata : [
  3543. {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
  3544. {token : "text.xml", regex : "\\s+"},
  3545. {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
  3546. ],
  3547. comment : [
  3548. {token : "comment.end.xml", regex : "-->", next : "start"},
  3549. {defaultToken : "comment.xml"}
  3550. ],
  3551. reference : [{
  3552. token : "constant.language.escape.reference.xml",
  3553. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  3554. }],
  3555. attr_reference : [{
  3556. token : "constant.language.escape.reference.attribute-value.xml",
  3557. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  3558. }],
  3559. tag : [{
  3560. token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
  3561. regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
  3562. next: [
  3563. {include : "attributes"},
  3564. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
  3565. ]
  3566. }],
  3567. tag_whitespace : [
  3568. {token : "text.tag-whitespace.xml", regex : "\\s+"}
  3569. ],
  3570. whitespace : [
  3571. {token : "text.whitespace.xml", regex : "\\s+"}
  3572. ],
  3573. string: [{
  3574. token : "string.xml",
  3575. regex : "'",
  3576. push : [
  3577. {token : "string.xml", regex: "'", next: "pop"},
  3578. {defaultToken : "string.xml"}
  3579. ]
  3580. }, {
  3581. token : "string.xml",
  3582. regex : '"',
  3583. push : [
  3584. {token : "string.xml", regex: '"', next: "pop"},
  3585. {defaultToken : "string.xml"}
  3586. ]
  3587. }],
  3588. attributes: [{
  3589. token : "entity.other.attribute-name.xml",
  3590. regex : tagRegex
  3591. }, {
  3592. token : "keyword.operator.attribute-equals.xml",
  3593. regex : "="
  3594. }, {
  3595. include: "tag_whitespace"
  3596. }, {
  3597. include: "attribute_value"
  3598. }],
  3599. attribute_value: [{
  3600. token : "string.attribute-value.xml",
  3601. regex : "'",
  3602. push : [
  3603. {token : "string.attribute-value.xml", regex: "'", next: "pop"},
  3604. {include : "attr_reference"},
  3605. {defaultToken : "string.attribute-value.xml"}
  3606. ]
  3607. }, {
  3608. token : "string.attribute-value.xml",
  3609. regex : '"',
  3610. push : [
  3611. {token : "string.attribute-value.xml", regex: '"', next: "pop"},
  3612. {include : "attr_reference"},
  3613. {defaultToken : "string.attribute-value.xml"}
  3614. ]
  3615. }]
  3616. };
  3617. if (this.constructor === XmlHighlightRules)
  3618. this.normalizeRules();
  3619. };
  3620. (function() {
  3621. this.embedTagRules = function(HighlightRules, prefix, tag){
  3622. this.$rules.tag.unshift({
  3623. token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
  3624. regex : "(<)(" + tag + "(?=\\s|>|$))",
  3625. next: [
  3626. {include : "attributes"},
  3627. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
  3628. ]
  3629. });
  3630. this.$rules[tag + "-end"] = [
  3631. {include : "attributes"},
  3632. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
  3633. onMatch : function(value, currentState, stack) {
  3634. stack.splice(0);
  3635. return this.token;
  3636. }}
  3637. ];
  3638. this.embedRules(HighlightRules, prefix, [{
  3639. token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
  3640. regex : "(</)(" + tag + "(?=\\s|>|$))",
  3641. next: tag + "-end"
  3642. }, {
  3643. token: "string.cdata.xml",
  3644. regex : "<\\!\\[CDATA\\["
  3645. }, {
  3646. token: "string.cdata.xml",
  3647. regex : "\\]\\]>"
  3648. }]);
  3649. };
  3650. }).call(TextHighlightRules.prototype);
  3651. oop.inherits(XmlHighlightRules, TextHighlightRules);
  3652. exports.XmlHighlightRules = XmlHighlightRules;
  3653. });
  3654. ace.define("ace/mode/html_highlight_rules",[], function(require, exports, module) {
  3655. "use strict";
  3656. var oop = require("../lib/oop");
  3657. var lang = require("../lib/lang");
  3658. var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
  3659. var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
  3660. var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
  3661. var tagMap = lang.createMap({
  3662. a : 'anchor',
  3663. button : 'form',
  3664. form : 'form',
  3665. img : 'image',
  3666. input : 'form',
  3667. label : 'form',
  3668. option : 'form',
  3669. script : 'script',
  3670. select : 'form',
  3671. textarea : 'form',
  3672. style : 'style',
  3673. table : 'table',
  3674. tbody : 'table',
  3675. td : 'table',
  3676. tfoot : 'table',
  3677. th : 'table',
  3678. tr : 'table'
  3679. });
  3680. var HtmlHighlightRules = function() {
  3681. XmlHighlightRules.call(this);
  3682. this.addRules({
  3683. attributes: [{
  3684. include : "tag_whitespace"
  3685. }, {
  3686. token : "entity.other.attribute-name.xml",
  3687. regex : "[-_a-zA-Z0-9:.]+"
  3688. }, {
  3689. token : "keyword.operator.attribute-equals.xml",
  3690. regex : "=",
  3691. push : [{
  3692. include: "tag_whitespace"
  3693. }, {
  3694. token : "string.unquoted.attribute-value.html",
  3695. regex : "[^<>='\"`\\s]+",
  3696. next : "pop"
  3697. }, {
  3698. token : "empty",
  3699. regex : "",
  3700. next : "pop"
  3701. }]
  3702. }, {
  3703. include : "attribute_value"
  3704. }],
  3705. tag: [{
  3706. token : function(start, tag) {
  3707. var group = tagMap[tag];
  3708. return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
  3709. "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
  3710. },
  3711. regex : "(</?)([-_a-zA-Z0-9:.]+)",
  3712. next: "tag_stuff"
  3713. }],
  3714. tag_stuff: [
  3715. {include : "attributes"},
  3716. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
  3717. ]
  3718. });
  3719. this.embedTagRules(CssHighlightRules, "css-", "style");
  3720. this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
  3721. if (this.constructor === HtmlHighlightRules)
  3722. this.normalizeRules();
  3723. };
  3724. oop.inherits(HtmlHighlightRules, XmlHighlightRules);
  3725. exports.HtmlHighlightRules = HtmlHighlightRules;
  3726. });
  3727. ace.define("ace/mode/csound_document_highlight_rules",[], function(require, exports, module) {
  3728. "use strict";
  3729. var oop = require("../lib/oop");
  3730. var CsoundOrchestraHighlightRules = require("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules;
  3731. var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules;
  3732. var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
  3733. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  3734. var CsoundDocumentHighlightRules = function() {
  3735. this.$rules = {
  3736. "start": [
  3737. {
  3738. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3739. regex : /(<)(CsoundSynthesi[sz]er)(>)/,
  3740. next : "synthesizer"
  3741. },
  3742. {defaultToken : "text.csound-document"}
  3743. ],
  3744. "synthesizer": [
  3745. {
  3746. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3747. regex : "(</)(CsoundSynthesi[sz]er)(>)",
  3748. next : "start"
  3749. }, {
  3750. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3751. regex : "(<)(CsInstruments)(>)",
  3752. next : "csound-start"
  3753. }, {
  3754. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3755. regex : "(<)(CsScore)(>)",
  3756. next : "csound-score-start"
  3757. }, {
  3758. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3759. regex : "(<)([Hh][Tt][Mm][Ll])(>)",
  3760. next : "html-start"
  3761. }
  3762. ]
  3763. };
  3764. this.embedRules(CsoundOrchestraHighlightRules, "csound-", [{
  3765. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3766. regex : "(</)(CsInstruments)(>)",
  3767. next : "synthesizer"
  3768. }]);
  3769. this.embedRules(CsoundScoreHighlightRules, "csound-score-", [{
  3770. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3771. regex : "(</)(CsScore)(>)",
  3772. next : "synthesizer"
  3773. }]);
  3774. this.embedRules(HtmlHighlightRules, "html-", [{
  3775. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3776. regex : "(</)([Hh][Tt][Mm][Ll])(>)",
  3777. next : "synthesizer"
  3778. }]);
  3779. this.normalizeRules();
  3780. };
  3781. oop.inherits(CsoundDocumentHighlightRules, TextHighlightRules);
  3782. exports.CsoundDocumentHighlightRules = CsoundDocumentHighlightRules;
  3783. });
  3784. ace.define("ace/mode/csound_document",[], function(require, exports, module) {
  3785. "use strict";
  3786. var oop = require("../lib/oop");
  3787. var TextMode = require("./text").Mode;
  3788. var CsoundDocumentHighlightRules = require("./csound_document_highlight_rules").CsoundDocumentHighlightRules;
  3789. var Mode = function() {
  3790. this.HighlightRules = CsoundDocumentHighlightRules;
  3791. };
  3792. oop.inherits(Mode, TextMode);
  3793. exports.Mode = Mode;
  3794. });
  3795. (function() {
  3796. ace.require(["ace/mode/csound_document"], function(m) {
  3797. if (typeof module == "object" && typeof exports == "object" && module) {
  3798. module.exports = m;
  3799. }
  3800. });
  3801. })();