Determines if a node is in a return statement
@param {ASTNode} node - The node to be checked.
@returns {boolean} True if the node is in a return statement.
@private
553606
function isInReturnStatement(node) {
			while (node) {
				if (node.type === "ReturnStatement" ||
					(node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement")) {
					return true;
				}
				node = node.parent;
			}

			return false;
		}
130763
function isInLoop(node) {
    for (let currentNode = node; currentNode && !isFunction(currentNode); currentNode = currentNode.parent) {
        if (isLoop(currentNode)) {
            return true;
        }
    }

    return false;
}
336916
function isBlockNode(node) {
        if (!node) {
            return false;
        }
        var nodeType = node.nodeType;
        return nodeType == 1 && !inlineDisplayRegex.test(getComputedStyleProperty(node, "display"))
            || nodeType == 9 || nodeType == 11;
    }
1192353
def find_return_with_argument(self, node):
        
        for item in node.body:
            if isinstance(item, ast.Return) and item.value:
                return item
            elif not isinstance(item, ast.FunctionDef) and hasattr(item, 'body'):
                return_with_argument = self.find_return_with_argument(item)
                if return_with_argument:
                    return return_with_argument
851662
function check(node) {
            if (TARGET_NODE_TYPE.test(node.parent.type) &&
                isMixedWithParent(node) &&
                !shouldIgnore(node)
            ) {
                reportBothOperators(node);
            }
        }
996707
def visit_RETURN(self, node):
        
        if len(node.children) == 2:
            node.children[1] = (yield ToVisit(node.children[1]))
        yield node
384682
function (node) {
        var parent = node._parent;
        while(parent) {
            if (parent === this) {
                return true;
            }
            parent = parent._parent;
        }
        return false;
    }
513733
function check(node) {
    var initial = start(node).offset
    var final = end(node).offset

    if (generated(node)) {
      return null
    }

    return node.lang || /^\s*([~`])\1{2,}/.test(contents.slice(initial, final))
      ? 'fenced'
      : 'indented'
  }
854229
function isInFinally(node) {
    for (
        let currentNode = node;
        currentNode && currentNode.parent && !astUtils.isFunction(currentNode);
        currentNode = currentNode.parent
    ) {
        if (currentNode.parent.type === "TryStatement" && currentNode.parent.finalizer === currentNode) {
            return true;
        }
    }

    return false;
}
394653
function(node) {
						//only check nodes that are typed, we don't care about any others
						if(node.type && node.range) {
							if(!next && node.type === Estraverse.Syntax.Program && offset < node.range[0]) {
								//https://bugs.eclipse.org/bugs/show_bug.cgi?id=447454
								return Estraverse.VisitorOption.Break;
							}
							// Class and method declarations count offsets including the curly braces {} Bug 494484
							// When offset is touching both identifier and body, we want finder to return the identifier
							var bracesIncluded = false;							
							if (node.range[0] === offset && found && found.range[1] === offset && node.type === 'ClassBody' || node.type === 'FunctionExpression' && found && found.type === 'Identifier'){
								bracesIncluded = true;
							}

							if((!bracesIncluded && node.range[0] <= offset) || (bracesIncluded && node.range[0] < offset) ){
								found = node;
								if(parents) {
									parents.push(node);
								}
							} else {
								if(next) {
									found = node;
									if(parents) {
										parents.push(node);
									}
								}
								if(found.type !== Estraverse.Syntax.Program) {
									//we don't want to find the next node as the program root
									//if program has no children it will be returned on the next pass
									//https://bugs.eclipse.org/bugs/show_bug.cgi?id=442411
									return Estraverse.VisitorOption.Break;
								}
							}
						}
					}
747107
function isReactNode(node) {
  return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
}
559554
function isLoneBlock(node) {
            return node.parent.type === "BlockStatement" ||
                node.parent.type === "Program" ||

                // Don't report blocks in switch cases if the block is the only statement of the case.
                node.parent.type === "SwitchCase" && !(node.parent.consequent[0] === node && node.parent.consequent.length === 1);
        }
825170
function isInsideWithStatementBody(node) {
            if (node) {
                while (node.parent) {
                    if (node.parent.kind === 212 /* WithStatement */ && node.parent.statement === node) {
                        return true;
                    }
                    node = node.parent;
                }
            }
            return false;
        }
1285795
function checkNode(node, clone)
			{
				if (node != null)
				{
					if (clone.originalNode != node)
					{
						cleanNode(node);
					}
					else
					{
						node = node.firstChild;
						clone = clone.firstChild;
						
						while (node != null)
						{
							var nextNode = node.nextSibling;
							
							if (clone == null)
							{
								cleanNode(node);
							}
							else
							{
								checkNode(node, clone);
								clone = clone.nextSibling;
							}
	
							node = nextNode;
						}
					}
				}
			}
337044
function isParenthesisedTwice(node) {
            const previousToken = sourceCode.getTokenBefore(node, 1),
                nextToken = sourceCode.getTokenAfter(node, 1);

            return isParenthesised(node) && previousToken && nextToken &&
                astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] &&
                astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1];
        }
340949
private static Node returnedExpression(Node fn) {
    Node expectedBlock = NodeUtil.getFunctionBody(fn);
    if (!expectedBlock.hasOneChild()) {
      return null;
    }

    Node expectedReturn = expectedBlock.getFirstChild();
    if (!expectedReturn.isReturn()) {
      return null;
    }

    if (!expectedReturn.hasOneChild()) {
      return null;
    }

    return expectedReturn.getOnlyChild();
  }
201624
function isAppendEmptyString(node) {
		return node.operator === "+=" && node.right.type === "Literal" && node.right.value === "";
	}