Added c-style behavior and fold mode / updated mode syntax.

As per Harutyun Amirjanyan's request I made the following two changes:
1) Added c-style behavior and fold mode.
2) Updated mode syntax for mel to current one used by Ace.
This commit is contained in:
Nicholas Breslow 2013-12-12 16:47:41 -05:00
commit cde625fde3

View file

@ -35,10 +35,13 @@ var oop = require("../lib/oop");
var TextMode = require("./text").Mode; var TextMode = require("./text").Mode;
var Tokenizer = require("../tokenizer").Tokenizer; var Tokenizer = require("../tokenizer").Tokenizer;
var MELHighlightRules = require("./mel_highlight_rules").MELHighlightRules; var MELHighlightRules = require("./mel_highlight_rules").MELHighlightRules;
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() { var Mode = function() {
var highlighter = new MELHighlightRules(); this.HighlightRules = MELHighlightRules;
this.$tokenizer = new Tokenizer(highlighter.getRules()); this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
}; };
oop.inherits(Mode, TextMode); oop.inherits(Mode, TextMode);