Lines Matching refs:Expression
380 bool ParserTraits::IsThisProperty(Expression* expression) {
381 DCHECK(expression != NULL);
382 Property* property = expression->AsProperty();
389 bool ParserTraits::IsIdentifier(Expression* expression) {
390 VariableProxy* operand = expression->AsVariableProxy();
396 Expression* expression) {
397 if (expression->IsPropertyName()) {
398 fni->PushLiteralName(expression->AsLiteral()->AsRawPropertyName());
406 void ParserTraits::CheckAssigningFunctionLiteralToProperty(Expression* left,
407 Expression* right) {
416 void ParserTraits::CheckPossibleEvalCall(Expression* expression,
418 VariableProxy* callee = expression->AsVariableProxy();
426 Expression* ParserTraits::MarkExpressionAsAssigned(Expression* expression) {
428 expression != NULL ? expression->AsVariableProxy() : NULL;
430 return expression;
435 Expression** x, Expression* y, Token::Value op, int pos,
494 Expression* ParserTraits::BuildUnaryExpression(
495 Expression* expression, Token::Value op, int pos,
497 DCHECK(expression != NULL);
498 if (expression->IsLiteral()) {
499 const AstValue* literal = expression->AsLiteral()->raw_value();
509 return expression;
522 Token::MUL, expression, factory->NewNumberLiteral(1, pos), pos);
527 Token::MUL, expression, factory->NewNumberLiteral(-1, pos), pos);
532 Token::BIT_XOR, expression, factory->NewNumberLiteral(~0, pos), pos);
534 return factory->NewUnaryOperation(op, expression, pos);
538 Expression* ParserTraits::NewThrowReferenceError(const char* message, int pos) {
545 Expression* ParserTraits::NewThrowSyntaxError(
552 Expression* ParserTraits::NewThrowTypeError(
559 Expression* ParserTraits::NewThrowError(
571 ZoneList<Expression*>* args = new (zone) ZoneList<Expression*>(2, zone);
656 Expression* ParserTraits::ThisExpression(
661 Expression* ParserTraits::SuperReference(
668 Expression* ParserTraits::ClassLiteral(
669 const AstRawString* name, Expression* extends, Expression* constructor,
697 Expression* ParserTraits::ExpressionFromIdentifier(
711 Expression* ParserTraits::ExpressionFromString(
720 Expression* ParserTraits::GetIterator(
721 Expression* iterable, AstNodeFactory<AstConstructionVisitor>* factory) {
722 Expression* iterator_symbol_literal =
725 Expression* prop =
728 ZoneList<Expression*>* args = new (zone) ZoneList<Expression*>(0, zone);
739 Expression* ParserTraits::ParseV8Intrinsic(bool* ok) {
920 expression()->IsFunctionLiteral()) {
1025 Expression* expression = ParseExpression(false, &ok);
1026 DCHECK(expression->IsFunctionLiteral());
1027 result = expression->AsFunctionLiteral();
1088 (literal = e_stat->expression()->AsLiteral()) != NULL &&
1180 if (estmt != NULL && estmt->expression()->AsVariableProxy() != NULL &&
1181 estmt->expression()->AsVariableProxy()->raw_name() ==
1774 Expression* expression = NewThrowTypeError(
1776 declaration_scope->SetIllegalRedeclaration(expression);
1974 Expression* value = ParseClassLiteral(name, scanner()->location(),
2214 // Parse initialization expression if present and/or needed. A
2242 Expression* value = NULL;
2249 // Don't infer if it is "a = function(){...}();"-like expression.
2291 ZoneList<Expression*>* arguments =
2292 new(zone()) ZoneList<Expression*>(3, zone());
2403 // Expression ';'
2407 Expression* expr = ParseExpression(true, CHECK_OK);
2411 // Expression is a single identifier, and not, e.g., a parenthesized
2449 // Parsed expression statement, or the context-sensitive 'module' keyword.
2466 // 'if' '(' Expression ')' Statement ('else' Statement)?
2471 Expression* condition = ParseExpression(true, CHECK_OK);
2554 // 'return' Expression? ';'
2564 Expression* return_value;
2575 Expression* generator = factory()->NewVariableProxy(
2577 Expression* yield = factory()->NewYield(
2597 // 'with' '(' Expression ')' Statement
2609 Expression* expr = ParseExpression(true, CHECK_OK);
2626 // 'case' Expression ':' Statement*
2629 Expression* label = NULL; // NULL expression indicates default case
2660 // 'switch' '(' Expression ')' '{' CaseClause* '}'
2668 Expression* tag = ParseExpression(true, CHECK_OK);
2687 // 'throw' Expression ';'
2696 Expression* exception = ParseExpression(true, CHECK_OK);
2812 // 'do' Statement 'while' '(' Expression ')' ';'
2823 Expression* cond = ParseExpression(true, CHECK_OK);
2840 // 'while' '(' Expression ')' Statement
2847 Expression* cond = ParseExpression(true, CHECK_OK);
2870 Expression* each,
2871 Expression* subject,
2881 Expression* assign_iterator;
2882 Expression* next_result;
2883 Expression* result_done;
2884 Expression* assign_each;
2893 Expression* iterator_proxy = factory()->NewVariableProxy(iterator);
2894 Expression* next_literal = factory()->NewStringLiteral(
2896 Expression* next_property = factory()->NewProperty(
2898 ZoneList<Expression*>* next_arguments =
2899 new(zone()) ZoneList<Expression*>(0, zone());
2900 Expression* next_call = factory()->NewCall(
2902 Expression* result_proxy = factory()->NewVariableProxy(result);
2909 Expression* done_literal = factory()->NewStringLiteral(
2911 Expression* result_proxy = factory()->NewVariableProxy(result);
2918 Expression* value_literal = factory()->NewStringLiteral(
2920 Expression* result_proxy = factory()->NewVariableProxy(result);
2921 Expression* result_value = factory()->NewProperty(
2940 ForStatement* loop, Statement* init, Expression* cond, Statement* next,
3003 Expression* const1 = factory()->NewSmiLiteral(1, RelocInfo::kNoPosition);
3040 Expression* compare = NULL;
3043 Expression* const1 = factory()->NewSmiLiteral(1, RelocInfo::kNoPosition);
3052 Expression* const0 = factory()->NewSmiLiteral(0, RelocInfo::kNoPosition);
3100 // 'for' '(' Expression? ';' Expression? ';' Expression? ')' Statement
3132 Expression* enumerable = ParseExpression(true, CHECK_OK);
3186 // The expression does not see the loop variable.
3188 Expression* enumerable = ParseExpression(true, CHECK_OK);
3217 Expression* expression = ParseExpression(false, CHECK_OK);
3219 bool accept_OF = expression->AsVariableProxy();
3222 expression = this->CheckAndRewriteReferenceExpression(
3223 expression, lhs_location, "invalid_lhs_in_for", CHECK_OK);
3229 Expression* enumerable = ParseExpression(true, CHECK_OK);
3233 InitializeForEachStatement(loop, expression, enumerable, body);
3243 expression, RelocInfo::kNoPosition);
3264 Expression* cond = NULL;
3272 Expression* exp = ParseExpression(true, CHECK_OK);
3331 bool CompileTimeValue::IsCompileTimeValue(Expression* expression) {
3332 if (expression->IsLiteral()) return true;
3333 MaterializedLiteral* lit = expression->AsMaterializedLiteral();
3339 Expression* expression) {
3341 DCHECK(IsCompileTimeValue(expression));
3343 ObjectLiteral* object_literal = expression->AsObjectLiteral();
3353 ArrayLiteral* array_literal = expression->AsArrayLiteral();
3374 bool CheckAndDeclareArrowParameter(ParserTraits* traits, Expression* expression,
3379 if (expression == NULL) return true;
3381 // Too many parentheses around expression:
3383 if (expression->parenthesization_level() > 1) return false;
3388 if (expression->IsVariableProxy()) {
3389 if (expression->AsVariableProxy()->is_this()) return false;
3391 const AstRawString* raw_name = expression->AsVariableProxy()->raw_name();
3398 expression->position(), expression->position() + raw_name->length());
3409 if (expression->IsBinaryOperation()) {
3410 BinaryOperation* binop = expression->AsBinaryOperation();
3421 // Any other kind of expression is not a valid parameter list.
3427 Expression* expression, Scope* scope, Scanner::Location* dupe_loc,
3430 *ok = CheckAndDeclareArrowParameter(this, expression, scope, &num_params,
3588 // If we have a named function expression, we add a local variable
3622 // - The function mustn't be a function expression with an open parenthesis
3788 ZoneList<Expression*>* arguments =
3789 new(zone()) ZoneList<Expression*>(0, zone());
3811 Expression* undefined =
3859 Expression* Parser::ParseV8Intrinsic(bool* ok) {
3867 ZoneList<Expression*>* args = ParseArguments(CHECK_OK);
4103 ReportError(CStrVector("Regular expression too large"));