Lines Matching refs:Expression
23 // - Return types: For example, Parser functions return Expression* and
48 // typedef Expression;
65 typedef typename Traits::Type::Expression ExpressionT;
432 return 0; // 0 precedence will terminate binary expression parsing
501 ExpressionT ParseMemberExpressionContinuation(ExpressionT expression,
510 // Checks if the expression is a valid reference expression (e.g., on the
514 ExpressionT expression,
671 // Bits 0 and 1 are used to identify the type of expression:
698 // Any expression for which IsValidArrowParamList() returns true
769 // At the moment PreParser doesn't track these expression types.
788 // Dummy implementation for making expression->somefunc() work in both Parser
809 // Least significant 2 bits are used as expression type. The third least
810 // significant bit tracks whether an expression is parenthesized. If the
811 // expression is an identifier or a string literal, the other bits
814 // which further describe the contents of the expression.
888 // Creates expression statement from expression.
892 PreParserExpression expression) {
893 if (expression.IsUseStrictLiteral()) {
896 if (expression.IsStringLiteral()) {
1022 PreParserExpression expression,
1043 PreParserExpression expression,
1056 PreParserExpression expression,
1060 PreParserExpression NewCall(PreParserExpression expression,
1065 PreParserExpression NewCallNew(PreParserExpression expression,
1070 PreParserStatement NewReturnStatement(PreParserExpression expression,
1128 typedef PreParserExpression Expression;
1166 // Returns true if the expression is of type "this.foo".
1167 static bool IsThisProperty(PreParserExpression expression) {
1168 return expression.IsThisProperty();
1171 static bool IsIdentifier(PreParserExpression expression) {
1172 return expression.IsIdentifier();
1175 static PreParserIdentifier AsIdentifier(PreParserExpression expression) {
1176 return expression.AsIdentifier();
1199 PreParserExpression expression) {
1204 PreParserExpression expression) {
1217 static void CheckPossibleEvalCall(PreParserExpression expression,
1221 PreParserExpression expression) {
1224 return expression;
1235 PreParserExpression BuildUnaryExpression(PreParserExpression expression,
1371 int DeclareArrowParametersFromExpression(PreParserExpression expression,
1376 *ok = expression.IsValidArrowParamList();
1412 typedef PreParserExpression Expression;
1509 Expression ParseConditionalExpression(bool accept_IN, bool* ok);
1510 Expression ParseObjectLiteral(bool* ok);
1511 Expression ParseV8Intrinsic(bool* ok);
1521 Expression ParseFunctionLiteral(
1763 // '(' Expression ')'
1818 // Arrow functions are the only expression
1872 // Expression ::
1874 // Expression ',' AssignmentExpression
1891 // '[' Expression? (',' Expression?)* ']'
2152 ExpressionT expression =
2157 expression = this->ParseArrowFunctionLiteral(lhs_location.beg_pos,
2158 expression, CHECK_OK);
2159 return expression;
2164 // Parsed conditional expression only (no assignment).
2165 return expression;
2168 expression = this->CheckAndRewriteReferenceExpression(
2169 expression, lhs_location, "invalid_lhs_in_assignment", CHECK_OK);
2170 expression = this->MarkExpressionAsAssigned(expression);
2181 if (op == Token::ASSIGN && this->IsThisProperty(expression)) {
2185 this->CheckAssigningFunctionLiteralToProperty(expression, right);
2190 // expression.
2202 return factory()->NewAssignment(op, expression, right, pos);
2214 ExpressionT expression = Traits::EmptyExpression();
2235 expression = ParseAssignmentExpression(false, CHECK_OK);
2241 expression = this->GetIterator(expression, factory());
2244 factory()->NewYield(generator_object, expression, kind, pos);
2261 // We start using the binary expression parser for prec >= 4 only!
2262 ExpressionT expression = this->ParseBinaryExpression(4, accept_IN, CHECK_OK);
2263 if (peek() != Token::CONDITIONAL) return expression;
2265 // In parsing the first assignment expression in conditional
2271 return factory()->NewConditional(expression, left, right, pos);
2339 ExpressionT expression = ParseUnaryExpression(CHECK_OK);
2343 this->IsIdentifier(expression)) {
2349 // Allow Traits do rewrite the expression.
2350 return this->BuildUnaryExpression(expression, op, pos, factory());
2354 ExpressionT expression = this->ParseUnaryExpression(CHECK_OK);
2355 expression = this->CheckAndRewriteReferenceExpression(
2356 expression, lhs_location, "invalid_lhs_in_prefix_op", CHECK_OK);
2357 this->MarkExpressionAsAssigned(expression);
2361 expression,
2377 ExpressionT expression = this->ParseLeftHandSideExpression(CHECK_OK);
2380 expression = this->CheckAndRewriteReferenceExpression(
2381 expression, lhs_location, "invalid_lhs_in_postfix_op", CHECK_OK);
2382 expression = this->MarkExpressionAsAssigned(expression);
2385 expression =
2388 expression,
2391 return expression;
2478 // Examples of new expression:
2500 // The expression can still continue with . or [ after the arguments.
2518 // ('[' Expression ']' | '.' Identifier | Arguments)*
2520 // The '[' Expression ']' and '.' Identifier parts are parsed by
2524 // Parse the initial primary or function expression.
2571 ParserBase<Traits>::ParseMemberExpressionContinuation(ExpressionT expression,
2574 // ('[' Expression ']' | '.' Identifier)*
2581 expression = factory()->NewProperty(expression, index, pos);
2592 expression = factory()->NewProperty(
2593 expression, factory()->NewStringLiteral(name, pos), pos);
2600 return expression;
2666 // Single-expression body
2669 ExpressionT expression = ParseAssignmentExpression(true, CHECK_OK);
2671 body->Add(factory()->NewReturnStatement(expression, pos), zone());
2783 ExpressionT expression,
2785 if (strict_mode() == STRICT && this->IsIdentifier(expression) &&
2786 this->IsEvalOrArguments(this->AsIdentifier(expression))) {
2790 } else if (expression->IsValidReferenceExpression()) {
2791 return expression;
2792 } else if (expression->IsCall()) {
2797 return factory()->NewProperty(expression, error, pos);