Update modes to use new embed syntax

This commit is contained in:
c-spencer 2011-05-25 20:58:45 +01:00
commit 0bad27ff92
13 changed files with 102 additions and 120 deletions

View file

@ -47,8 +47,6 @@ var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightR
var c_cppHighlightRules = function() {
var docComment = new DocCommentHighlightRules();
var keywords = lang.arrayToMap(
("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|" +
"asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|" +
@ -73,7 +71,7 @@ var c_cppHighlightRules = function() {
token : "comment",
regex : "\\/\\/.*$"
},
docComment.getStartRule("doc-start"),
new DocCommentHighlightRules().getStartRule("start"),
{
token : "comment", // multi line comment
regex : "\\/\\*",
@ -161,9 +159,9 @@ var c_cppHighlightRules = function() {
}
]
};
this.addRules(docComment.getRules(), "doc-");
this.$rules["doc-start"][0].next = "start";
this.embedRules(DocCommentHighlightRules, "doc-",
[ new DocCommentHighlightRules().getEndRule("start") ]);
};
oop.inherits(c_cppHighlightRules, TextHighlightRules);