(srv, file)
| 78 | File.prototype.asLineChar = function(pos) { return asLineChar(this, pos); }; |
| 79 | |
| 80 | function parseFile(srv, file) { |
| 81 | var options = { |
| 82 | directSourceFile: file, |
| 83 | allowReturnOutsideFunction: true, |
| 84 | allowImportExportEverywhere: true, |
| 85 | ecmaVersion: srv.options.ecmaVersion, |
| 86 | allowHashBang: true |
| 87 | } |
| 88 | var text = srv.signalReturnFirst("preParse", file.text, options) || file.text |
| 89 | var ast = infer.parse(text, options) |
| 90 | srv.signal("postParse", ast, text) |
| 91 | return ast |
| 92 | } |
| 93 | |
| 94 | function updateText(file, text, srv) { |
| 95 | file.text = srv.options.stripCRs ? text.replace(/\r\n/g, "\n") : text; |
no test coverage detected