Merge pull request #1180 from danyaPostfactum/php-worker
Add php worker
This commit is contained in:
commit
1dec807e36
3 changed files with 4931 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
|
|||
var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules;
|
||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||
var Range = require("../range").Range;
|
||||
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
||||
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
||||
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
||||
var unicode = require("../unicode");
|
||||
|
|
@ -137,6 +138,21 @@ oop.inherits(Mode, TextMode);
|
|||
this.$outdent.autoOutdent(doc, row);
|
||||
};
|
||||
|
||||
this.createWorker = function(session) {
|
||||
var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
|
||||
worker.attachToDocument(session.getDocument());
|
||||
|
||||
worker.on("error", function(e) {
|
||||
session.setAnnotations(e.data);
|
||||
});
|
||||
|
||||
worker.on("ok", function() {
|
||||
session.clearAnnotations();
|
||||
});
|
||||
|
||||
return worker;
|
||||
};
|
||||
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue