MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / parseFile

Function parseFile

lib/web/tern/tern.js:80–92  ·  view source on GitHub ↗
(srv, file)

Source from the content-addressed store, hash-verified

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;

Callers 2

updateTextFunction · 0.85
resolveFileFunction · 0.85

Calls 2

signalMethod · 0.80
parseMethod · 0.65

Tested by

no test coverage detected