c856709d8ff07b9e3a72f0fd736437a5.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ace.define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/*
  2. THIS FILE WAS AUTOGENERATED BY Lisp.tmlanguage (UUID: 00D451C9-6B1D-11D9-8DFA-000D93589AF6) */
  3. "use strict";
  4. var oop = require("../lib/oop");
  5. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  6. var LispHighlightRules = function () {
  7. var keywordControl = "case|do|let|loop|if|else|when";
  8. var keywordOperator = "eq|neq|and|or";
  9. var constantLanguage = "null|nil";
  10. var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn";
  11. var keywordMapper = this.createKeywordMapper({
  12. "keyword.control": keywordControl,
  13. "keyword.operator": keywordOperator,
  14. "constant.language": constantLanguage,
  15. "support.function": supportFunctions
  16. }, "identifier", true);
  17. this.$rules =
  18. {
  19. "start": [
  20. {
  21. token: "comment",
  22. regex: ";.*$"
  23. },
  24. {
  25. token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"],
  26. regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"
  27. },
  28. {
  29. token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"],
  30. regex: "(#)((?:\\w|[\\\\+-=<>'\"&#])+)"
  31. },
  32. {
  33. token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"],
  34. regex: "(\\*)(\\S*)(\\*)"
  35. },
  36. {
  37. token: "constant.numeric",
  38. regex: "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
  39. },
  40. {
  41. token: "constant.numeric",
  42. regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
  43. },
  44. {
  45. token: keywordMapper,
  46. regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  47. },
  48. {
  49. token: "string",
  50. regex: '"(?=.)',
  51. next: "qqstring"
  52. }
  53. ],
  54. "qqstring": [
  55. {
  56. token: "constant.character.escape.lisp",
  57. regex: "\\\\."
  58. },
  59. {
  60. token: "string",
  61. regex: '[^"\\\\]+'
  62. }, {
  63. token: "string",
  64. regex: "\\\\$",
  65. next: "qqstring"
  66. }, {
  67. token: "string",
  68. regex: '"|$',
  69. next: "start"
  70. }
  71. ]
  72. };
  73. };
  74. oop.inherits(LispHighlightRules, TextHighlightRules);
  75. exports.LispHighlightRules = LispHighlightRules;
  76. });
  77. ace.define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module){/*
  78. THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
  79. */
  80. "use strict";
  81. var oop = require("../lib/oop");
  82. var TextMode = require("./text").Mode;
  83. var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules;
  84. var Mode = function () {
  85. this.HighlightRules = LispHighlightRules;
  86. this.$behaviour = this.$defaultBehaviour;
  87. };
  88. oop.inherits(Mode, TextMode);
  89. (function () {
  90. this.lineCommentStart = ";";
  91. this.$id = "ace/mode/lisp";
  92. }).call(Mode.prototype);
  93. exports.Mode = Mode;
  94. }); (function() {
  95. ace.require(["ace/mode/lisp"], function(m) {
  96. if (typeof module == "object" && typeof exports == "object" && module) {
  97. module.exports = m;
  98. }
  99. });
  100. })();