a53f122656a01ecdca71c42673652f34.js 130 KB

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