Fixed comment highlighting in AppleScript highlighter.

This commit is contained in:
Yaogang Lian 2014-05-23 08:05:56 -04:00
commit 066180b248
2 changed files with 5 additions and 24 deletions

View file

@ -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;
});
});

View file

@ -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"
}
]
}