MCPcopy Index your code
hub / github.com/ternjs/tern / parseFile

Function parseFile

lib/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 var astral = /[\uD800-\uDBFF]/g;
95

Callers 2

updateTextFunction · 0.85
resolveFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…