判断当前语句是否为define
@param expression
@returns {*}
760120
function isDefineStatement(expression) {

    var callee, type;

    type = expression.type;
    callee = expression.callee;

    return type === "CallExpression" && callee && callee.type === 'Identifier' && callee.name === "define";
}
259412
function(expression){
      var t = this,
          value = null;

      // Evaluate the expression
      try {
        value = eval(expression);
      } catch (e) {
        var err = 'Unable to evaluate expression: "' + expression + '"';
        logger.error('evaluate', err);
        throw new Error(err);
      }

      // Return the value
      return value;
    }
89088
@SuppressWarnings("unchecked")
    public static <T> Expression<T> extract(Expression<T> expr) {
        if (expr != null) {
            final Class<?> clazz = expr.getClass();
            if (clazz == PathImpl.class || clazz == PredicateOperation.class || clazz == ConstantImpl.class) {
                return expr;
            } else {
                return (Expression<T>) expr.accept(ExtractorVisitor.DEFAULT, null);
            }
        } else {
            return null;
        }
    }
629107
function getAttributeConditionExpression(babelTypes, nameAttribute, attribute) { // {{{
  if (typeof attribute === 'undefined' || attribute.value === null) {
    return babelTypes.booleanLiteral(true);
  }

  return attribute.value.expression;
}
386506
public Object eval(String expression) {
    	expression = transform(expression);
    	Object result = calculate(expression);
        return result;
    }
655129
function isRequireStatement(expression) {

    var callee, type;

    type = expression.type;
    callee = expression.callee;

    return type === "CallExpression" && callee && callee.type === 'Identifier' && callee.name === "require";

}
75528
function() {
    var node = this.expression();

    while (this.accept(',')) {
      if (node.isList) {
        list.push(this.expression());
      } else {
        var list = new nodes.Expression(true);
        list.push(node);
        list.push(this.expression());
        node = list;
      }
    }
    return node;
  }
276755
function(expression){
      var t = this,
          value = null;

      // Evaluate the expression
      try {
        value = eval(expression);
      } catch (e) {
        throw new Error('Unable to evaluate: ' + expression);
      }

      // Return the value
      return value;
    }
1029463
public static String defineExpressionNodeName(Expression e) {
        String nodeName = "expression";
        if (e instanceof Context) {
            nodeName = "context";
        } else if (e instanceof DecisionTable) {
            nodeName = "decisionTable";
        } else if (e instanceof FunctionDefinition) {
            nodeName = "functionDefinition";
        } else if (e instanceof Invocation) {
            nodeName = "invocation";
        } else if (e instanceof LiteralExpression) {
            nodeName = "literalExpression";
        } else if (e instanceof Relation) {
            nodeName = "relation";
        }
        return nodeName;
    }
951692
public static boolean evaluate(final String expression) {
        final Deque<String> operators = new ArrayDeque<>();
        final Deque<String> values = new ArrayDeque<>();
        final boolean result;

        char currentCharacter;
        int currentCharacterIndex = 0;

        try {
            while (currentCharacterIndex < expression.length()) {
                currentCharacter = expression.charAt(currentCharacterIndex);

                if (SeparatorToken.OPEN_PARENTHESIS.value == currentCharacter) {
                    operators.push(SeparatorToken.OPEN_PARENTHESIS.toString());
                    currentCharacterIndex += moveCursor(SeparatorToken.OPEN_PARENTHESIS.toString());
                } else if (SeparatorToken.SPACE.value == currentCharacter) {
                    currentCharacterIndex += moveCursor(SeparatorToken.SPACE.toString());
                } else if (SeparatorToken.CLOSE_PARENTHESIS.value == currentCharacter) {
                    evaluateSubexpression(operators, values);
                    currentCharacterIndex += moveCursor(SeparatorToken.CLOSE_PARENTHESIS.toString());
                } else if (!Character.isDigit(currentCharacter)) {
                    final String parsedNonDigit = parseNonDigits(expression, currentCharacterIndex);
                    if (isBoolean(parsedNonDigit)) {
                        values.push(replaceBooleanStringByIntegerRepresentation(parsedNonDigit));
                    } else {
                        operators.push(validateOperator(parsedNonDigit));
                    }
                    currentCharacterIndex += moveCursor(parsedNonDigit);
                } else if (Character.isDigit(currentCharacter)) {
                    final String parsedDigits = parseDigits(expression, currentCharacterIndex);
                    values.push(parsedDigits);
                    currentCharacterIndex += moveCursor(parsedDigits);
                }
            }

            result = Boolean.valueOf(evaluateExpressionStack(operators, values));

            if (log.isDebugEnabled()) {
                log.debug("Boolean expression {} evaluates to {}", expression, result);
            }
        } catch (final NoSuchElementException e) {
            throw new CitrusRuntimeException("Unable to parse boolean expression '" + expression + "'. Maybe expression is incomplete!", e);
        }

        return result;
    }
685623
public String resolve(String expression) {
    if (isEmpty(expression)) {
      return expression;
    }
    
    // Check if the expression is already been parsed
    if (cache.containsKey(expression)) {
      return cache.get(expression);

    }

    // If the expression does not start with $, then no need to do PATTERN
    if (!expression.startsWith("$")) {

      // Add to the mapping with key and value as expression
      cache.put(expression, expression);

      // If no match, then return the expression as it is
      return expression;

    }

    // Create the matcher
    Matcher matcher = PATTERN.matcher(expression);

    // If the matching is there, then add it to the map and return the value
    if (matcher.find()) {

      // Store the value
      String key = matcher.group(1);

      // Get the value
      String value = environment.getProperty(key);

      // Store the value in the setting
      if (value != null) {

        // Store in the map
        cache.put(expression, value);

        // return the value
        return value;

      }

    }

    // Add to the mapping with key and value as expression
    cache.put(expression, expression);

    // If no match, then return the expression as it is
    return expression;
  }
787048
function singleOrDefault(expression) {

		//Define output
		var outData;
		
		//If there's no expression
		if (!expression){
		
			//Just assign current items
			outData = this.items;
		}
		else{
		
			//Otherwise apply where condition
			outData = jslinq(this.items)
				.where(expression)
				.toList();
		}
	
        //If output list does not contains element, return null
        if (outData.length === 0)
            return null;

        //If contains just one element, returns element
        if (outData.length == 1)
            return outData[0];

        //If contains more than one element, throws
        throw new Error("Sequence contains " + outData.length + " matching elements");
    }
1001776
function getReferenceExpression ( expression ) {
  	var members = [], refinement;

  	while ( expression.t === MEMBER && expression.r.t === REFINEMENT ) {
  		refinement = expression.r;

  		if ( refinement.x ) {
  			if ( refinement.x.t === REFERENCE ) {
  				members.unshift( refinement.x );
  			} else {
  				members.unshift( flattenExpression( refinement.x ) );
  			}
  		} else {
  			members.unshift( refinement.n );
  		}

  		expression = expression.x;
  	}

  	if ( expression.t !== REFERENCE ) {
  		return null;
  	}

  	return {
  		r: expression.n,
  		m: members
  	};
  }
1030241
function(line) {
        //^
        // (\s*)        $1 opts leading spaces
        // ([\w$]+\s*)  $2 variable name & trailing spaces
        // (\=)         $3 division equals OR
        // \s*          opt spaces
        // (.*?)        rest of expression to assign
        // $
        var parts = line.match(/^(\s*)([\w$]+)\s*(\=)\s*(.*?)$/);
        if (!parts) return line;

        var leadingSpace = parts[1];
        var name = parts[2].trim();
        var operator = parts[3].trim();
        var rest = parts[4];

        return leadingSpace + 'const ' + name + ' ' + operator + ' ' + rest;
    }
155807
function isDefine(node, path) {
        if (node.type === Syntax.CallExpression
            && node.callee.type === Syntax.Identifier
            && node.callee.name === 'define') {

            // 查找当前作用域和父级作用域，如果存在 define 的定义，则不转换。
            // 此类情况一般都是内部 amd 实现。
            if (!util.existsFunction(path, node.callee)) {
                return true;
            }
        }

        return false;
    }
335932
public static Map<String, String> toBindMap(String expression) {
    if (Strings.empty(expression))
      return Collections.emptyMap();

    Deque<Character> escapes = new ArrayDeque<Character>();
    List<String> pairs = new ArrayList<String>();
    int index = 0;
    for (int i = 0; i < expression.length(); i++) {
      char c = expression.charAt(i);

      if (('"' == c && (escapes.isEmpty() || escapes.peek().charValue() != c))
          || '[' == c || '{' == c || '(' == c) {
        escapes.push(c);
      } else if (('"' == c && escapes.peek().charValue() == c) || ']' == c || '}' == c || ')' == c) {
        escapes.pop();
      }

      if (escapes.isEmpty() && ',' == c) {
        if (index < i)
          pairs.add(expression.substring(index, i));

        //skip comma & whitespace if any
        for (; i < expression.length() && (',' == expression.charAt(i) || ' ' == expression.charAt(i));)
          i++;

        //reset new start index
        index = i;
      }

    }

    //add last pair if needed
    if (index < expression.length()) {

      //chew up leading comma & whitespace if any
      //noinspection StatementWithEmptyBody
      for (; ',' == expression.charAt(index) || ' ' == expression.charAt(index); index++) ;

      final String pair = expression.substring(index, expression.length()).trim();

      //only consider this a pair if it has something in it!
      if (pair.length() > 1)
        pairs.add(pair);
    }

    //nice to preserve insertion order
    final Map<String, String> map = new LinkedHashMap<String, String>();
    for (String pair : pairs) {
      final String[] nameAndValue = pair.split("=", 2);

      //do some validation
      if (nameAndValue.length != 2)
        throw new IllegalArgumentException("Invalid parameter binding format: " + pair);

      Strings.nonEmpty(nameAndValue[0], "Cannot have an empty left hand side target parameter: " + pair);
      Strings.nonEmpty(nameAndValue[1], "Must provide a non-empty right hand side expression: " + pair);

      map.put(nameAndValue[0].trim(), nameAndValue[1].trim());
    }

    return Collections.unmodifiableMap(map);
  }
1124772
public static boolean isSpreadSafe(Expression expression) {
        if (expression instanceof MethodCallExpression) {
            return ((MethodCallExpression) expression).isSpreadSafe();
        }
        if (expression instanceof PropertyExpression) {
            return ((PropertyExpression) expression).isSpreadSafe();
        }
        return false;
    }