mode-kotlin.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. define("ace/mode/kotlin_highlight_rules",["ace_require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(ace_require, exports, module) {
  2. "use strict";
  3. var oop = ace_require("../lib/oop");
  4. var TextHighlightRules = ace_require("./text_highlight_rules").TextHighlightRules;
  5. var KotlinHighlightRules = function() {
  6. this.$rules = {
  7. start: [{
  8. include: "#comments"
  9. }, {
  10. token: [
  11. "text",
  12. "keyword.other.kotlin",
  13. "text",
  14. "entity.name.package.kotlin",
  15. "text"
  16. ],
  17. regex: /^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*))?/
  18. }, {
  19. include: "#imports"
  20. }, {
  21. include: "#statements"
  22. }],
  23. "#classes": [{
  24. token: "text",
  25. regex: /(?=\s*(?:companion|class|object|interface))/,
  26. push: [{
  27. token: "text",
  28. regex: /}|(?=$)/,
  29. next: "pop"
  30. }, {
  31. token: ["keyword.other.kotlin", "text"],
  32. regex: /\b((?:companion\s*)?)(class|object|interface)\b/,
  33. push: [{
  34. token: "text",
  35. regex: /(?=<|{|\(|:)/,
  36. next: "pop"
  37. }, {
  38. token: "keyword.other.kotlin",
  39. regex: /\bobject\b/
  40. }, {
  41. token: "entity.name.type.class.kotlin",
  42. regex: /\w+/
  43. }]
  44. }, {
  45. token: "text",
  46. regex: /</,
  47. push: [{
  48. token: "text",
  49. regex: />/,
  50. next: "pop"
  51. }, {
  52. include: "#generics"
  53. }]
  54. }, {
  55. token: "text",
  56. regex: /\(/,
  57. push: [{
  58. token: "text",
  59. regex: /\)/,
  60. next: "pop"
  61. }, {
  62. include: "#parameters"
  63. }]
  64. }, {
  65. token: "keyword.operator.declaration.kotlin",
  66. regex: /:/,
  67. push: [{
  68. token: "text",
  69. regex: /(?={|$)/,
  70. next: "pop"
  71. }, {
  72. token: "entity.other.inherited-class.kotlin",
  73. regex: /\w+/
  74. }, {
  75. token: "text",
  76. regex: /\(/,
  77. push: [{
  78. token: "text",
  79. regex: /\)/,
  80. next: "pop"
  81. }, {
  82. include: "#expressions"
  83. }]
  84. }]
  85. }, {
  86. token: "text",
  87. regex: /\{/,
  88. push: [{
  89. token: "text",
  90. regex: /\}/,
  91. next: "pop"
  92. }, {
  93. include: "#statements"
  94. }]
  95. }]
  96. }],
  97. "#comments": [{
  98. token: "punctuation.definition.comment.kotlin",
  99. regex: /\/\*/,
  100. push: [{
  101. token: "punctuation.definition.comment.kotlin",
  102. regex: /\*\//,
  103. next: "pop"
  104. }, {
  105. defaultToken: "comment.block.kotlin"
  106. }]
  107. }, {
  108. token: [
  109. "text",
  110. "punctuation.definition.comment.kotlin",
  111. "comment.line.double-slash.kotlin"
  112. ],
  113. regex: /(\s*)(\/\/)(.*$)/
  114. }],
  115. "#constants": [{
  116. token: "constant.language.kotlin",
  117. regex: /\b(?:true|false|null|this|super)\b/
  118. }, {
  119. token: "constant.numeric.kotlin",
  120. regex: /\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\b/
  121. }, {
  122. token: "constant.other.kotlin",
  123. regex: /\b[A-Z][A-Z0-9_]+\b/
  124. }],
  125. "#expressions": [{
  126. token: "text",
  127. regex: /\(/,
  128. push: [{
  129. token: "text",
  130. regex: /\)/,
  131. next: "pop"
  132. }, {
  133. include: "#expressions"
  134. }]
  135. }, {
  136. include: "#types"
  137. }, {
  138. include: "#strings"
  139. }, {
  140. include: "#constants"
  141. }, {
  142. include: "#comments"
  143. }, {
  144. include: "#keywords"
  145. }],
  146. "#functions": [{
  147. token: "text",
  148. regex: /(?=\s*fun)/,
  149. push: [{
  150. token: "text",
  151. regex: /}|(?=$)/,
  152. next: "pop"
  153. }, {
  154. token: "keyword.other.kotlin",
  155. regex: /\bfun\b/,
  156. push: [{
  157. token: "text",
  158. regex: /(?=\()/,
  159. next: "pop"
  160. }, {
  161. token: "text",
  162. regex: /</,
  163. push: [{
  164. token: "text",
  165. regex: />/,
  166. next: "pop"
  167. }, {
  168. include: "#generics"
  169. }]
  170. }, {
  171. token: ["text", "entity.name.function.kotlin"],
  172. regex: /((?:[\.<\?>\w]+\.)?)(\w+)/
  173. }]
  174. }, {
  175. token: "text",
  176. regex: /\(/,
  177. push: [{
  178. token: "text",
  179. regex: /\)/,
  180. next: "pop"
  181. }, {
  182. include: "#parameters"
  183. }]
  184. }, {
  185. token: "keyword.operator.declaration.kotlin",
  186. regex: /:/,
  187. push: [{
  188. token: "text",
  189. regex: /(?={|=|$)/,
  190. next: "pop"
  191. }, {
  192. include: "#types"
  193. }]
  194. }, {
  195. token: "text",
  196. regex: /\{/,
  197. push: [{
  198. token: "text",
  199. regex: /(?=\})/,
  200. next: "pop"
  201. }, {
  202. include: "#statements"
  203. }]
  204. }, {
  205. token: "keyword.operator.assignment.kotlin",
  206. regex: /=/,
  207. push: [{
  208. token: "text",
  209. regex: /(?=$)/,
  210. next: "pop"
  211. }, {
  212. include: "#expressions"
  213. }]
  214. }]
  215. }],
  216. "#generics": [{
  217. token: "keyword.operator.declaration.kotlin",
  218. regex: /:/,
  219. push: [{
  220. token: "text",
  221. regex: /(?=,|>)/,
  222. next: "pop"
  223. }, {
  224. include: "#types"
  225. }]
  226. }, {
  227. include: "#keywords"
  228. }, {
  229. token: "storage.type.generic.kotlin",
  230. regex: /\w+/
  231. }],
  232. "#getters-and-setters": [{
  233. token: ["entity.name.function.kotlin", "text"],
  234. regex: /\b(get)\b(\s*\(\s*\))/,
  235. push: [{
  236. token: "text",
  237. regex: /\}|(?=\bset\b)|$/,
  238. next: "pop"
  239. }, {
  240. token: "keyword.operator.assignment.kotlin",
  241. regex: /=/,
  242. push: [{
  243. token: "text",
  244. regex: /(?=$|\bset\b)/,
  245. next: "pop"
  246. }, {
  247. include: "#expressions"
  248. }]
  249. }, {
  250. token: "text",
  251. regex: /\{/,
  252. push: [{
  253. token: "text",
  254. regex: /\}/,
  255. next: "pop"
  256. }, {
  257. include: "#expressions"
  258. }]
  259. }]
  260. }, {
  261. token: ["entity.name.function.kotlin", "text"],
  262. regex: /\b(set)\b(\s*)(?=\()/,
  263. push: [{
  264. token: "text",
  265. regex: /\}|(?=\bget\b)|$/,
  266. next: "pop"
  267. }, {
  268. token: "text",
  269. regex: /\(/,
  270. push: [{
  271. token: "text",
  272. regex: /\)/,
  273. next: "pop"
  274. }, {
  275. include: "#parameters"
  276. }]
  277. }, {
  278. token: "keyword.operator.assignment.kotlin",
  279. regex: /=/,
  280. push: [{
  281. token: "text",
  282. regex: /(?=$|\bset\b)/,
  283. next: "pop"
  284. }, {
  285. include: "#expressions"
  286. }]
  287. }, {
  288. token: "text",
  289. regex: /\{/,
  290. push: [{
  291. token: "text",
  292. regex: /\}/,
  293. next: "pop"
  294. }, {
  295. include: "#expressions"
  296. }]
  297. }]
  298. }],
  299. "#imports": [{
  300. token: [
  301. "text",
  302. "keyword.other.kotlin",
  303. "text",
  304. "keyword.other.kotlin"
  305. ],
  306. regex: /^(\s*)(import)(\s+[^ $]+\s+)((?:as)?)/
  307. }],
  308. "#keywords": [{
  309. token: "storage.modifier.kotlin",
  310. regex: /\b(?:var|val|public|private|protected|abstract|final|enum|open|attribute|annotation|override|inline|var|val|vararg|lazy|in|out|internal|data|tailrec|operator|infix|const|yield|typealias|typeof)\b/
  311. }, {
  312. token: "keyword.control.catch-exception.kotlin",
  313. regex: /\b(?:try|catch|finally|throw)\b/
  314. }, {
  315. token: "keyword.control.kotlin",
  316. regex: /\b(?:if|else|while|for|do|return|when|where|break|continue)\b/
  317. }, {
  318. token: "keyword.operator.kotlin",
  319. regex: /\b(?:in|is|as|assert)\b/
  320. }, {
  321. token: "keyword.operator.comparison.kotlin",
  322. regex: /==|!=|===|!==|<=|>=|<|>/
  323. }, {
  324. token: "keyword.operator.assignment.kotlin",
  325. regex: /=/
  326. }, {
  327. token: "keyword.operator.declaration.kotlin",
  328. regex: /:/
  329. }, {
  330. token: "keyword.operator.dot.kotlin",
  331. regex: /\./
  332. }, {
  333. token: "keyword.operator.increment-decrement.kotlin",
  334. regex: /\-\-|\+\+/
  335. }, {
  336. token: "keyword.operator.arithmetic.kotlin",
  337. regex: /\-|\+|\*|\/|%/
  338. }, {
  339. token: "keyword.operator.arithmetic.assign.kotlin",
  340. regex: /\+=|\-=|\*=|\/=/
  341. }, {
  342. token: "keyword.operator.logical.kotlin",
  343. regex: /!|&&|\|\|/
  344. }, {
  345. token: "keyword.operator.range.kotlin",
  346. regex: /\.\./
  347. }, {
  348. token: "punctuation.terminator.kotlin",
  349. regex: /;/
  350. }],
  351. "#namespaces": [{
  352. token: "keyword.other.kotlin",
  353. regex: /\bnamespace\b/
  354. }, {
  355. token: "text",
  356. regex: /\{/,
  357. push: [{
  358. token: "text",
  359. regex: /\}/,
  360. next: "pop"
  361. }, {
  362. include: "#statements"
  363. }]
  364. }],
  365. "#parameters": [{
  366. token: "keyword.operator.declaration.kotlin",
  367. regex: /:/,
  368. push: [{
  369. token: "text",
  370. regex: /(?=,|\)|=)/,
  371. next: "pop"
  372. }, {
  373. include: "#types"
  374. }]
  375. }, {
  376. token: "keyword.operator.declaration.kotlin",
  377. regex: /=/,
  378. push: [{
  379. token: "text",
  380. regex: /(?=,|\))/,
  381. next: "pop"
  382. }, {
  383. include: "#expressions"
  384. }]
  385. }, {
  386. include: "#keywords"
  387. }, {
  388. token: "variable.parameter.function.kotlin",
  389. regex: /\w+/
  390. }],
  391. "#statements": [{
  392. include: "#namespaces"
  393. }, {
  394. include: "#typedefs"
  395. }, {
  396. include: "#classes"
  397. }, {
  398. include: "#functions"
  399. }, {
  400. include: "#variables"
  401. }, {
  402. include: "#getters-and-setters"
  403. }, {
  404. include: "#expressions"
  405. }],
  406. "#strings": [{
  407. token: "punctuation.definition.string.begin.kotlin",
  408. regex: /"""/,
  409. push: [{
  410. token: "punctuation.definition.string.end.kotlin",
  411. regex: /"""/,
  412. next: "pop"
  413. }, {
  414. token: "variable.parameter.template.kotlin",
  415. regex: /\$\w+|\$\{[^\}]+\}/
  416. }, {
  417. token: "constant.character.escape.kotlin",
  418. regex: /\\./
  419. }, {
  420. defaultToken: "string.quoted.third.kotlin"
  421. }]
  422. }, {
  423. token: "punctuation.definition.string.begin.kotlin",
  424. regex: /"/,
  425. push: [{
  426. token: "punctuation.definition.string.end.kotlin",
  427. regex: /"/,
  428. next: "pop"
  429. }, {
  430. token: "variable.parameter.template.kotlin",
  431. regex: /\$\w+|\$\{[^\}]+\}/
  432. }, {
  433. token: "constant.character.escape.kotlin",
  434. regex: /\\./
  435. }, {
  436. defaultToken: "string.quoted.double.kotlin"
  437. }]
  438. }, {
  439. token: "punctuation.definition.string.begin.kotlin",
  440. regex: /'/,
  441. push: [{
  442. token: "punctuation.definition.string.end.kotlin",
  443. regex: /'/,
  444. next: "pop"
  445. }, {
  446. token: "constant.character.escape.kotlin",
  447. regex: /\\./
  448. }, {
  449. defaultToken: "string.quoted.single.kotlin"
  450. }]
  451. }, {
  452. token: "punctuation.definition.string.begin.kotlin",
  453. regex: /`/,
  454. push: [{
  455. token: "punctuation.definition.string.end.kotlin",
  456. regex: /`/,
  457. next: "pop"
  458. }, {
  459. defaultToken: "string.quoted.single.kotlin"
  460. }]
  461. }],
  462. "#typedefs": [{
  463. token: "text",
  464. regex: /(?=\s*type)/,
  465. push: [{
  466. token: "text",
  467. regex: /(?=$)/,
  468. next: "pop"
  469. }, {
  470. token: "keyword.other.kotlin",
  471. regex: /\btype\b/
  472. }, {
  473. token: "text",
  474. regex: /</,
  475. push: [{
  476. token: "text",
  477. regex: />/,
  478. next: "pop"
  479. }, {
  480. include: "#generics"
  481. }]
  482. }, {
  483. include: "#expressions"
  484. }]
  485. }],
  486. "#types": [{
  487. token: "storage.type.buildin.kotlin",
  488. regex: /\b(?:Any|Unit|String|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic)\b/
  489. }, {
  490. token: "storage.type.buildin.array.kotlin",
  491. regex: /\b(?:IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\b/
  492. }, {
  493. token: [
  494. "storage.type.buildin.collection.kotlin",
  495. "text"
  496. ],
  497. regex: /\b(Array|List|Map)(<\b)/,
  498. push: [{
  499. token: "text",
  500. regex: />/,
  501. next: "pop"
  502. }, {
  503. include: "#types"
  504. }, {
  505. include: "#keywords"
  506. }]
  507. }, {
  508. token: "text",
  509. regex: /\w+</,
  510. push: [{
  511. token: "text",
  512. regex: />/,
  513. next: "pop"
  514. }, {
  515. include: "#types"
  516. }, {
  517. include: "#keywords"
  518. }]
  519. }, {
  520. token: ["keyword.operator.tuple.kotlin", "text"],
  521. regex: /(#)(\()/,
  522. push: [{
  523. token: "text",
  524. regex: /\)/,
  525. next: "pop"
  526. }, {
  527. include: "#expressions"
  528. }]
  529. }, {
  530. token: "text",
  531. regex: /\{/,
  532. push: [{
  533. token: "text",
  534. regex: /\}/,
  535. next: "pop"
  536. }, {
  537. include: "#statements"
  538. }]
  539. }, {
  540. token: "text",
  541. regex: /\(/,
  542. push: [{
  543. token: "text",
  544. regex: /\)/,
  545. next: "pop"
  546. }, {
  547. include: "#types"
  548. }]
  549. }, {
  550. token: "keyword.operator.declaration.kotlin",
  551. regex: /->/
  552. }],
  553. "#variables": [{
  554. token: "text",
  555. regex: /(?=\s*(?:var|val))/,
  556. push: [{
  557. token: "text",
  558. regex: /(?=:|=|$)/,
  559. next: "pop"
  560. }, {
  561. token: "keyword.other.kotlin",
  562. regex: /\b(?:var|val)\b/,
  563. push: [{
  564. token: "text",
  565. regex: /(?=:|=|$)/,
  566. next: "pop"
  567. }, {
  568. token: "text",
  569. regex: /</,
  570. push: [{
  571. token: "text",
  572. regex: />/,
  573. next: "pop"
  574. }, {
  575. include: "#generics"
  576. }]
  577. }, {
  578. token: ["text", "entity.name.variable.kotlin"],
  579. regex: /((?:[\.<\?>\w]+\.)?)(\w+)/
  580. }]
  581. }, {
  582. token: "keyword.operator.declaration.kotlin",
  583. regex: /:/,
  584. push: [{
  585. token: "text",
  586. regex: /(?==|$)/,
  587. next: "pop"
  588. }, {
  589. include: "#types"
  590. }, {
  591. include: "#getters-and-setters"
  592. }]
  593. }, {
  594. token: "keyword.operator.assignment.kotlin",
  595. regex: /=/,
  596. push: [{
  597. token: "text",
  598. regex: /(?=$)/,
  599. next: "pop"
  600. }, {
  601. include: "#expressions"
  602. }, {
  603. include: "#getters-and-setters"
  604. }]
  605. }]
  606. }]
  607. };
  608. this.normalizeRules();
  609. };
  610. KotlinHighlightRules.metaData = {
  611. fileTypes: ["kt", "kts"],
  612. name: "Kotlin",
  613. scopeName: "source.Kotlin"
  614. };
  615. oop.inherits(KotlinHighlightRules, TextHighlightRules);
  616. exports.KotlinHighlightRules = KotlinHighlightRules;
  617. });
  618. define("ace/mode/folding/cstyle",["ace_require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(ace_require, exports, module) {
  619. "use strict";
  620. var oop = ace_require("../../lib/oop");
  621. var Range = ace_require("../../range").Range;
  622. var BaseFoldMode = ace_require("./fold_mode").FoldMode;
  623. var FoldMode = exports.FoldMode = function(commentRegex) {
  624. if (commentRegex) {
  625. this.foldingStartMarker = new RegExp(
  626. this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
  627. );
  628. this.foldingStopMarker = new RegExp(
  629. this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
  630. );
  631. }
  632. };
  633. oop.inherits(FoldMode, BaseFoldMode);
  634. (function() {
  635. this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
  636. this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
  637. this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
  638. this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
  639. this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
  640. this._getFoldWidgetBase = this.getFoldWidget;
  641. this.getFoldWidget = function(session, foldStyle, row) {
  642. var line = session.getLine(row);
  643. if (this.singleLineBlockCommentRe.test(line)) {
  644. if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
  645. return "";
  646. }
  647. var fw = this._getFoldWidgetBase(session, foldStyle, row);
  648. if (!fw && this.startRegionRe.test(line))
  649. return "start"; // lineCommentRegionStart
  650. return fw;
  651. };
  652. this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
  653. var line = session.getLine(row);
  654. if (this.startRegionRe.test(line))
  655. return this.getCommentRegionBlock(session, line, row);
  656. var match = line.match(this.foldingStartMarker);
  657. if (match) {
  658. var i = match.index;
  659. if (match[1])
  660. return this.openingBracketBlock(session, match[1], row, i);
  661. var range = session.getCommentFoldRange(row, i + match[0].length, 1);
  662. if (range && !range.isMultiLine()) {
  663. if (forceMultiline) {
  664. range = this.getSectionRange(session, row);
  665. } else if (foldStyle != "all")
  666. range = null;
  667. }
  668. return range;
  669. }
  670. if (foldStyle === "markbegin")
  671. return;
  672. var match = line.match(this.foldingStopMarker);
  673. if (match) {
  674. var i = match.index + match[0].length;
  675. if (match[1])
  676. return this.closingBracketBlock(session, match[1], row, i);
  677. return session.getCommentFoldRange(row, i, -1);
  678. }
  679. };
  680. this.getSectionRange = function(session, row) {
  681. var line = session.getLine(row);
  682. var startIndent = line.search(/\S/);
  683. var startRow = row;
  684. var startColumn = line.length;
  685. row = row + 1;
  686. var endRow = row;
  687. var maxRow = session.getLength();
  688. while (++row < maxRow) {
  689. line = session.getLine(row);
  690. var indent = line.search(/\S/);
  691. if (indent === -1)
  692. continue;
  693. if (startIndent > indent)
  694. break;
  695. var subRange = this.getFoldWidgetRange(session, "all", row);
  696. if (subRange) {
  697. if (subRange.start.row <= startRow) {
  698. break;
  699. } else if (subRange.isMultiLine()) {
  700. row = subRange.end.row;
  701. } else if (startIndent == indent) {
  702. break;
  703. }
  704. }
  705. endRow = row;
  706. }
  707. return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
  708. };
  709. this.getCommentRegionBlock = function(session, line, row) {
  710. var startColumn = line.search(/\s*$/);
  711. var maxRow = session.getLength();
  712. var startRow = row;
  713. var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
  714. var depth = 1;
  715. while (++row < maxRow) {
  716. line = session.getLine(row);
  717. var m = re.exec(line);
  718. if (!m) continue;
  719. if (m[1]) depth--;
  720. else depth++;
  721. if (!depth) break;
  722. }
  723. var endRow = row;
  724. if (endRow > startRow) {
  725. return new Range(startRow, startColumn, endRow, line.length);
  726. }
  727. };
  728. }).call(FoldMode.prototype);
  729. });
  730. define("ace/mode/kotlin",["ace_require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(ace_require, exports, module) {
  731. "use strict";
  732. var oop = ace_require("../lib/oop");
  733. var TextMode = ace_require("./text").Mode;
  734. var KotlinHighlightRules = ace_require("./kotlin_highlight_rules").KotlinHighlightRules;
  735. var CstyleBehaviour = ace_require("./behaviour/cstyle").CstyleBehaviour;
  736. var FoldMode = ace_require("./folding/cstyle").FoldMode;
  737. var Mode = function() {
  738. this.HighlightRules = KotlinHighlightRules;
  739. this.foldingRules = new FoldMode();
  740. this.$behaviour = new CstyleBehaviour();
  741. };
  742. oop.inherits(Mode, TextMode);
  743. (function() {
  744. this.$id = "ace/mode/kotlin";
  745. }).call(Mode.prototype);
  746. exports.Mode = Mode;
  747. }); (function() {
  748. window.ace_require(["ace/mode/kotlin"], function(m) {
  749. if (typeof module == "object" && typeof exports == "object" && module) {
  750. module.exports = m;
  751. }
  752. });
  753. })();