From 066180b248a3d75696823fcf047784613e2be6df Mon Sep 17 00:00:00 2001 From: Yaogang Lian Date: Fri, 23 May 2014 08:05:56 -0400 Subject: [PATCH] Fixed comment highlighting in AppleScript highlighter. --- lib/ace/mode/applescript.js | 10 +++------- lib/ace/mode/applescript_highlight_rules.js | 19 ++----------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/lib/ace/mode/applescript.js b/lib/ace/mode/applescript.js index 7d1c7d4f..121b73eb 100644 --- a/lib/ace/mode/applescript.js +++ b/lib/ace/mode/applescript.js @@ -28,10 +28,6 @@ * * ***** END LICENSE BLOCK ***** */ -/* - THIS FILE WAS AUTOGENERATED BY mode.tmpl.js -*/ - define(function(require, exports, module) { "use strict"; @@ -49,10 +45,10 @@ var Mode = function() { oop.inherits(Mode, TextMode); (function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; + this.lineCommentStart = "--"; + this.blockComment = {start: "(*", end: "*)"}; // Extra logic goes here. }).call(Mode.prototype); exports.Mode = Mode; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/applescript_highlight_rules.js b/lib/ace/mode/applescript_highlight_rules.js index 5b9afb26..d830d780 100644 --- a/lib/ace/mode/applescript_highlight_rules.js +++ b/lib/ace/mode/applescript_highlight_rules.js @@ -28,23 +28,10 @@ * * ***** END LICENSE BLOCK ***** */ -/* THIS FILE WAS AUTOGENERATED FROM AppleScript.tmLanguage (UUID: 777CF925-14B9-428E-B07B-17FAAB8FA27E) */ -/**************************************************************** - * IT MIGHT NOT BE PERFECT, PARTICULARLY: * - * IN DECIDING STATES TO TRANSITION TO, * - * IGNORING WHITESPACE, * - * IGNORING GROUPS WITH ?:, * - * EXTENDING EXISTING MODES, * - * GATHERING KEYWORDS, OR * - * DECIDING WHEN TO USE PUSH. * - * ...But it's a good start from an existing *.tmlanguage file. * - ****************************************************************/ - define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var AppleScriptHighlightRules = function() { @@ -91,7 +78,6 @@ var AppleScriptHighlightRules = function() { token: "comment", regex: "--.*$" }, - DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : "\\(\\*", @@ -136,11 +122,10 @@ var AppleScriptHighlightRules = function() { "comment": [ { token: "comment", // closing comment - regex: ".*?\\*\\)", + regex: "\\*\\)", next: "start" }, { - token: "comment", // comment spanning whole line - regex: ".+" + defaultToken: "comment" } ] }