Lines Matching refs:ok
305 // handling for functions that may fail (by returning !*ok).
311 #define CHECK_OK ok); \
312 if (!*ok) return NULL; \
757 Expression* ParserTraits::ParseV8Intrinsic(bool* ok) {
758 return parser_->ParseV8Intrinsic(ok);
766 LanguageMode language_mode, bool* ok) {
769 function_token_position, type, language_mode, ok);
775 int pos, bool* ok) {
777 name_is_strict_reserved, pos, ok);
835 // It's OK to use the Isolate & counters here, since this function is only
946 bool ok = true;
950 ParseModuleItemList(body, &ok);
955 ParseStatementList(body, Token::EOS, &ok);
962 if (ok && is_strict(language_mode())) {
963 CheckStrictOctalLiteral(beg_pos, scanner()->location().end_pos, &ok);
967 if (ok && is_sloppy(language_mode())) {
972 InsertSloppyBlockFunctionVarBindings(scope, &ok);
974 if (ok) {
975 CheckConflictingVarDeclarations(scope_, &ok);
978 if (ok && info->parse_restriction() == ONLY_SINGLE_FUNCTION_LITERAL) {
984 ok = false;
988 if (ok) {
1004 // It's OK to use the Isolate & counters here, since this function is only
1079 // Ok to use Isolate here, since lazy function parsing is only done in the
1094 bool ok = true;
1128 ParseFormalParameterList(&formals, &formals_classifier, &ok);
1129 if (ok) ok = Check(Token::RPAREN);
1132 ParseFormalParameter(&formals, &formals_classifier, &ok);
1133 if (ok) {
1140 if (ok) {
1145 true, formals, is_async, formals_classifier, &ok);
1146 if (ok) {
1159 ok = false;
1172 shared_info->language_mode(), &ok);
1175 DCHECK(ok == (result != NULL));
1190 bool* ok) {
1242 *ok = false;
1279 Statement* Parser::ParseStatementListItem(bool* ok) {
1287 return ParseHoistableDeclaration(NULL, ok);
1290 return ParseClassDeclaration(NULL, ok);
1292 return ParseVariableStatement(kStatementListItem, NULL, ok);
1294 return ParseVariableStatement(kStatementListItem, NULL, ok);
1297 return ParseVariableStatement(kStatementListItem, NULL, ok);
1304 return ParseAsyncFunctionDeclaration(NULL, ok);
1310 return ParseStatement(NULL, kAllowLabelledFunctionStatement, ok);
1314 ok) {
1323 return ParseImportDeclaration(ok);
1325 return ParseExportDeclaration(ok);
1327 return ParseStatementListItem(ok);
1332 void* Parser::ParseModuleItemList(ZoneList<Statement*>* body, bool* ok) {
1359 *ok = false;
1368 const AstRawString* Parser::ParseModuleSpecifier(bool* ok) {
1380 Scanner::Location* reserved_loc, bool* ok) {
1425 ZoneList<ImportDeclaration*>* Parser::ParseNamedImports(int pos, bool* ok) {
1454 *ok = false;
1458 *ok = false;
1477 Statement* Parser::ParseImportDeclaration(bool* ok) {
1535 *ok = false;
1564 Statement* Parser::ParseExportDefault(bool* ok) {
1656 scope_->module()->AddLocalExport(default_string, names.first(), zone(), ok);
1657 if (!*ok) {
1672 Statement* Parser::ParseExportDeclaration(bool* ok) {
1687 return ParseExportDefault(ok);
1722 *ok = false;
1733 zone(), ok);
1734 if (!*ok) {
1775 *ok = false;
1783 descriptor->AddLocalExport(names[i], names[i], zone(), ok);
1784 if (!*ok) {
1797 bool* ok) {
1806 return ParseSubStatement(labels, allow_function, ok);
1811 AllowLabelledFunctionStatement allow_function, bool* ok) {
1837 return ParseBlock(labels, ok);
1844 return ParseIfStatement(labels, ok);
1847 return ParseDoWhileStatement(labels, ok);
1850 return ParseWhileStatement(labels, ok);
1853 return ParseForStatement(labels, ok);
1863 return ParseStatementAsUnlabelled(labels, ok);
1875 return ParseWithStatement(labels, ok);
1878 return ParseSwitchStatement(labels, ok);
1890 *ok = false;
1894 return ParseDebuggerStatement(ok);
1897 return ParseVariableStatement(kStatement, NULL, ok);
1900 return ParseExpressionOrLabelledStatement(labels, allow_function, ok);
1905 ZoneList<const AstRawString*>* labels, bool* ok) {
1908 return ParseContinueStatement(ok);
1911 return ParseBreakStatement(labels, ok);
1914 return ParseReturnStatement(ok);
1917 return ParseThrowStatement(ok);
1920 return ParseTryStatement(ok);
1946 bool resolve, bool* ok, Scope* scope) {
2027 *ok = false;
2041 // TODO(sigurds) figure out if kNotAssigned is OK here
2102 Statement* Parser::ParseNativeDeclaration(bool* ok) {
2143 ZoneList<const AstRawString*>* names, bool* ok) {
2150 return ParseHoistableDeclaration(pos, flags, names, ok);
2154 ZoneList<const AstRawString*>* names, bool* ok) {
2158 *ok = false;
2164 return ParseHoistableDeclaration(pos, flags, names, ok);
2169 bool* ok) {
2187 *ok = false;
2234 bool* ok) {
2272 bool finalize_block_scope, bool* ok) {
2306 Block* Parser::ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok) {
2307 return ParseBlock(labels, true, ok);
2312 ZoneList<const AstRawString*>* names, bool* ok) {
2325 bool* ok) {
2351 ZoneList<const AstRawString*>* names, bool* ok) {
2461 *ok = false;
2495 DCHECK(*ok);
2513 Statement* Parser::ParseFunctionDeclaration(bool* ok) {
2522 *ok = false;
2532 AllowLabelledFunctionStatement allow_function, bool* ok) {
2548 *ok = false;
2570 *ok = false;
2585 return ParseFunctionDeclaration(ok);
2587 return ParseScopedStatement(labels, true, ok);
2590 return ParseStatement(labels, kDisallowLabelledFunctionStatement, ok);
2602 return ParseNativeDeclaration(ok);
2612 bool* ok) {
2634 Statement* Parser::ParseContinueStatement(bool* ok) {
2655 *ok = false;
2664 bool* ok) {
2692 *ok = false;
2700 Statement* Parser::ParseReturnStatement(bool* ok) {
2794 *ok = false;
2802 bool* ok) {
2811 *ok = false;
2830 CaseClause* Parser::ParseCaseClause(bool* default_seen_ptr, bool* ok) {
2843 *ok = false;
2864 bool* ok) {
2942 Statement* Parser::ParseThrowStatement(bool* ok) {
2950 *ok = false;
2961 TryStatement* Parser::ParseTryStatement(bool* ok) {
2986 *ok = false;
3120 *ok = false;
3132 ZoneList<const AstRawString*>* labels, bool* ok) {
3160 ZoneList<const AstRawString*>* labels, bool* ok) {
3303 Statement* body, bool* ok) {
3549 bool legacy, bool* ok) {
3552 return ParseSubStatement(labels, kDisallowLabelledFunctionStatement, ok);
3573 bool* ok) {
3597 if (CheckInOrOf(&mode, ok)) {
3598 if (!*ok) return nullptr;
3604 *ok = false;
3622 *ok = false;
3773 bool is_for_each = CheckInOrOf(&mode, ok);
3774 if (!*ok) return nullptr;
3912 DebuggerStatement* Parser::ParseDebuggerStatement(bool* ok) {
3970 bool* ok) {
3992 ParseArrowFunctionFormalParameters(parameters, left, comma_pos, ok);
3993 if (!*ok) return;
4034 Type::ExpressionClassifier* classifier, int pos, bool* ok) {
4038 accept_IN, pos, ok);
4045 bool accept_IN, int pos, bool* ok) {
4072 ParseStatementList(inner_body, Token::RBRACE, ok);
4073 if (!*ok) return;
4076 return_value = ParseAssignmentExpression(accept_IN, classifier, ok);
4077 if (!*ok) return;
4078 ParserTraits::RewriteNonPattern(classifier, ok);
4079 if (!*ok) return;
4090 DoExpression* Parser::ParseDoExpression(bool* ok) {
4101 *ok = false;
4112 Scanner::Location* duplicate_loc, bool* ok) {
4115 ParseArrowFunctionFormalParameters(parameters, expr, params_loc.end_pos, ok);
4116 if (!*ok) return;
4120 *ok = false;
4158 LanguageMode language_mode, bool* ok) {
4285 &expected_property_count, /*CHECK_OK*/ ok,
4393 Expression* Parser::ParseAsyncFunctionExpression(bool* ok) {
4413 *ok = false;
4425 int* expected_property_count, bool* ok,
4443 Expect(Token::RBRACE, ok);
4444 if (!*ok) {
4468 *ok = false;
4475 *ok = false;
4479 Expect(Token::RBRACE, ok);
4480 if (!*ok) {
4564 const ParserFormalParameters& parameters, bool* ok) {
4701 FunctionLiteral::FunctionType function_type, bool* ok) {
4899 bool* ok) {
4904 *ok = false;
4909 *ok = false;
5005 Expression* Parser::ParseV8Intrinsic(bool* ok) {
5043 *ok = false;
5051 *ok = false;
5063 *ok = false;
5076 void Parser::CheckConflictingVarDeclarations(Scope* scope, bool* ok) {
5087 *ok = false;
5117 void Parser::InsertSloppyBlockFunctionVarBindings(Scope* scope, bool* ok) {
5131 Declare(declaration, DeclarationDescriptor::NORMAL, true, ok, scope);
5132 DCHECK(ok); // Based on the preceding check, this should not fail
5133 if (!ok) return;
5164 bool* ok) {
5178 bool* ok) {
5255 // Ok to use Isolate here; this function is only called in the main thread.
5616 bool* ok) {
5617 parser_->RewriteNonPattern(classifier, ok);
5717 void Parser::RewriteNonPattern(ExpressionClassifier* classifier, bool* ok) {
5718 ValidateExpression(classifier, ok);
5719 if (!*ok) return;
5892 void ParserTraits::QueueNonPatternForRewriting(Expression* expr, bool* ok) {
5894 parser_->function_state_->AddNonPatternForRewriting(expr, ok);