Select the expression on the current node

@param {gpf.xml.IXmlConstNode} node
@param {Object} expr
@private
514386
function _select (node, expr) {
        var
            resultSet,
            nodeSet = [node];
        while (expr) {
            resultSet = [];
            _test(nodeSet, expr, resultSet);
            if (0 === resultSet.length) {
                return [];
            }
            nodeSet = resultSet;
            if (expr.filter) {
                resultSet = [];
                _each(nodeSet, _filter, expr.filter, resultSet);
                if (0 === resultSet.length) {
                    return [];
                }
                nodeSet = resultSet;
            }
            expr = expr.then;
        }
        return resultSet;
    }
1236637
function handleExpr (node, options) {
  let expr

  if (node.type === 'unary_expr') {
    expr = `${node.operator} ${traverse(node.expr, options)}`
  } else if (node.operator === '=' && node.left.value === 1 && node.right.value === 1) {
    // a special case related to arcgis server
    return '1=1'
  } else if (node.operator === 'BETWEEN') {
    expr = traverse(node.left, options) + ' ' + (node.operator) + ' ' + (traverse(node.right.value[0], options)) + 'AND' + (traverse(node.right.value[1], options))
  } else {
    // store the column node for value decoding

    if (node.left.type === 'column_ref') {
      node.right.columnNode = node.left
    }

    if (node.right.type === 'column_ref') {
      node.left.columnNode = node.right
    }

    expr = `${traverse(node.left, options)} ${node.operator} ${traverse(node.right, options)}`
  }

  if (node.parentheses) {
    expr = `(${expr})`
  }

  return expr
}
1088100
function CallExpression(node) {
    if (t.isFunction(node.callee) || isHelper(node)) {
      return {
        before: true,
        after: true
      };
    }
  }
952286
def visit_Expr(self, node: ast.Expr) -> Any:
        """"""
        result = self.visit(node=node.value)

        self.recomputed_values[node] = result
        return result
425175
function toExpression(node) {
  if (t.isExpressionStatement(node)) {
    node = node.expression;
  }

  if (t.isClass(node)) {
    node.type = "ClassExpression";
  } else if (t.isFunction(node)) {
    node.type = "FunctionExpression";
  }

  if (t.isExpression(node)) {
    return node;
  } else {
    throw new Error("cannot turn " + node.type + " to an expression");
  }
}
647179
function _filter (node, expr, resultSet) {
        var
            selectedNodes,
            conditions,
            type,
            idx,
            condition;
        if (expr.and) {
            conditions = expr.and;
            type = 0;
        } else if (expr.or) {
            conditions = expr.or;
            type = 1;
        }
        for (idx = 0; idx < conditions.length; ++idx) {
            condition = conditions[idx];
            if (condition.and || condition.or) {
                selectedNodes = [];
                _filter(node, condition, selectedNodes);
            } else {
                selectedNodes = _select(node, condition);
            }
            if (0 === type && selectedNodes.length === 0) {
                return;
            }
            if (1 === type && selectedNodes.length !== 0) {
                resultSet.push(node);
                return;
            }
        }
        if (0 === type) {
            resultSet.push(node);
        }
    }
1191899
function (node) {
      let property;
      switch (node.type) {
        case 'ReturnStatement':
          property = 'argument';
          break;
        case 'ArrowFunctionExpression':
          property = 'body';
          break;
        default:
          return false;
      }

      const returnsJSX =
        node[property] &&
        node[property].type === 'JSXElement'
      ;
      const returnsReactCreateElement =
        node[property] &&
        node[property].callee &&
        node[property].callee.property &&
        node[property].callee.property.name === 'createElement'
      ;

      return Boolean(returnsJSX || returnsReactCreateElement);
    }
41275
function(type, node) {
    return seen.indexOf(node) == -1 && ((type == 'AssignmentExpression' && node.right == expr) || (type == 'VariableDeclarator' && node.init == expr));
  }
206797
function validateExpression(node) {
            if (node.body.type === "BlockStatement") {
                return;
            }

            const arrowToken = sourceCode.getTokenBefore(node.body, isNotOpeningParenToken);
            const firstTokenOfBody = sourceCode.getTokenAfter(arrowToken);

            if (arrowToken.loc.end.line === firstTokenOfBody.loc.start.line && option === "below") {
                context.report({
                    node: firstTokenOfBody,
                    messageId: "expected",
                    fix: fixer => fixer.insertTextBefore(firstTokenOfBody, "\n")
                });
            } else if (arrowToken.loc.end.line !== firstTokenOfBody.loc.start.line && option === "beside") {
                context.report({
                    node: firstTokenOfBody,
                    messageId: "unexpected",
                    fix(fixer) {
                        if (sourceCode.getFirstTokenBetween(arrowToken, firstTokenOfBody, { includeComments: true, filter: isCommentToken })) {
                            return null;
                        }

                        return fixer.replaceTextRange([arrowToken.range[1], firstTokenOfBody.range[0]], " ");
                    }
                });
            }
        }
984959
function assignToGlobal(expr, nodes, expression) {
    createGlobal(expr, nodes);
    if (!t.isExpression(expression)) {
      expression = t.toExpression(expression);
    }
    nodes.push(t.expressionStatement(t.assignmentExpression('=', expr, expression)));
  }
1063831
public void setExpression(AstNode expression) {
        assertNotNull(expression);
        expr = expression;
        expression.setParent(this);
        setLineno(expression.getLineno());
    }
122320
public static function fromExpression(ExpressionNode $expr) {
    $not = new static();
    $not->addChild(Token::not(), 'operator');
    /** @var \Pharborist\Node $expr */
    $not->addChild($expr->remove(), 'operand');
    return $not;
  }
1238631
function nodePrecedence(node, subNode, right) {
    var nodeType = node.type,
        nodePrecedence = expressionTypePrecedence[nodeType] || -1,
        subNodePrecedence = expressionTypePrecedence[subNode.type] || -1,
        nodeOperatorPrecedence,
        subNodeOperatorPrecedence;
    return nodePrecedence < subNodePrecedence || (nodePrecedence === subNodePrecedence && isLogicalBinary(nodeType) && ((nodeOperatorPrecedence = operatorPrecedence[node.operator]) < (subNodeOperatorPrecedence = operatorPrecedence[subNode.operator]) || (right && nodeOperatorPrecedence === subNodeOperatorPrecedence)));
}
1208683
public static Object execExpr(ExprResolver exprResolver, String expression) {

        try {
            // 返回输出的内容
            return exprResolver.executeExpr(expression);

        } catch (Exception e) {

            // 输出日志
            if (logger.isDebugEnabled()) {
                logger.debug("Can't resolving expression: " + expression, e);
            }
        }

        return null;
    }
439833
protected static function getParametersFromExpression(DOMNode $node, $expr)
	{
		$varNames   = XPathHelper::getVariables($expr);
		$paramNames = [];
		$xpath      = new DOMXPath($node->ownerDocument);
		foreach ($varNames as $name)
		{
			// Test whether this is the name of a local variable
			$query = 'ancestor-or-self::*/preceding-sibling::xsl:variable[@name="' . $name . '"]';
			if (!$xpath->query($query, $node)->length)
			{
				$paramNames[] = $name;
			}
		}

		return $paramNames;
	}
263773
public static <T> SQLQuery<T> select(Expression<T> expr) {
        return new SQLQuery<Void>().select(expr);
    }
897775
function isHeadOfExpressionStatement(node) {
			var parent = node.parent;

			while (parent) {
				switch (parent.type) {
					case "SequenceExpression":
						if (parent.expressions[0] !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "UnaryExpression":
					case "UpdateExpression":
						if (parent.prefix || isParenthesised(node)) {
							return false;
						}
						break;

					case "BinaryExpression":
					case "LogicalExpression":
						if (parent.left !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "ConditionalExpression":
						if (parent.test !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "CallExpression":
						if (parent.callee !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "MemberExpression":
						if (parent.object !== node || isParenthesised(node)) {
							return false;
						}
						break;

					case "ExpressionStatement":
						return true;

					default:
						return false;
				}

				node = parent;
				parent = parent.parent;
			}

			/* istanbul ignore next */
			throw new Error("unreachable");
		}