Support new getKeywords function

This commit is contained in:
Garen Torikian 2012-11-13 14:22:36 -08:00 • committed by nightwing
commit 1158798094
2 changed files with 4 additions and 3 deletions

View file

@ -65,7 +65,7 @@ var c_cppHighlightRules = function() {
"NULL|true|false|TRUE|FALSE" "NULL|true|false|TRUE|FALSE"
); );
var keywordMapper = exports.keywordMapper = this.createKeywordMapper({ var keywordMapper = this.$keywords = this.createKeywordMapper({
"keyword.control" : keywordControls, "keyword.control" : keywordControls,
"storage.type" : storageType, "storage.type" : storageType,
"storage.modifier" : storageModifiers, "storage.modifier" : storageModifiers,

View file

@ -28,7 +28,8 @@ var ObjectiveCHighlightRules = function() {
} }
]; ];
var cRules = new CHighlightRules().getRules(); var cObj = new CHighlightRules();
var cRules = cObj.getRules();
this.$rules = this.$rules =
{ {
@ -168,7 +169,7 @@ var ObjectiveCHighlightRules = function() {
"regex": C_Highlight_File.cFunctions "regex": C_Highlight_File.cFunctions
}, },
{ {
"token" : C_Highlight_File.keywordMapper, "token" : cObj.getKeywords(),
"regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" "regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
}, },
{ {