Checks whether or not a given binary expression has non string literals.
@param {ASTNode} node - A node to check.
@returns {boolean} `true` if the node has non string literals.
975794
function hasNonStringLiteral(node) {
    if (isConcatenation(node)) {

        // `left` is deeper than `right` normally.
        return hasNonStringLiteral(node.right) || hasNonStringLiteral(node.left);
    }
    return !astUtils.isStringLiteral(node);
}
246599
public boolean isPreviousThan(Node node) {
        if (getEndLine() < node.getBeginLine()) {
            return true;
        } else if ((getEndLine() == node.getBeginLine()) && (getEndColumn() <= node.getBeginColumn())) {
            return true;
        }
        return false;
    }
472799
function isImportant(node) {
  return (
    node &&
    node.data &&
    node.data.partOfSpeech &&
    (node.data.partOfSpeech.indexOf('N') === 0 ||
      (node.data.partOfSpeech === 'JJ' &&
        isUpperCase(nlcstToString(node).charAt(0))))
  )
}
1148221
function isNowAccess (node) {
  return nodeType(node, exactMatch(nodeTypes.IDENTIFIER)) &&
        expressionType(node, exactMatch(basicTypes.UINT)) &&
        name(node, exactMatch('now'))
}
516479
function isStandAloneExpression(text) {
        var found = ASTWalker.findNodeAt(getAST(text), 0, text.length, function (nodeType, node) {
            if (nodeType === "Expression") {
                return true;
            }
            return false;
        });
        return found && found.node;
    }
176101
function isInferrable(node, init) {
            if (node.type !== "TSTypeAnnotation" || !node.typeAnnotation) {
                return false;
            }

            if (!init) {
                return false;
            }

            const annotation = node.typeAnnotation;

            if (annotation.type === "TSStringKeyword") {
                return (
                    (init.type === "Literal" &&
                        typeof init.value === "string") ||
                    (init.type === "TemplateElement" &&
                        (!init.expressions || init.expressions.length === 0))
                );
            }

            if (annotation.type === "TSBooleanKeyword") {
                return init.type === "Literal";
            }

            if (annotation.type === "TSNumberKeyword") {
                // Infinity is special
                if (
                    (init.type === "UnaryExpression" &&
                        init.operator === "-" &&
                        init.argument.type === "Identifier" &&
                        init.argument.name === "Infinity") ||
                    (init.type === "Identifier" && init.name === "Infinity")
                ) {
                    return true;
                }

                return (
                    init.type === "Literal" && typeof init.value === "number"
                );
            }

            return false;
        }
443231
function isDoubleLogicalNegating(node) {
		return node.operator === "!" &&
			node.argument.type === "UnaryExpression" &&
			node.argument.operator === "!";
	}
984821
function isSemanticPredicate( element ) {

    const type = element.expression.type;

    if ( type === "semantic_and" ) return true;
    if ( type === "semantic_not" ) return true;

    return false;

}
638894
function containsOnlyIdentifiers(node) {
            if (node.type === "Identifier") {
                return true;
            }

            if (node.type === "MemberExpression") {
                if (node.object.type === "Identifier") {
                    return true;
                }
                if (node.object.type === "MemberExpression") {
                    return containsOnlyIdentifiers(node.object);
                }
            }

            return false;
        }
305364
function validateExpression( node ) {
		var args,
			len,
			re,
			i;

		if ( node.callee.name === 'RegExp' ) {
			len = node.arguments.length;
			args = new Array( node.arguments.length );
			for ( i = 0; i < len; i++ ) {
				// NOTE: we only support literals ATM. Otherwise, we may need to walk and implement an entire tree.
				if ( node.arguments[ i ].type !== 'Literal' ) {
					return;
				}
				args[ i ] = node.arguments[ i ].value;
			}
			re = RegExp.apply( null, args );
			if ( !safe( re ) ) {
				context.report( node, 'Unsafe regular expression' );
			}
		}
	}
1056244
function validateNesting(node) {
  let queue = [...node.parent.children];
  let child;
  let opener;
  while (queue.length) {
    child = queue.shift();
    opener = child.openingElement;
    if (child.type === 'JSXElement' && opener && (opener.name.name === 'input' || opener.name.name === 'textarea')) {
      return true;
    }
    if (child.children) {
      queue = queue.concat(child.children);
    }
  }
  return false;
}
858497
public static boolean isNumber(JsonNode node, boolean isTypeLoose) {
        if (node.isNumber()) {
            return true;
        } else if (isTypeLoose) {
            if (TypeFactory.getValueNodeType(node) == JsonType.STRING) {
                return isNumeric(node.textValue());
            }
        }
        return false;
    }
583532
private function isIncludeJSONThrowOnErrorOption($node): Bool
    {
        if (!$node instanceof Node) {
            return false;
        }

        if ($node->kind === \ast\AST_CONST) {
            $name = $node->children["name"];
            if ($name->kind === \ast\AST_NAME && $name->children["name"] === "JSON_THROW_ON_ERROR") {
                return true;
            }
        }

        if ($node->kind === \ast\AST_BINARY_OP && $node->flags === \ast\flags\BINARY_BITWISE_OR) {
            return $this->isIncludeJSONThrowOnErrorOption($node->children["left"])
                     || $this->isIncludeJSONThrowOnErrorOption($node->children["right"]);
        }

        return false;
    }
322240
function isValidExpression(node) {
			if (allowTernary) {
				// Recursive check for ternary and logical expressions
				if (node.type === "ConditionalExpression") {
					return isValidExpression(node.consequent) && isValidExpression(node.alternate);
				}
			}
			if (allowShortCircuit) {
				if (node.type === "LogicalExpression") {
					return isValidExpression(node.right);
				}
			}

			return /^(?:Assignment|Call|New|Update|Yield)Expression$/.test(node.type) ||
				(node.type === "UnaryExpression" && ["delete", "void"].indexOf(node.operator) >= 0);
		}
507082
function isDirective(node) {
			return node.type === "ExpressionStatement" &&
				node.expression.type === "Literal" &&
				typeof node.expression.value === "string";
		}
497868
function isStrict(node) {
        if (node.type === 'Program' && node.sourceType === 'module') 
            return true;
        var nodes;
        if (node.type === 'Program') 
            nodes = node.body;
         else if (examine(node).isFunction) 
            nodes = node.body.body;
         else 
            return false;
        if (nodes) 
            for (var i = 0;i < nodes.length; i++) 
            if (examine(nodes[i]).isDirective && nodes[i].expression.value.match(/^\s*use\s+strict\s*$/)) 
            return true;
        return false;
    }
201624
function isAppendEmptyString(node) {
		return node.operator === "+=" && node.right.type === "Literal" && node.right.value === "";
	}