Convenient method in case lambda expression is ambiguous for the compiler.
341246
public static <T1, T2, R> BiFunction biFunction(final BiFunction<T1, T2, R> lambda) {
		return lambda;
	}
1107612
function isDeclarationOfFunctionExpression(s) {
        if (s.valueDeclaration && s.valueDeclaration.kind === 218 /* VariableDeclaration */) {
            var declaration = s.valueDeclaration;
            return declaration.initializer && declaration.initializer.kind === 179 /* FunctionExpression */;
        }
        return false;
    }
883370
static boolean isBridgeMethodFor(Method bridgeMethod, Method candidateMethod, Map<TypeVariable, Type> typeVariableMap) {
		if (isResolvedTypeMatch(candidateMethod, bridgeMethod, typeVariableMap)) {
			return true;
		}
		Method method = findGenericDeclaration(bridgeMethod);
		return (method != null && isResolvedTypeMatch(method, candidateMethod, typeVariableMap));
	}
334969
private ParseTree parseMemberExpressionNoNew() {
    SourcePosition start = getTreeStartLocation();
    ParseTree operand;
    if (peekAsyncFunctionStart()) {
      operand = parseAsyncFunctionExpression();
    } else if (peekFunction()) {
      operand = parseFunctionExpression();
    } else {
      operand = parsePrimaryExpression();
    }
    while (peekMemberExpressionSuffix()) {
      switch (peekType()) {
        case OPEN_SQUARE:
          eat(TokenType.OPEN_SQUARE);
          ParseTree member = parseExpression();
          eat(TokenType.CLOSE_SQUARE);
          operand = new MemberLookupExpressionTree(
              getTreeLocation(start), operand, member);
          break;
        case PERIOD:
          eat(TokenType.PERIOD);
          IdentifierToken id = eatIdOrKeywordAsId();
          operand = new MemberExpressionTree(getTreeLocation(start), operand, id);
          break;
        case NO_SUBSTITUTION_TEMPLATE:
        case TEMPLATE_HEAD:
          operand = parseTemplateLiteral(operand);
          break;
        default:
          throw new RuntimeException("unreachable");
      }
    }
    return operand;
  }
331054
private Expression checker(Data data) throws TemplateException {
	Expression expr = null;
	// String
	if ((expr = string(data)) != null) {
	    expr = subDynamic(data, expr, false, false);
	    data.mode = STATIC;// (expr instanceof Literal)?STATIC:DYNAMIC;// STATIC
	    return expr;
	}
	// Number
	if ((expr = number(data)) != null) {
	    expr = subDynamic(data, expr, false, false);
	    data.mode = STATIC;// (expr instanceof Literal)?STATIC:DYNAMIC;// STATIC
	    return expr;
	}
	// closure
	if ((expr = closure(data)) != null) {
	    data.mode = DYNAMIC;
	    return expr;
	}
	// lambda
	if ((expr = lambda(data)) != null) {
	    data.mode = DYNAMIC;
	    return expr;
	}

	// Dynamic
	if ((expr = dynamic(data)) != null) {
	    expr = newOp(data, expr);
	    expr = subDynamic(data, expr, true, false);
	    data.mode = DYNAMIC;
	    return expr;
	}
	// Sharp
	if ((expr = sharp(data)) != null) {
	    data.mode = DYNAMIC;
	    return expr;
	}
	// JSON
	if ((expr = json(data, JSON_ARRAY, '[', ']')) != null) {
	    expr = subDynamic(data, expr, false, false);
	    data.mode = DYNAMIC;
	    return expr;
	}
	if ((expr = json(data, JSON_STRUCT, '{', '}')) != null) {
	    expr = subDynamic(data, expr, false, false);
	    data.mode = DYNAMIC;
	    return expr;
	}
	// else Error
	throw new TemplateException(data.srcCode, "Syntax Error, Invalid Construct");
    }
361667
private final EvalResult doDefine(List<SExpression> subexpressions, Environment environment,
      ParametricBfgBuilder builder, EvalContext context) {
    int nameToBind = subexpressions.get(1).getConstantIndex();
    if (subexpressions.size() == 3) {
      // (define name value-expression)
      // Binds a name to the value of value-expression
      Object valueToBind = eval(subexpressions.get(2), environment, builder, context).getValue();
      environment.bindName(nameToBind, valueToBind);
    } else if (subexpressions.size() >= 4) {
      // (define procedure-name (arg1 ...) procedure-body)
      // syntactic sugar equivalent to (define procedure-name (lambda (arg1 ...) procedure-body
      AmbLambdaValue lambdaValue =  makeLambda(subexpressions.get(2),
          subexpressions.subList(3, subexpressions.size()), environment);
      environment.bindName(nameToBind, lambdaValue);
    }
    return new EvalResult(ConstantValue.UNDEFINED);
  }
1229161
private Description checkToString(ExpressionTree tree, VisitorState state) {
    Symbol sym = ASTHelpers.getSymbol(tree);
    if (!(sym instanceof VarSymbol || sym instanceof MethodSymbol)) {
      return NO_MATCH;
    }
    Type type = ASTHelpers.getType(tree);
    if (type instanceof MethodType) {
      type = type.getReturnType();
    }
    Tree parent = state.getPath().getParentPath().getLeaf();
    ToStringKind toStringKind = isToString(parent, tree, state);
    if (toStringKind == ToStringKind.NONE) {
      return NO_MATCH;
    }
    if (!typePredicate().apply(type, state)) {
      return NO_MATCH;
    }
    Optional<Fix> fix;
    switch (toStringKind) {
      case IMPLICIT:
        fix = implicitToStringFix(tree, state);
        break;
      case EXPLICIT:
        fix = toStringFix(parent, tree, state);
        break;
      default:
        throw new AssertionError(toStringKind);
    }
    return maybeFix(tree, state, type, fix);
  }
1192402
@Deprecated
    protected boolean tryBridgeMethod(MethodNode target, Expression receiver, boolean implicitThis, TupleExpression args) {
        return tryBridgeMethod(target, receiver, implicitThis, args, null);
    }
810040
def compile(expression, escape_funcs=None, unescape_funcs=None):
    
    return _compile_from_parse_tree(
        parse_regex(tokenize_regex(expression)),
        escape_funcs=escape_funcs,
        unescape_funcs=unescape_funcs)
171850
@Override
    public void visitIdent(JCIdent tree) {
        if (context == null || !analyzer.lambdaIdentSymbolFilter(tree.sym)) {
            super.visitIdent(tree);
        } else {
            int prevPos = make.pos;
            try {
                make.at(tree);

                LambdaTranslationContext lambdaContext = (LambdaTranslationContext) context;
                JCTree ltree = lambdaContext.translate(tree);
                if (ltree != null) {
                    result = ltree;
                } else {
                    //access to untranslated symbols (i.e. compile-time constants,
                    //members defined inside the lambda body, etc.) )
                    super.visitIdent(tree);
                }
            } finally {
                make.at(prevPos);
            }
        }
    }
1275872
static <T> Parser<T> buildExpressionParser(
      final Parser<? extends T> term, final Operator... ops) {
    if (ops.length == 0) return term.cast();
    int begin = 0;
    int precedence = ops[0].precedence;
    Associativity associativity = ops[0].associativity;
    int end = 0;
    Parser<T> ret = term.cast();
    for (int i = 1; i < ops.length; i++) {
      Operator op = ops[i];
      end = i;
      if (op.precedence == precedence && op.associativity == associativity) {
        continue;
      }
      end = i;
      Parser<?> p = slice(ops, begin, end);
      ret = build(p, associativity, ret);
      begin = i;
      precedence = ops[i].precedence;
      associativity = ops[i].associativity;
    }
    if (end != ops.length) {
      end = ops.length;
      associativity = ops[begin].associativity;
      Parser<?> p = slice(ops, begin, end);
      ret = build(p, associativity, ret);
    }
    return ret;
  }
842147
private boolean isValidTreeType(Tree t) {
    if (t instanceof LambdaExpressionTree) {
      return true;
    }
    if (t instanceof ClassTree) {
      NestingKind nestingKind = ASTHelpers.getSymbol((ClassTree) t).getNestingKind();
      return nestingKind.equals(NestingKind.ANONYMOUS) || nestingKind.equals(NestingKind.LOCAL);
    }
    return false;
  }
113400
final public void LambdaExpression() throws ParseException {
                                             /*@bgen(jjtree) LambdaExpression */
  AstLambdaExpression jjtn000 = new AstLambdaExpression(JJTLAMBDAEXPRESSION);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      LambdaParameters();
      jj_consume_token(ARROW);
      if (jj_2_3(3)) {
        LambdaExpression();
      } else {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case START_SET_OR_MAP:
        case INTEGER_LITERAL:
        case FLOATING_POINT_LITERAL:
        case STRING_LITERAL:
        case TRUE:
        case FALSE:
        case NULL:
        case LPAREN:
        case LBRACK:
        case NOT0:
        case NOT1:
        case EMPTY:
        case MINUS:
        case IDENTIFIER:
          Choice();
          break;
        default:
          jj_la1[4] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
    } catch (Throwable jjte000) {
      if (jjtc000) {
        jjtree.clearNodeScope(jjtn000);
        jjtc000 = false;
      } else {
        jjtree.popNode();
      }
      if (jjte000 instanceof RuntimeException) {
        {if (true) throw (RuntimeException)jjte000;}
      }
      if (jjte000 instanceof ParseException) {
        {if (true) throw (ParseException)jjte000;}
      }
      {if (true) throw (Error)jjte000;}
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }
809166
public ITreeAppendable compile(XBlockExpression expr, ITreeAppendable b, LightweightTypeReference expectedReturnType) {
		final boolean isPrimitiveVoidExpected = expectedReturnType.isPrimitiveVoid(); 
		final boolean isPrimitiveVoid = isPrimitiveVoid(expr);
		final boolean earlyExit = isEarlyExit(expr);
		final boolean isImplicitReturn = !isPrimitiveVoidExpected && !isPrimitiveVoid && !earlyExit;
		final EList<XExpression> expressions = expr.getExpressions();
		for (int i = 0; i < expressions.size(); i++) {
			XExpression ex = expressions.get(i);
			if (i < expressions.size() - 1) {
				internalToJavaStatement(ex, b.trace(ex, true), false);
			} else {
				internalToJavaStatement(ex, b.trace(ex, true), isImplicitReturn);
				if (isImplicitReturn) {
					b.newLine().append("return (");
					internalToConvertedExpression(ex, b, expectedReturnType);
					b.append(");");
				}
			}
		}
		return b;
	}
829793
private static Method lambdaMethod(SerializedLambda serializedLambda) {
        Class<?> containingClass = getClassForName(serializedLambda.getImplClass());
        String implMethodName = serializedLambda.getImplMethodName();
        return getMethod(containingClass, implMethodName);
    }
958232
def Compile(self, filter_implemention):
    """"""
    operator = self.operator.lower()
    if operator == "and" or operator == "&&":
      method = "AndFilter"
    elif operator == "or" or operator == "||":
      method = "OrFilter"
    else:
      raise ParseError("Invalid binary operator %s" % operator)

    args = [x.Compile(filter_implemention) for x in self.args]
    return filter_implemention.FILTERS[method](arguments=args)
1061266
@SuppressWarnings("unchecked")
    <T extends JCExpression, Z extends ArgumentType<T>> void processArg(T that, Function<T, Z> argumentTypeFactory) {
        UniquePos pos = new UniquePos(that);
        processArg(that, () -> {
            T speculativeTree = (T)deferredAttr.attribSpeculative(that, env, attr.new MethodAttrInfo() {
                @Override
                protected boolean needsArgumentAttr(JCTree tree) {
                    return !new UniquePos(tree).equals(pos);
                }
            });
            return argumentTypeFactory.apply(speculativeTree);
        });
    }