Lines Matching full:scanner
14 #include "src/parsing/scanner.h"
92 ParserBase(Zone* zone, Scanner* scanner, uintptr_t stack_limit,
106 scanner_(scanner),
209 Scanner::Location this_location() const { return this_location_; }
210 Scanner::Location super_location() const { return super_location_; }
211 Scanner::Location return_location() const { return return_location_; }
212 void set_this_location(Scanner::Location location) {
215 void set_super_location(Scanner::Location location) {
218 void set_return_location(Scanner::Location location) {
259 Scanner::Location this_location_;
262 Scanner::Location return_location_;
265 Scanner::Location super_location_;
347 Scanner* scanner() const { return scanner_; }
358 return scanner()->peek();
363 return scanner()->PeekAhead();
376 return scanner()->Next();
411 if (scanner()->HasAnyLineTerminatorBeforeNext() ||
436 scanner()->is_next_contextual_keyword(keyword);
442 if (!scanner()->is_literal_contextual_keyword(keyword)) {
443 ReportUnexpectedToken(scanner()->current_token());
451 ReportMessageAt(scanner()->location(), MessageTemplate::kStrongForIn);
468 Scanner::Location octal = scanner()->octal_position();
472 scanner()->clear_octal_position();
495 const Scanner::Location& function_name_loc, bool* ok) {
546 Scanner::Location source_location = scanner()->location();
550 void ReportMessageAt(Scanner::Location location,
563 Scanner::Location location, Token::Value token,
575 const Scanner::Location& a = classifier->expression_error().location;
576 const Scanner::Location& b =
635 Traits::ReportMessageAt(scanner()->location(),
637 Token::String(scanner()->current_token()));
664 classifier->RecordExpressionError(scanner()->peek_location(), message, arg);
671 classifier->RecordBindingPatternError(scanner()->peek_location(), message,
679 classifier->RecordArrowFormalParametersError(scanner()->peek_location(),
689 scanner()->peek_location(), message, arg);
744 Scanner::Location* first_spread_pos, ExpressionClassifier* classifier,
861 Scanner* scannerscanner(); }
877 bool IsProto() { return this->scanner()->LiteralMatches("__proto__", 9); }
893 return this->scanner()->LiteralMatches("constructor", 11);
896 return this->scanner()->LiteralMatches("prototype", 9);
920 Scanner* scanner_;
944 this_location_(Scanner::Location::invalid()),
945 return_location_(Scanner::Location::invalid()),
946 super_location_(Scanner::Location::invalid()),
1029 Scanner::Location source_location, Token::Value token,
1061 IdentifierT name = this->GetSymbol(scanner());
1070 scanner()->location(), MessageTemplate::kStrictEvalArguments);
1073 scanner()->location(), MessageTemplate::kStrictEvalArguments);
1079 scanner()->location(), MessageTemplate::kStrictEvalArguments);
1082 scanner()->location(), MessageTemplate::kStrictEvalArguments);
1085 classifier->RecordExpressionError(scanner()->location(),
1091 scanner()->location(), MessageTemplate::kStrongUndefined);
1095 scanner()->location(), MessageTemplate::kStrongUndefined);
1097 scanner()->location(), MessageTemplate::kStrongUndefined);
1102 scanner()->FindSymbol(classifier->duplicate_finder(), 1) != 0) {
1103 classifier->RecordDuplicateFormalParameterError(scanner()->location());
1112 scanner()->location(), MessageTemplate::kUnexpectedStrictReserved);
1120 classifier->RecordLetPatternError(scanner()->location(),
1123 return this->GetSymbol(scanner());
1148 IdentifierT name = this->GetSymbol(scanner());
1168 IdentifierT name = this->GetSymbol(scanner());
1181 scanner()->IsGetOrSet(is_get, is_set);
1190 if (!scanner()->ScanRegExpPattern(seen_equal)) {
1199 IdentifierT js_pattern = this->GetNextSymbol(scanner());
1200 Maybe<RegExp::Flags> flags = scanner()->ScanRegExpFlags();
1269 return this->ExpressionFromLiteral(Next(), beg_pos, scanner(), factory());
1273 scanner()->peek_location(), MessageTemplate::kUnexpectedTokenNumber);
1274 return this->ExpressionFromLiteral(Next(), beg_pos, scanner(), factory());
1285 name, beg_pos, scanner()->location().end_pos, scope_, factory());
1290 scanner()->peek_location(), MessageTemplate::kUnexpectedTokenString);
1292 return this->ExpressionFromString(beg_pos, scanner(), factory());
1297 scanner()->peek_location(), MessageTemplate::kUnexpectedTokenRegExp);
1302 scanner()->peek_location(), MessageTemplate::kUnexpectedTokenRegExp);
1331 classifier->RecordExpressionError(scanner()->location(),
1334 classifier->RecordBindingPatternError(scanner()->location(),
1342 classifier->RecordExpressionError(scanner()->location(),
1349 ReportMessageAt(scanner()->peek_location(),
1380 Scanner::Location class_name_location = Scanner::Location::invalid();
1384 class_name_location = scanner()->location();
1394 scanner()->peek_location(),
1459 scanner()->peek_location(), MessageTemplate::kParamAfterRest);
1505 ReportMessageAt(scanner()->peek_location(),
1524 Scanner::Location(start_pos, scanner()->location().end_pos),
1528 scanner()->location().end_pos);
1533 Scanner::Location(start_pos, scanner()->location().end_pos),
1575 *name = this->GetSymbol(scanner());
1580 *name = this->GetNumberAsSymbol(scanner());
1585 *name = this->GetNumberAsSymbol(scanner());
1638 int next_beg_pos = scanner()->peek_location().beg_pos;
1639 int next_end_pos = scanner()->peek_location().end_pos;
1653 scanner()->is_literal_contextual_keyword(CStrVector("static"));
1686 ReportUnexpectedTokenAt(scanner()->location(), name_token);
1692 scanner()->FindSymbol(classifier->duplicate_finder(), 1) != 0) {
1693 classifier->RecordDuplicateFormalParameterError(scanner()->location());
1697 scanner()->location(), MessageTemplate::kLetInLexicalBinding);
1716 Scanner::Location(next_beg_pos, scanner()->location().end_pos),
1729 ReportUnexpectedTokenAt(scanner()->location(), name_token);
1736 Scanner::Location(next_beg_pos, scanner()->location().end_pos),
1761 *name, scanner()->location(), kSkipFunctionNameCheck, kind,
1804 *name, scanner()->location(), kSkipFunctionNameCheck, kind,
1901 Scanner::Location* first_spread_arg_loc, ExpressionClassifier* classifier,
1906 Scanner::Location spread_arg = Scanner::Location::invalid();
1949 Scanner::Location location = scanner_->location();
2000 Scanner::Location loc(lhs_beg_pos, scanner()->location().end_pos);
2016 Scanner::Location duplicate_loc = Scanner::Location::invalid();
2027 Scanner::Location(lhs_beg_pos, scanner()->location().end_pos),
2056 scanner()->location().end_pos);
2073 classifier, expression, lhs_beg_pos, scanner()->location().end_pos,
2078 scanner()->location().end_pos);
2081 expression, lhs_beg_pos, scanner()->location().end_pos,
2089 classifier->RecordBindingPatternError(scanner()->location(),
2115 Scanner::Location(lhs_beg_pos, scanner()->location().end_pos),
2154 classifier->RecordPatternError(scanner()->peek_location(),
2162 if (!scanner()->HasAnyLineTerminatorBeforeNext()) {
2248 Scanner::Location op_location = scanner()->location();
2339 expression, beg_pos, scanner()->location().end_pos,
2365 if (!scanner()->HasAnyLineTerminatorBeforeNext() &&
2371 expression, lhs_beg_pos, scanner()->location().end_pos,
2423 if (scanner()->current_token() == Token::IDENTIFIER ||
2424 scanner()->current_token() == Token::SUPER) {
2442 Scanner::Location spread_pos;
2543 Scanner::Location spread_pos;
2590 Scanner::Location function_name_location = Scanner::Location::invalid();
2596 function_name_location = scanner()->location();
2631 function_state_->set_this_location(scanner()->location());
2711 Scanner::Location super_loc = scanner()->location();
2720 Scanner::Location spread_pos;
2730 ReportMessageAt(scanner()->location(),
2735 ReportMessageAt(scanner()->location(),
2782 ReportMessageAt(scanner()->location(),
2789 function_state_->set_super_location(scanner()->location());
2794 ReportMessageAt(scanner()->location(), MessageTemplate::kUnexpectedSuper);
2808 ReportMessageAt(scanner()->location(),
2860 if (scanner()->current_token() == Token::IDENTIFIER) {
2922 scanner()->location().end_pos, is_rest);
2961 ReportMessageAt(scanner()->peek_location(),
2983 ReportMessageAt(Scanner::Location(formals_start_pos, formals_end_pos),
2990 ReportMessageAt(Scanner::Location(formals_start_pos, formals_end_pos),
2995 ReportMessageAt(Scanner::Location(formals_start_pos, formals_end_pos),
3045 Scanner::Location super_loc;
3097 formal_parameters.scope->set_end_position(scanner()->location().end_pos);
3110 scanner()->location().end_pos, CHECK_OK);
3180 ReportMessageAt(Scanner::Location(start, peek_position()),
3186 Scanner::Location(position() + 1, peek_position()),
3198 ReportMessageAt(Scanner::Location(expr_pos, peek_position()),
3206 next = scanner()->ScanTemplateContinuation();
3211 ReportMessageAt(Scanner::Location(start, pos),
3217 Scanner::Location(position() + 1, peek_position()),
3262 Scanner::Location location(beg_pos, end_pos);
3304 const Scanner::Location location(begin, end);