mode-properties.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. define("ace/mode/properties_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 PropertiesHighlightRules = function() {
  6. var escapeRe = /\\u[0-9a-fA-F]{4}|\\/;
  7. this.$rules = {
  8. "start" : [
  9. {
  10. token : "comment",
  11. regex : /[!#].*$/
  12. }, {
  13. token : "keyword",
  14. regex : /[=:]$/
  15. }, {
  16. token : "keyword",
  17. regex : /[=:]/,
  18. next : "value"
  19. }, {
  20. token : "constant.language.escape",
  21. regex : escapeRe
  22. }, {
  23. defaultToken: "variable"
  24. }
  25. ],
  26. "value" : [
  27. {
  28. regex : /\\$/,
  29. token : "string",
  30. next : "value"
  31. }, {
  32. regex : /$/,
  33. token : "string",
  34. next : "start"
  35. }, {
  36. token : "constant.language.escape",
  37. regex : escapeRe
  38. }, {
  39. defaultToken: "string"
  40. }
  41. ]
  42. };
  43. };
  44. oop.inherits(PropertiesHighlightRules, TextHighlightRules);
  45. exports.PropertiesHighlightRules = PropertiesHighlightRules;
  46. });
  47. define("ace/mode/properties",["ace_require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(ace_require, exports, module) {
  48. "use strict";
  49. var oop = ace_require("../lib/oop");
  50. var TextMode = ace_require("./text").Mode;
  51. var PropertiesHighlightRules = ace_require("./properties_highlight_rules").PropertiesHighlightRules;
  52. var Mode = function() {
  53. this.HighlightRules = PropertiesHighlightRules;
  54. this.$behaviour = this.$defaultBehaviour;
  55. };
  56. oop.inherits(Mode, TextMode);
  57. (function() {
  58. this.$id = "ace/mode/properties";
  59. }).call(Mode.prototype);
  60. exports.Mode = Mode;
  61. }); (function() {
  62. window.ace_require(["ace/mode/properties"], function(m) {
  63. if (typeof module == "object" && typeof exports == "object" && module) {
  64. module.exports = m;
  65. }
  66. });
  67. })();