ajaxorg/ace — pull request #2178 by danyaPostfactum (2014-10-06 07:26:02+00:00)
Title: Add dart analyzer

Seems working. https://github.com/ajaxorg/ace/issues/2176

Can anybody help to improve my code?
I created and compiled to js the main file:
```
main(List args) {
var src = args[0];
var exports = args[1];
// ... run parser, fill errorListener.errors
exports.errors = errorListener.errors;
}
```
Then, I wrapped the code with define(..) and added the chunk:
```javascript
var main;
function dartMainRunner(fn) {
main = fn;
}

var errorList = {
set$errors : function(errors) {
this.errors = errors;
}
};

exports.run = function(src) {
main([src, errorList]);
return errorList.errors;
};
```
Can we make it better?