| 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 | }); |
| 31 | |
| 32 | 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"; |
| 33 | var oop = require("../lib/oop"); |
| 34 | var TextMode = require("./text").Mode; |
| 35 | var CuttlefishHighlightRules = require("./cuttlefish_highlight_rules").CuttlefishHighlightRules; |
| 36 | var Mode = function () { |
| 37 | this.HighlightRules = CuttlefishHighlightRules; |
| 38 | this.foldingRules = null; |
| 39 | this.$behaviour = this.$defaultBehaviour; |
| 40 | }; |
| 41 | oop.inherits(Mode, TextMode); |
| 42 | (function () { |
| 43 | this.lineCommentStart = "#"; |
| 44 | this.blockComment = null; |
| 45 | this.$id = "ace/mode/cuttlefish"; |
| 46 | }).call(Mode.prototype); |
| 47 | exports.Mode = Mode; |
| 48 | |
| 49 | }); (function() { |
| 50 | ace.require(["ace/mode/cuttlefish"], function(m) { |
| 51 | if (typeof module == "object" && typeof exports == "object" && module) { |
| 52 | module.exports = m; |
| 53 | } |
| 54 | }); |
| 55 | })(); |
| 56 |