Home | History | Annotate | Download | only in parsing

Lines Matching defs:Return

45   return static_cast<ParseFunctionFlags>(static_cast<T>(lhs) |
52 return lhs;
58 return static_cast<T>(bitfield) & static_cast<T>(mask);
68 return arity - has_rest;
96 if (!*ok) return impl()->x(__VA_ARGS__); \
101 // Used in functions where the return type is ExpressionT.
105 if (!*ok) return; \
153 // // Return types for traversing functions.
197 Impl* impl() { return static_cast<Impl*>(this); }
198 const Impl* impl() const { return static_cast<const Impl*>(this); }
233 bool allow_##name() const { return allow_##name##_; } \
250 uintptr_t stack_limit() const { return stack_limit_; }
260 return default_eager_compile_hint_;
263 int GetNextFunctionLiteralId() { return ++function_literal_id_; }
264 int GetLastFunctionLiteralId() const { return function_literal_id_; }
270 Zone* zone() const { return zone_; }
331 const ZoneList<ExpressionT>& expressions() const { return expressions_; }
332 const Scanner::Location& location() const { return loc_; }
334 bool has_explicit_tail_calls() const { return has_explicit_tail_calls_; }
363 // We are inside return statement which is allowed to contain tail call
368 // not yet inside a return statement.
382 DeclarationScope* scope() const { return scope_->AsDeclarationScope(); }
385 int expected_property_count() { return expected_property_count_; }
387 FunctionKind kind() const { return scope()->function_kind(); }
388 FunctionState* outer() const { return outer_function_state_; }
391 return scope()->generator_object_var();
395 return scope()->promise_var();
411 return destructuring_assignments_to_rewrite_;
415 return tail_call_expressions_;
425 return &reported_errors_;
429 return return_expr_context_;
436 return &non_patterns_to_rewrite_;
440 return next_function_is_likely_called_;
444 return previous_function_was_likely_called_;
518 // Collects all return expressions at tail call position in this scope
651 return new (zone()) DeclarationScope(zone(), ast_value_factory());
655 return new (zone()) DeclarationScope(zone(), scope(), BLOCK_SCOPE);
659 return new (zone()) ModuleScope(parent, ast_value_factory());
663 return new (zone()) DeclarationScope(zone(), parent, EVAL_SCOPE);
667 return NewScopeWithParent(scope(), scope_type);
680 return new (zone()) Scope(zone(), parent, scope_type);
696 return result;
700 return scope()->GetDeclarationScope();
703 return scope()->GetClosureScope();
706 Scanner* scanner() const { return scanner_; }
707 AstValueFactory* ast_value_factory() const { return ast_value_factory_; }
708 int position() const { return scanner_->location().beg_pos; }
709 int peek_position() const { return scanner_->peek_location().beg_pos; }
710 bool stack_overflow() const { return stack_overflow_; }
714 if (stack_overflow_) return Token::ILLEGAL;
715 return scanner()->peek();
719 if (stack_overflow_) return Token::ILLEGAL;
720 return scanner()->PeekAhead();
724 if (stack_overflow_) return Token::ILLEGAL;
727 // Any further calls to Next or peek will return the illegal token.
728 // The current call must return the next token, which might already
733 return scanner()->Next();
747 return true;
749 return false;
766 return;
771 return;
779 static T Return(T result) {
780 return result;
784 return token == Token::IDENTIFIER || token == Token::ENUM ||
790 bool peek_any_identifier() { return is_any_identifier(peek()); }
795 return true;
797 return false;
801 return peek() == Token::IDENTIFIER &&
819 return true;
822 return true;
824 return false;
828 return peek() == Token::IN || PeekContextualKeyword(CStrVector("of"));
854 return true;
864 return false;
874 if (function_name_validity == kSkipFunctionNameCheck) return;
876 if (is_sloppy(language_mode)) return;
882 return;
888 return;
895 return 0; // 0 precedence will terminate binary expression parsing
896 return Token::Precedence(token);
899 typename Types::Factory* factory() { return &ast_node_factory_; }
902 return scope()->GetReceiverScope();
904 LanguageMode language_mode() { return scope()->language_mode(); }
910 return IsGeneratorFunction(function_state_->kind());
913 return IsAsyncFunction(function_state_->kind());
916 return IsResumableFunction(function_state_->kind());
998 return is_any_identifier(token) || token == Token::LPAREN;
1078 return ParseIdentifierOrStrictReservedWord(function_state_->kind(),
1089 return ParsePrimaryExpression(&is_async, ok);
1138 return ParseArguments(first_spread_pos, false, ok);
1223 return ParseStatement(labels, kDisallowLabelledFunctionStatement, ok);
1300 if (!impl()->IsIdentifier(expression)) return false;
1303 return false;
1305 return true;
1309 return expression->IsObjectLiteral() || expression->IsArrayLiteral();
1343 return Call::IS_POSSIBLY_EVAL;
1345 return Call::NOT_EVAL;
1348 // Convenience method which determines the type of return statement to emit
1352 return factory()->NewAsyncReturnStatement(expr, pos);
1354 return factory()->NewReturnStatement(expr, pos);
1366 bool IsProto() { return this->scanner()->LiteralMatches("__proto__", 9); }
1368 ParserBase* parser() const { return parser_; }
1369 Scanner* scanner() const { return parser_->scanner(); }
1387 return this->scanner()->LiteralMatches("constructor", 11);
1390 return this->scanner()->LiteralMatches("prototype", 9);
1393 ParserBase* parser() const { return parser_; }
1394 Scanner* scanner() const { return parser_->scanner(); }
1401 return scope()->AsModuleScope()->module();
1403 Scope* scope() const { return scope_; }
1409 return classifier_;
1576 return ReportUnexpectedTokenAt(scanner_->location(), token);
1599 return result;
1631 return name;
1643 return impl()->EmptyIdentifier();
1651 return impl()->GetSymbol();
1655 return impl()->EmptyIdentifier();
1676 return impl()->EmptyIdentifier();
1679 return impl()->GetSymbol();
1694 return impl()->EmptyIdentifier();
1697 return impl()->GetSymbol();
1708 return impl()->EmptyExpression();
1717 return impl()->EmptyExpression();
1721 return factory()->NewRegExpLiteral(js_pattern, js_flags, pos);
1749 return impl()->ThisExpression(beg_pos);
1758 return impl()->ExpressionFromLiteral(Next(), beg_pos);
1764 return
1778 return impl()->ExpressionFromIdentifier(name, beg_pos);
1784 return impl()->ExpressionFromString(beg_pos);
1791 return ParseRegExpLiteral(ok);
1794 return ParseArrayLiteral(ok);
1797 return ParseObjectLiteral(ok);
1817 return factory()->NewEmptyParentheses(beg_pos);
1827 return expr;
1842 return ParseClassLiteral(name, class_name_location,
1849 return ParseTemplateLiteral(impl()->NoTemplateTag(), beg_pos, false, ok);
1854 return ParseV8Intrinsic(ok);
1861 return ParseDoExpression(ok);
1871 return impl()->EmptyExpression();
1880 return result;
1945 return result;
2010 return impl()->EmptyExpression();
2013 return result;
2025 return true;
2030 return true;
2033 return true;
2037 return true;
2041 return false;
2070 return factory()->NewStringLiteral(*name, pos);
2085 return factory()->NewStringLiteral(*name, pos);
2149 return expression;
2162 return expression;
2168 return impl()->IsArrayIndex(*name, &index)
2238 return factory()->NewClassLiteralProperty(
2244 return impl()->EmptyClassLiteralProperty();
2279 return factory()->NewClassLiteralProperty(name_expression, value,
2314 return factory()->NewClassLiteralProperty(name_expression, value,
2322 return impl()->EmptyClassLiteralProperty();
2355 return function_literal;
2389 return factory()->NewObjectLiteralProperty(
2412 return result;
2429 return impl()->EmptyObjectLiteralProperty();
2477 return factory()->NewObjectLiteralProperty(
2503 return factory()->NewObjectLiteralProperty(
2537 return factory()->NewObjectLiteralProperty(
2547 return impl()->EmptyObjectLiteralProperty();
2550 return impl()->EmptyObjectLiteralProperty();
2613 return factory()->NewObjectLiteral(
2649 return impl()->NullExpressionList();
2664 return impl()->NullExpressionList();
2674 return result;
2689 return ParseYieldExpression(accept_IN, ok);
2779 return expression;
2809 return expression;
2868 return impl()->RewriteAssignExponentiation(expression, right, pos);
2878 return result;
2921 return impl()->RewriteYieldStar(generator_object, expression, pos);
2929 return yield;
2944 if (peek() != Token::CONDITIONAL) return expression;
2957 return factory()->NewConditional(expression, left, right, pos);
3009 return x;
3049 return impl()->EmptyExpression();
3056 return impl()->EmptyExpression();
3060 return impl()->BuildUnaryExpression(expression, op, pos);
3073 return factory()->NewCountOperation(op,
3088 return impl()->RewriteAwaitExpression(value, await_pos);
3090 return ParsePostfixExpression(ok);
3120 return expression;
3187 return impl()->EmptyExpression();
3191 return impl()->ExpressionListToExpression(args);
3194 return factory()->NewEmptyParentheses(pos);
3256 return result;
3298 return impl()->EmptyExpression();
3300 return ParseNewTargetExpression(CHECK_OK);
3317 return result;
3320 return factory()->NewCallNew(result, impl()->NewExpressionList(0), new_pos);
3323 return ParseMemberExpression(is_async, ok);
3360 return impl()->EmptyExpression();
3363 return impl()->FunctionSentExpression(pos);
3401 return result;
3415 return factory()->NewCallRuntime(Runtime::kDynamicImportCall, args, pos);
3430 return impl()->NewSuperPropertyReference(pos);
3437 return impl()->NewSuperCallReference(pos);
3444 return impl()->EmptyExpression();
3471 return impl()->EmptyExpression();
3474 return impl()->NewTargetExpression(pos);
3537 return impl()->EmptyExpression();
3540 return expression;
3544 return impl()->EmptyExpression();
3601 return;
3613 return;
3733 return impl()->NullBlock();
3765 return init_block;
3778 return impl()->NullStatement();
3780 return ParseHoistableDeclaration(pos, flags, nullptr, false, ok);
3793 return ParseHoistableDeclaration(pos, flags, names, default_export, ok);
3855 return impl()->DeclareFunction(variable_name, function, mode, pos,
3897 return impl()->DeclareClass(variable_name, value, names, class_token_pos,
3922 return impl()->DeclareNative(name, pos, ok);
3937 return impl()->NullStatement();
3941 return ParseHoistableDeclaration(pos, flags, names, default_export, ok);
4091 return true;
4093 return is_sloppy(language_mode());
4095 return false;
4111 return true;
4114 return false;
4137 return impl()->EmptyExpression();
4286 return function_literal;
4298 return impl()->EmptyExpression();
4304 return impl()->EmptyExpression();
4355 return impl()->RewriteClassLiteral(name, &class_info, class_token_pos, ok);
4409 return impl()->ParseFunctionLiteral(
4442 return impl()->CloseTemplateLiteral(&ts, start, tag);
4462 return impl()->EmptyExpression();
4468 return impl()->EmptyExpression();
4480 return impl()->EmptyExpression();
4493 return impl()->EmptyExpression();
4499 return impl()->EmptyExpression();
4508 return impl()->CloseTemplateLiteral(&ts, start, tag);
4516 return CheckAndRewriteReferenceExpression(expression, beg_pos, end_pos,
4530 return impl()->EmptyExpression();
4533 return expression;
4544 return factory()->NewProperty(expression, error, beg_pos);
4548 return impl()->EmptyExpression();
4553 return IsAssignableIdentifier(expression) || expression->IsProperty();
4583 return impl()->NewV8Intrinsic(name, args, pos, ok);
4595 return impl()->RewriteDoExpression(block, pos, ok);
4627 ParseStatementListItem(CHECK_OK_CUSTOM(Return, kLazyParsingComplete));
4651 return kLazyParsingComplete;
4680 return kLazyParsingAborted;
4686 return kLazyParsingComplete;
4693 // StatementListItem[Yield, Return] :
4694 // Statement[?Yield, ?Return]
4711 return ParseHoistableDeclaration(nullptr, false, ok);
4714 return ParseClassDeclaration(nullptr, false, ok);
4717 return ParseVariableStatement(kStatementListItem, nullptr, ok);
4720 return ParseVariableStatement(kStatementListItem, nullptr, ok);
4727 return ParseAsyncFunctionDeclaration(nullptr, false, ok);
4733 return ParseStatement(nullptr, kAllowLabelledFunctionStatement, ok);
4765 return ParseBlock(labels, ok);
4768 return factory()->NewEmptyStatement(kNoSourcePosition);
4770 return ParseIfStatement(labels, ok);
4772 return ParseDoWhileStatement(labels, ok);
4774 return ParseWhileStatement(labels, ok);
4778 return ParseForAwaitStatement(labels, ok);
4780 return ParseForStatement(labels, ok);
4783 case Token::RETURN:
4791 return ParseStatementAsUnlabelled(labels, ok);
4798 return result;
4802 return ParseWithStatement(labels, ok);
4804 return ParseSwitchStatement(labels, ok);
4816 return impl()->NullStatement();
4818 return ParseDebuggerStatement(ok);
4820 return ParseVariableStatement(kStatement, nullptr, ok);
4822 return ParseExpressionOrLabelledStatement(labels, allow_function, ok);
4826 // This method parses a subset of statements (break, continue, return, throw,
4835 return ParseContinueStatement(ok);
4837 return ParseBreakStatement(labels, ok);
4838 case Token::RETURN:
4839 return ParseReturnStatement(ok);
4841 return ParseThrowStatement(ok);
4843 return ParseTryStatement(ok);
4846 return impl()->NullStatement();
4877 return body;
4884 return ParseStatement(labels, ok);
4895 return block;
4922 return result;
4937 return factory()->NewDebuggerStatement(pos);
4961 return impl()->NullStatement();
4973 return impl()->NullStatement();
4991 return ParseFunctionDeclaration(ok);
4993 return ParseStatement(labels, ok);
5002 return ParseNativeDeclaration(ok);
5007 return factory()->NewExpressionStatement(expr, pos);
5028 return factory()->NewIfStatement(condition, then_statement, else_statement,
5057 return impl()->NullStatement();
5060 return factory()->NewContinueStatement(target, pos);
5083 return factory()->NewEmptyStatement(pos);
5095 return impl()->NullStatement();
5098 return factory()->NewBreakStatement(target, pos);
5105 // 'return' [no line terminator] Expression? ';'
5107 // Consume the return token. It is necessary to do that before
5110 Expect(Token::RETURN, CHECK_OK);
5119 return impl()->NullStatement();
5135 // Because of the return code rewriting that happens in case of a subclass
5152 return BuildReturnStatement(return_value, loc.beg_pos);
5167 return impl()->NullStatement();
5182 return factory()->NewWithStatement(with_scope, expr, body, pos);
5203 // semi-colons. This allows code such as 'do;while(0)return' to
5209 return loop;
5228 return loop;
5242 return impl()->NullStatement();
5247 return impl()->NewThrowStatement(exception, pos);
5287 return impl()->NullStatement();
5305 return impl()->RewriteSwitchStatement(tag, switch_statement, cases,
5339 return impl()->NullStatement();
5399 return impl()->RewriteTryStatement(try_block, catch_block, finally_block,
5429 return ParseForEachStatementWithDeclarations(stmt_pos, &for_info, labels,
5455 return ParseForEachStatementWithoutDeclarations(stmt_pos, expression,
5464 return ParseStandardForLoop(stmt_pos, init, bound_names_are_lexical,
5479 return impl()->NullStatement();
5491 return impl()->NullStatement();
5541 return init_block;
5545 return final_loop;
5594 return final_loop;
5641 return result;
5672 return block;
5676 return loop;
5731 return impl()->NullStatement();
5740 return impl()->NullStatement();
5809 return final_loop;
5823 return init_block;
5826 return final_loop;
5832 if (property == Token::SMI || property == Token::NUMBER) return;
5838 return;
5851 if (property == Token::SMI || property == Token::NUMBER) return;
5857 return;
5867 return;
5872 return;
5875 return;