f3de8b166131cd8116c58b72e74de979.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ace.define("ace/mode/cuttlefish_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 CuttlefishHighlightRules = function () {
  5. this.$rules = {
  6. start: [{
  7. token: ['text', 'comment'],
  8. regex: /^([ \t]*)(#.*)$/
  9. }, {
  10. token: ['text', 'keyword', 'text', 'string', 'text', 'comment'],
  11. regex: /^([ \t]*)(include)([ \t]*)([A-Za-z0-9-\_\.\*\/]+)([ \t]*)(#.*)?$/
  12. }, {
  13. token: ['text', 'keyword', 'text', 'operator', 'text', 'string', 'text', 'comment'],
  14. regex: /^([ \t]*)([A-Za-z0-9-_]+(?:\.[A-Za-z0-9-_]+)*)([ \t]*)(=)([ \t]*)([^ \t#][^#]*?)([ \t]*)(#.*)?$/
  15. }, {
  16. defaultToken: 'invalid'
  17. }]
  18. };
  19. this.normalizeRules();
  20. };
  21. CuttlefishHighlightRules.metaData = {
  22. fileTypes: ['conf'],
  23. keyEquivalent: '^~C',
  24. name: 'Cuttlefish',
  25. scopeName: 'source.conf'
  26. };
  27. oop.inherits(CuttlefishHighlightRules, TextHighlightRules);
  28. exports.CuttlefishHighlightRules = CuttlefishHighlightRules;
  29. });
  30. ace.define("ace/mode/cuttlefish",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cuttlefish_highlight_rules"], function(require, exports, module){"use strict";
  31. var oop = require("../lib/oop");
  32. var TextMode = require("./text").Mode;
  33. var CuttlefishHighlightRules = require("./cuttlefish_highlight_rules").CuttlefishHighlightRules;
  34. var Mode = function () {
  35. this.HighlightRules = CuttlefishHighlightRules;
  36. this.foldingRules = null;
  37. this.$behaviour = this.$defaultBehaviour;
  38. };
  39. oop.inherits(Mode, TextMode);
  40. (function () {
  41. this.lineCommentStart = "#";
  42. this.blockComment = null;
  43. this.$id = "ace/mode/cuttlefish";
  44. }).call(Mode.prototype);
  45. exports.Mode = Mode;
  46. }); (function() {
  47. ace.require(["ace/mode/cuttlefish"], function(m) {
  48. if (typeof module == "object" && typeof exports == "object" && module) {
  49. module.exports = m;
  50. }
  51. });
  52. })();