Lines Matching refs:Parser
38 #include "parser.h"
249 Handle<String> Parser::LookupSymbol(int symbol_id) {
268 Handle<String> Parser::LookupCachedSymbol(int symbol_id) {
410 Scope* Parser::NewScope(Scope* parent, ScopeType type) {
419 // Parser's target_stack_ (the stack of potential 'break' and
462 // FunctionState and BlockState together implement the parser's scope stack.
463 // The parser's current scope is in top_scope_. The BlockState and
465 // pop. They are also used to hold the parser's per-function and per-block
468 class Parser::BlockState BASE_EMBEDDED {
470 BlockState(Parser* parser, Scope* scope)
471 : parser_(parser),
472 outer_scope_(parser->top_scope_) {
473 parser->top_scope_ = scope;
479 Parser* parser_;
484 Parser::FunctionState::FunctionState(Parser* parser,
492 parser_(parser),
493 outer_function_state_(parser->current_function_state_),
494 outer_scope_(parser->top_scope_),
497 parser->top_scope_ = scope;
498 parser->current_function_state_ = this;
503 Parser::FunctionState::~FunctionState() {
533 // Implementation of Parser
535 Parser::Parser(Handle<Script> script,
565 FunctionLiteral* Parser::ParseProgram(CompilationInfo* info) {
573 // Initialize parser state.
591 FunctionLiteral* Parser::DoParseProgram(CompilationInfo* info,
662 FunctionLiteral* Parser::ParseLazy(CompilationInfo* info) {
669 // Initialize parser state.
688 FunctionLiteral* Parser::ParseLazy(CompilationInfo* info,
749 Handle<String> Parser::GetSymbol(bool* ok) {
758 void Parser::ReportMessage(const char* type, Vector<const char*> args) {
764 void Parser::ReportMessage(const char* type, Vector<Handle<String> > args) {
770 void Parser::ReportMessageAt(Scanner::Location source_location,
788 void Parser::ReportMessageAt(Scanner::Location source_location,
806 // the parser.
1101 void* Parser::ParseSourceElements(ZoneList<Statement*>* processor,
1193 Statement* Parser::ParseModuleElement(ZoneStringList* labels,
1240 Block* Parser::ParseModuleDeclaration(ZoneStringList* names, bool* ok) {
1276 Module* Parser::ParseModule(bool* ok) {
1303 Module* Parser::ParseModuleLiteral(bool* ok) {
1344 Module* Parser::ParseModulePath(bool* ok) {
1378 Module* Parser::ParseModuleVariable(bool* ok) {
1394 Module* Parser::ParseModuleUrl(bool* ok) {
1410 Module* Parser::ParseModuleSpecifier(bool* ok) {
1423 Block* Parser::ParseImportDeclaration(bool* ok) {
1476 Statement* Parser::ParseExportDeclaration(bool* ok) {
1547 Statement* Parser::ParseBlockElement(ZoneStringList* labels,
1571 Statement* Parser::ParseStatement(ZoneStringList* labels, bool* ok) {
1700 VariableProxy* Parser::NewUnresolved(
1712 void Parser::Declare(Declaration* declaration, bool resolve, bool* ok) {
1880 Statement* Parser::ParseNativeDeclaration(bool* ok) {
1936 Statement* Parser::ParseFunctionDeclaration(ZoneStringList* names, bool* ok) {
1962 Block* Parser::ParseBlock(ZoneStringList* labels, bool* ok) {
1988 Block* Parser::ParseScopedBlock(ZoneStringList* labels, bool* ok) {
2023 Block* Parser::ParseVariableStatement(VariableDeclarationContext var_context,
2037 bool Parser::IsEvalOrArguments(Handle<String> string) {
2048 Block* Parser::ParseVariableDeclarations(
2373 Statement* Parser::ParseExpressionOrLabelledStatement(ZoneStringList* labels,
2439 IfStatement* Parser::ParseIfStatement(ZoneStringList* labels, bool* ok) {
2459 Statement* Parser::ParseContinueStatement(bool* ok) {
2489 Statement* Parser::ParseBreakStatement(ZoneStringList* labels, bool* ok) {
2525 Statement* Parser::ParseReturnStatement(bool* ok) {
2564 Statement* Parser::ParseWithStatement(ZoneStringList* labels, bool* ok) {
2592 CaseClause* Parser::ParseCaseClause(bool* default_seen_ptr, bool* ok) {
2625 SwitchStatement* Parser::ParseSwitchStatement(ZoneStringList* labels,
2652 Statement* Parser::ParseThrowStatement(bool* ok) {
2670 TryStatement* Parser::ParseTryStatement(bool* ok) {
2781 DoWhileStatement* Parser::ParseDoWhileStatement(ZoneStringList* labels,
2813 WhileStatement* Parser::ParseWhileStatement(ZoneStringList* labels, bool* ok) {
2831 Statement* Parser::ParseForStatement(ZoneStringList* labels, bool* ok) {
3011 Expression* Parser::ParseExpression(bool accept_IN, bool* ok) {
3029 Expression* Parser::ParseAssignmentExpression(bool accept_IN, bool* ok) {
3102 Expression* Parser::ParseConditionalExpression(bool accept_IN, bool* ok) {
3107 // We start using the binary expression parser for prec >= 4 only!
3133 Expression* Parser::ParseBinaryExpression(int prec, bool accept_IN, bool* ok) {
3226 Expression* Parser::ParseUnaryExpression(bool* ok) {
3311 Expression* Parser::ParsePostfixExpression(bool* ok) {
3346 Expression* Parser::ParseLeftHandSideExpression(bool* ok) {
3417 Expression* Parser::ParseNewPrefix(PositionStack* stack, bool* ok) {
3427 // member expression parser, which is only allowed to match argument
3448 Expression* Parser::ParseNewExpression(bool* ok) {
3454 Expression* Parser::ParseMemberExpression(bool* ok) {
3459 Expression* Parser::ParseMemberWithNewPrefixesExpression(PositionStack* stack,
3530 DebuggerStatement* Parser::ParseDebuggerStatement(bool* ok) {
3543 void Parser::ReportUnexpectedToken(Token::Value token) {
3577 void Parser::ReportInvalidPreparseData(Handle<String> name, bool* ok) {
3586 Expression* Parser::ParsePrimaryExpression(bool* ok) {
3701 void Parser::BuildArrayLiteralBoilerplateLiterals(ZoneList<Expression*>* values,
3728 Expression* Parser::ParseArrayLiteral(bool* ok) {
3850 bool Parser::IsBoilerplateProperty(ObjectLiteral::Property* property) {
3908 Handle<Object> Parser::GetBoilerplateValue(Expression* expression) {
3921 ObjectLiteralPropertyChecker(Parser* parser, LanguageMode language_mode) :
3923 parser_(parser),
3952 Parser* parser_;
3996 void Parser::BuildObjectLiteralConstantProperties(
4056 ObjectLiteral::Property* Parser::ParseObjectLiteralGetSet(bool is_getter,
4090 Expression* Parser::ParseObjectLiteral(bool* ok) {
4239 Expression* Parser::ParseRegExpLiteral(bool seen_equal, bool* ok) {
4258 ZoneList<Expression*>* Parser::ParseArguments(bool* ok) {
4374 FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> function_name,
4654 preparser::PreParser::PreParseResult Parser::LazyParseFunctionLiteral(
4676 Expression* Parser::ParseV8Intrinsic(bool* ok) {
4722 bool Parser::peek_any_identifier() {
4730 void Parser::Consume(Token::Value token) {
4738 void Parser::Expect(Token::Value token, bool* ok) {
4746 bool Parser::Check(Token::Value token) {
4756 void Parser::ExpectSemicolon(bool* ok) {
4773 void Parser::ExpectContextualKeyword(const char* keyword, bool* ok) {
4785 Literal* Parser::GetLiteralUndefined() {
4790 Literal* Parser::GetLiteralTheHole() {
4797 Handle<String> Parser::ParseIdentifier(bool* ok) {
4810 Handle<String> Parser::ParseIdentifierOrStrictReservedWord(
4822 Handle<String> Parser::ParseIdentifierName(bool* ok) {
4836 void Parser::MarkAsLValue(Expression* expression) {
4847 void Parser::CheckStrictModeLValue(Expression* expression,
4864 void Parser::CheckOctalLiteral(int beg_pos, int end_pos, bool* ok) {
4877 void Parser::CheckConflictingVarDeclarations(Scope* scope, bool* ok) {
4898 Handle<String> Parser::ParseIdentifierNameOrGetOrSet(bool* is_get,
4913 // Parser support
4916 bool Parser::TargetStackContainsLabel(Handle<String> label) {
4926 BreakableStatement* Parser::LookupBreakTarget(Handle<String> label, bool* ok) {
4941 IterationStatement* Parser::LookupContinueTarget(Handle<String> label,
4958 void Parser::RegisterTargetUse(Label* target, Target* stop) {
4969 Expression* Parser::NewThrowReferenceError(Handle<String> type) {
4975 Expression* Parser::NewThrowSyntaxError(Handle<String> type,
4984 Expression* Parser::NewThrowTypeError(Handle<String> type,
4996 Expression* Parser::NewThrowError(Handle<String> constructor,
5462 // don't want to scan the regexp twice unless it is necessary. This mini-parser
5819 // The Parser interface.
5960 RegExpParser parser(input, &result->error, multiline);
5961 RegExpTree* tree = parser.ParsePattern();
5962 if (parser.failed()) {
5969 int capture_count = parser.captures_started();
5970 result->simple = tree->IsAtom() && parser.simple() && capture_count == 0;
5971 result->contains_anchor = parser.contains_anchor();
5974 return !parser.failed();
5996 Parser parser(script, parsing_flags, NULL, NULL);
5998 result = parser.ParseLazy(info);
6000 result = parser.ParseProgram(info);
6004 Parser parser(script, parsing_flags, info->extension(), pre_data);
6009 parser.ReportMessageAt(loc, message, args);
6017 result = parser.ParseProgram(info);