…lines 1–92 unchanged (92 lines)
93
94 // Don't traverse functions unless they would normally
95 // be able to have a @this annotation associated with them. e.g.,
96 // var a = function() { }; // or
97 // function a() {} // or
98 // a.x = function() {};
99 int pType = parent.getType();
100 if (!(pType == Token.BLOCK ||
101 pType == Token.SCRIPT ||
102 pType == Token.NAME ||
103 pType == Token.ASSIGN)) {
104 return false;
105 }
106 }
107
108 if (parent != null && parent.getType() == Token.ASSIGN) {
109 Node lhs = parent.getFirstChild();
110 Node rhs = lhs.getNext();
111
…lines 112–146 unchanged (35 lines)
147 if (assignLhsChild != null) {
148 // Always report a THIS on the left side of an assign.
149 return true;
150 }
151
152 // Also report a THIS with a property access.
153 return parent != null && NodeUtil.isGet(parent);
154 }
155
156 /**
157 * Gets a function's JSDoc information, if it has any. Checks for a few
158 * patterns (ellipses show where JSDoc would be):
159 * <pre>
…lines 160–184 unchanged (25 lines)