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

Function postParse

plugin/doc_comment.js:32–50  ·  view source on GitHub ↗
(ast, text)

Source from the content-addressed store, hash-verified

30 });
31
32 function postParse(ast, text) {
33 function attachComments(node) { comment.ensureCommentsBefore(text, node); }
34
35 walk.simple(ast, {
36 VariableDeclaration: attachComments,
37 FunctionDeclaration: attachComments,
38 MethodDefinition: attachComments,
39 Property: attachComments,
40 AssignmentExpression: function(node) {
41 if (node.operator == "=") attachComments(node);
42 },
43 CallExpression: function(node) {
44 if (isDefinePropertyCall(node)) attachComments(node);
45 },
46 ExportNamedDeclaration: attachComments,
47 ExportDefaultDeclaration: attachComments,
48 ClassDeclaration: attachComments
49 });
50 }
51
52 function isDefinePropertyCall(node) {
53 return node.callee.type == "MemberExpression" &&

Callers

nothing calls this directly

Calls 2

attachCommentsFunction · 0.85
isDefinePropertyCallFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…