Add HACK and XXX
This commit is contained in:
parent
ed40c1f51f
commit
43cdfd792f
2 changed files with 14 additions and 9 deletions
|
|
@ -35,15 +35,13 @@ var oop = require("../lib/oop");
|
|||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var DocCommentHighlightRules = function() {
|
||||
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment.doc.tag",
|
||||
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
||||
}, {
|
||||
token : "comment.doc.tag",
|
||||
regex : "\\b(?:TODO|FIXME)\\b"
|
||||
}, {
|
||||
},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{
|
||||
defaultToken : "comment.doc",
|
||||
caseInsensitive: true
|
||||
}]
|
||||
|
|
@ -52,6 +50,13 @@ var DocCommentHighlightRules = function() {
|
|||
|
||||
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
||||
|
||||
DocCommentHighlightRules.getTagRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc.tag.storage.type",
|
||||
regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
|
||||
};
|
||||
}
|
||||
|
||||
DocCommentHighlightRules.getStartRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc", // doc comment
|
||||
|
|
|
|||
|
|
@ -302,22 +302,22 @@ var JavaScriptHighlightRules = function(options) {
|
|||
}
|
||||
],
|
||||
"comment_regex_allowed" : [
|
||||
{token : "storage.type", regex : "\\b(?:TODO|FIXME)\\b"},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{token : "comment", regex : "\\*\\/", next : "start"},
|
||||
{defaultToken : "comment", caseInsensitive: true}
|
||||
],
|
||||
"comment" : [
|
||||
{token : "storage.type", regex : "\\b(?:TODO|FIXME)\\b"},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
||||
{defaultToken : "comment", caseInsensitive: true}
|
||||
],
|
||||
"line_comment_regex_allowed" : [
|
||||
{token : "storage.type", regex : "\\b(?:TODO|FIXME)\\b"},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{token : "comment", regex : "$|^", next : "start"},
|
||||
{defaultToken : "comment", caseInsensitive: true}
|
||||
],
|
||||
"line_comment" : [
|
||||
{token : "storage.type", regex : "\\b(?:TODO|FIXME)\\b"},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{token : "comment", regex : "$|^", next : "no_regex"},
|
||||
{defaultToken : "comment", caseInsensitive: true}
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue