Parse a new-expression, or if next token isn't {@link Token#NEW},
a primary expression.
@param allowCallSyntax passed down to {@link #memberExprTail}
12303
private AstNode memberExpr(boolean allowCallSyntax)
        throws IOException
    {
        int tt = peekToken(), lineno = ts.lineno;
        AstNode pn;

        if (tt != Token.NEW) {
            pn = primaryExpr();
        } else {
            consumeToken();
            int pos = ts.tokenBeg;
            NewExpression nx = new NewExpression(pos);

            AstNode target = memberExpr(false);
            int end = getNodeEnd(target);
            nx.setTarget(target);

            int lp = -1;
            if (matchToken(Token.LP, true)) {
                lp = ts.tokenBeg;
                List<AstNode> args = argumentList();
                if (args != null && args.size() > ARGC_LIMIT)
                    reportError("msg.too.many.constructor.args");
                int rp = ts.tokenBeg;
                end = ts.tokenEnd;
                if (args != null)
                    nx.setArguments(args);
                nx.setParens(lp - pos, rp - pos);
            }

            // Experimental syntax: allow an object literal to follow a new
            // expression, which will mean a kind of anonymous class built with
            // the JavaAdapter.  the object literal will be passed as an
            // additional argument to the constructor.
            if (matchToken(Token.LC, true)) {
                ObjectLiteral initializer = objectLiteral();
                end = getNodeEnd(initializer);
                nx.setInitializer(initializer);
            }
            nx.setLength(end - pos);
            pn = nx;
        }
        pn.setLineno(lineno);
        AstNode tail = memberExprTail(allowCallSyntax, pn);
        return tail;
    }
102782
function isCallbackExpression(node, parentNode) {

            // ensure the parent node exists and is an expression
            if (!parentNode || parentNode.type !== "ExpressionStatement") {
                return false;
            }

            // cb()
            if (parentNode.expression === node) {
                return true;
            }

            // special case for cb && cb() and similar
            if (parentNode.expression.type === "BinaryExpression" || parentNode.expression.type === "LogicalExpression") {
                if (parentNode.expression.right === node) {
                    return true;
                }
            }

            return false;
        }
127354
function (token) {
        var primary = token.peek();
        if (!primary.match(/^(?:null|undefined|boolean|number|string|function|object)$/))
            throw _cs.exception("validate", "parse error: invalid primary type \"" + primary + "\"");
        token.skip();
        return { type: "primary", name: primary };
    }
893408
private void parseEnumeration(boolean isNames) throws Exception {
        dataBufferAppend('(');

        // Read the first token.
        skipWhitespace();
        dataBufferAppend(readNmtoken(isNames));
        // Read the remaining tokens.
        skipWhitespace();
        while (!tryRead(')')) {
            require('|');
            dataBufferAppend('|');
            skipWhitespace();
            dataBufferAppend(readNmtoken(isNames));
            skipWhitespace();
        }
        dataBufferAppend(')');
    }
411585
private boolean validOperationExpression(Node expr) {
    String name = getCallName(expr);
    Keywords keyword = nameToKeyword(name);
    switch (keyword) {
      case COND:
        return validConditionalExpression(expr);
      case MAPUNION:
        return validMapunionExpression(expr);
      case MAPRECORD:
        return validMaprecordExpression(expr);
      case TYPEOFVAR:
        return validTypeOfVarExpression(expr);
      case INSTANCEOF:
        return validInstanceOfExpression(expr);
      case PRINTTYPE:
        return validPrintTypeExpression(expr);
      case PROPTYPE:
        return validPropTypeExpression(expr);
      default:
        throw new IllegalStateException("Invalid type transformation operation");
    }
  }
1321357
public CommonTree parseQuery(String queryString, QueryResolverDelegate resolverDelegate, QueryRendererDelegate rendererDelegate) throws ParsingException {
      IckleLexer lexer = new IckleLexer(new ANTLRStringStream(queryString));
      CommonTokenStream tokens = new CommonTokenStream(lexer);
      IckleParser parser = new IckleParser(tokens);

      try {
         // parser.statement() is the entry point for evaluation of any kind of statement
         IckleParser.statement_return r = parser.statement();

         if (parser.hasErrors()) {
            throw log.getQuerySyntaxException(queryString, parser.getErrorMessages());
         }

         CommonTree tree = (CommonTree) r.getTree();
         tree = resolve(tokens, tree, resolverDelegate);
         tree = render(tokens, tree, rendererDelegate);
         return tree;
      } catch (RecognitionException e) {
         throw log.getQuerySyntaxException(queryString, e);
      }
   }
1158432
public void pushEnclosingMethodCall(Expression call) {
        if (call instanceof MethodCallExpression || call instanceof StaticMethodCallExpression) {
            enclosingMethodCalls.addFirst(call);
        } else {
            throw new IllegalArgumentException("Expression must be a method call or a static method call");
        }
    }
860183
function parseNewExpression() {
        var callee, args, node = new Node();

        expectKeyword('new');

        if (match('.')) {
            lex();
            if (lookahead.type === Token.Identifier && lookahead.value === 'target') {
                if (state.inFunctionBody) {
                    lex();
                    return node.finishMetaProperty('new', 'target');
                }
            }
            throwUnexpectedToken(lookahead);
        }

        callee = isolateCoverGrammar(parseLeftHandSideExpression);
        args = match('(') ? parseArguments() : [];

        isAssignmentTarget = isBindingElement = false;

        return node.finishNewExpression(callee, args);
    }
695095
private ExprKraken parseSelectExpr()
  {
    Token token = scanToken();

    if (token == Token.STAR) {
      // return new UnboundStarExpr();
      
      throw new UnsupportedOperationException(getClass().getName());
    }
    else {
      _token = token;

      return parseExpr();
    }
  }
548513
function parseArgs(node) {
  let parsedArgs = [];

  if (isCallExpression(node)) {
    parsedArgs = node.arguments
      .filter(argument => isLiteral(argument) && argument.value)
      .map(argument => argument.value);
  }

  return parsedArgs;
}
900141
private boolean validTypeExpression(Node expr) {
    String name = getCallName(expr);
    Keywords keyword = nameToKeyword(name);
    switch (keyword) {
      case TYPE:
        return validTemplateTypeExpression(expr);
      case UNION:
        return validUnionTypeExpression(expr);
      case NONE:
        return validNoneTypeExpression(expr);
      case ALL:
        return validAllTypeExpression(expr);
      case UNKNOWN:
        return validUnknownTypeExpression(expr);
      case RAWTYPEOF:
        return validRawTypeOfTypeExpression(expr);
      case TEMPLATETYPEOF:
        return validTemplateTypeOfExpression(expr);
      case RECORD:
        return validRecordTypeExpression(expr);
      case TYPEEXPR:
        return validNativeTypeExpr(expr);
      default:
        throw new IllegalStateException("Invalid type expression");
    }
  }
1128845
private void parseMultiplicativeExpr() throws TTXPathException {

        parseUnionExpr();

        String op = mToken.getContent();
        while (isMultiplication()) {

            // for (Operators op : Operators.values()) {
            // // identify current operator
            // if (is(op.getOpName(), true)) {

            mPipeBuilder.addExpressionSingle();

            // parse second operand axis
            parseUnionExpr();

            mPipeBuilder.addOperatorExpression(getTransaction(), op);
            op = mToken.getContent();
            // }
            // }
        }
    }
720716
private void parseRelativePathExpr() throws TTXPathException {

        parseStepExpr();

        while (mToken.getType() == TokenType.SLASH || mToken.getType() == TokenType.DESC_STEP) {

            if (is(TokenType.DESC_STEP, true)) {
                final AbsAxis mAxis = new DescendantAxis(getTransaction(), true);

                mPipeBuilder.addStep(mAxis);
            } else {
                // in this case the slash is just a separator
                consume(TokenType.SLASH, true);
            }
            parseStepExpr();
        }

    }
117840
@Check(CheckType.FAST)
	public void checkDiscouragedCalls(XAbstractFeatureCall expression) {
		if (!isIgnored(DISCOURAGED_REFERENCE)
				&& this.featureCallValidator.isDiscouragedCall(expression)) {
			addIssue(
					MessageFormat.format(Messages.SARLValidator_37,
							expression.getConcreteSyntaxFeatureName()),
					expression,
					DISCOURAGED_REFERENCE);
		}
	}
360478
private boolean validateUnaliasablePrimitiveCall(NodeTraversal t, Node n, String methodName) {
    return validatePrimitiveCallWithMessage(t, n, methodName, CLOSURE_CALL_CANNOT_BE_ALIASED_ERROR);
  }
1223556
private Node parseParamTypeExpressionAnnotation(JsDocToken token) {
    checkArgument(token == JsDocToken.LEFT_CURLY);

    skipEOLs();

    Node typeNode = parseParamTypeExpression(next());
    if (typeNode != null) {
      if (!match(JsDocToken.RIGHT_CURLY)) {
        reportTypeSyntaxWarning("msg.jsdoc.missing.rc");
      } else {
        next();
      }
    }

    return typeNode;
  }
1081578
final public void DeferredExpression() throws ParseException {
                                                 /*@bgen(jjtree) DeferredExpression */
  AstDeferredExpression jjtn000 = new AstDeferredExpression(JJTDEFERREDEXPRESSION);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      jj_consume_token(START_DEFERRED_EXPRESSION);
      Expression();
      jj_consume_token(RBRACE);
    } 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);
      }
    }
  }