Update modes to use new embed syntax
This commit is contained in:
parent
d9e7970d2a
commit
0bad27ff92
13 changed files with 102 additions and 120 deletions
|
|
@ -45,8 +45,6 @@ var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightR
|
|||
|
||||
var JavaScriptHighlightRules = function() {
|
||||
|
||||
var docComment = new DocCommentHighlightRules();
|
||||
|
||||
var keywords = lang.arrayToMap(
|
||||
("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
||||
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
|
||||
|
|
@ -71,7 +69,7 @@ var JavaScriptHighlightRules = function() {
|
|||
token : "comment",
|
||||
regex : "\\/\\/.*$"
|
||||
},
|
||||
docComment.getStartRule("doc-start"),
|
||||
new DocCommentHighlightRules().getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
regex : "\\/\\*",
|
||||
|
|
@ -168,9 +166,9 @@ var JavaScriptHighlightRules = function() {
|
|||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.addRules(docComment.getRules(), "doc-");
|
||||
this.$rules["doc-start"][0].next = "start";
|
||||
|
||||
this.embedRules(DocCommentHighlightRules, "doc-",
|
||||
[ new DocCommentHighlightRules().getEndRule("start") ]);
|
||||
};
|
||||
|
||||
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue