create tokenizer only when needed

This commit is contained in:
nightwing 2013-09-09 18:08:23 +04:00
commit 811d190c95
95 changed files with 122 additions and 281 deletions

View file

@ -46,7 +46,7 @@ var unicode = require("../unicode");
var Mode = function(opts) {
var inline = opts && opts.inline;
var HighlightRules = inline ? PhpLangHighlightRules : PhpHighlightRules;
this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
this.HighlightRules = HighlightRules;
this.$outdent = new MatchingBraceOutdent();
this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();