Lines Matching refs:Parser
36 #include "parser.h"
91 class Parser {
93 Parser(Handle<Script> script, bool allow_natives_syntax,
96 virtual ~Parser() { }
263 // Parser support
659 // Parser state of containing expression, if any.
706 // allocated and hence used by the pre-parser.
709 explicit TemporaryScope(Parser* parser);
749 Parser* parser_;
752 friend class Parser;
756 TemporaryScope::TemporaryScope(Parser* parser)
761 parser_(parser),
762 parent_(parser->temp_scope_) {
763 parser->temp_scope_ = this;
1022 class AstBuildingParser : public Parser {
1026 : Parser(script, allow_natives_syntax, extension, PARSE,
1041 Parser {
1045 : Parser(script, allow_natives_syntax, extension, PREPARSE,
1095 // Parser's target_stack_ (the stack of potential 'break' and
1101 Target(Parser* parser, AstNode* node)
1102 : parser_(parser), node_(node), previous_(parser_->target_stack_) {
1114 Parser* parser_;
1122 explicit TargetScope(Parser* parser)
1123 : parser_(parser), previous_(parser->target_stack_) {
1124 parser->target_stack_ = NULL;
1132 Parser* parser_;
1139 // Parser's scope stack. The constructor sets the parser's top scope
1144 LexicalScope(Parser* parser, Scope* scope)
1145 : parser_(parser),
1146 prev_scope_(parser->top_scope_),
1147 prev_level_(parser->with_nesting_level_) {
1158 Parser* parser_;
1185 // Implementation of Parser
1187 Parser::Parser(Handle<Script> script,
1209 bool Parser::PreParseProgram(Handle<String> source,
1228 FunctionLiteral* Parser::ParseProgram(Handle<String> source,
1236 // Initialize parser state.
1286 FunctionLiteral* Parser::ParseLazy(Handle<String> source,
1296 // Initialize parser state.
1333 FunctionLiteral* Parser::ParseJson(Handle<String> source,
1340 // Initialize parser state.
1383 void Parser::ReportMessage(const char* type, Vector<const char*> args) {
1411 // the parser.
1503 if (block_size_ >= Parser::kMinInitializationBlock) {
1659 void* Parser::ParseSourceElements(ZoneListWrapper<Statement>* processor,
1705 Statement* Parser::ParseStatement(ZoneStringList* labels, bool* ok) {
1924 Statement* Parser::ParseNativeDeclaration(bool* ok) {
1984 Statement* Parser::ParseFunctionDeclaration(bool* ok) {
2002 Block* Parser
2022 Block* Parser::ParseVariableStatement(bool* ok) {
2038 Block* Parser::ParseVariableDeclarations(bool accept_IN,
2232 Statement* Parser::ParseExpressionOrLabelledStatement(ZoneStringList* labels,
2275 IfStatement* Parser::ParseIfStatement(ZoneStringList* labels, bool* ok) {
2295 Statement* Parser::ParseContinueStatement(bool* ok) {
2323 Statement* Parser::ParseBreakStatement(ZoneStringList* labels, bool* ok) {
2356 Statement* Parser::ParseReturnStatement(bool* ok) {
2391 Block* Parser::WithHelper(Expression* obj,
2430 Statement* Parser::ParseWithStatement(ZoneStringList* labels, bool* ok) {
2443 CaseClause* Parser::ParseCaseClause(bool* default_seen_ptr, bool* ok) {
2476 SwitchStatement* Parser::ParseSwitchStatement(ZoneStringList* labels,
2503 Statement* Parser::ParseThrowStatement(bool* ok) {
2521 TryStatement* Parser::ParseTryStatement(bool* ok) {
2627 DoWhileStatement* Parser::ParseDoWhileStatement(ZoneStringList* labels,
2659 WhileStatement* Parser::ParseWhileStatement(ZoneStringList* labels, bool* ok) {
2677 Statement* Parser::ParseForStatement(ZoneStringList* labels, bool* ok) {
2775 Expression* Parser::ParseExpression(bool accept_IN, bool* ok) {
2791 Expression* Parser::ParseAssignmentExpression(bool accept_IN, bool* ok) {
2834 Expression* Parser::ParseConditionalExpression(bool accept_IN, bool* ok) {
2839 // We start using the binary expression parser for prec >= 4 only!
2862 Expression* Parser::ParseBinaryExpression(int prec, bool accept_IN, bool* ok) {
2968 Expression* Parser::ParseUnaryExpression(bool* ok) {
3022 Expression* Parser::ParsePostfixExpression(bool* ok) {
3043 Expression* Parser::ParseLeftHandSideExpression(bool* ok) {
3107 Expression* Parser::ParseNewPrefix(PositionStack* stack, bool* ok) {
3117 // member expression parser, which is only allowed to match argument
3137 Expression* Parser::ParseNewExpression(bool* ok) {
3143 Expression* Parser::ParseMemberExpression(bool* ok) {
3148 Expression* Parser::ParseMemberWithNewPrefixesExpression(PositionStack* stack,
3199 DebuggerStatement* Parser::ParseDebuggerStatement(bool* ok) {
3212 void Parser::ReportUnexpectedToken(Token::Value token) {
3239 Expression* Parser::ParsePrimaryExpression(bool* ok) {
3355 void Parser::BuildArrayLiteralBoilerplateLiterals(ZoneList<Expression*>* values,
3382 Expression* Parser::ParseArrayLiteral(bool* ok) {
3433 bool Parser::IsBoilerplateProperty(ObjectLiteral::Property* property) {
3473 Handle<Object> Parser::GetBoilerplateValue(Expression* expression) {
3484 void Parser::BuildObjectLiteralConstantProperties(
3521 Expression* Parser::ParseObjectLiteral(bool* ok) {
3626 Expression* Parser::ParseRegExpLiteral(bool seen_equal, bool* ok) {
3660 ZoneList<Expression*>* Parser::ParseArguments(bool* ok) {
3678 FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> var_name,
3800 Expression* Parser::ParseV8Intrinsic(bool* ok) {
3842 void Parser::Consume(Token::Value token) {
3850 void Parser::Expect(Token::Value token, bool* ok) {
3858 bool Parser::Check(Token::Value token) {
3868 void Parser::ExpectSemicolon(bool* ok) {
3885 Literal* Parser::GetLiteralUndefined() {
3890 Literal* Parser::GetLiteralTheHole() {
3895 Literal* Parser::GetLiteralNumber(double value) {
3900 Handle<String> Parser::ParseIdentifier(bool* ok) {
3911 Handle<String> Parser::ParseIdentifierOrGetOrSet(bool* is_get,
3927 // Parser support
3930 bool Parser::TargetStackContainsLabel(Handle<String> label) {
3940 BreakableStatement* Parser::LookupBreakTarget(Handle<String> label, bool* ok) {
3955 IterationStatement* Parser::LookupContinueTarget(Handle<String> label,
3972 void Parser::RegisterTargetUse(BreakTarget* target, Target* stop) {
3983 Literal* Parser::NewNumberLiteral(double number) {
3988 Expression* Parser::NewThrowReferenceError(Handle<String> type) {
3994 Expression* Parser::NewThrowSyntaxError(Handle<String> type,
4002 Expression* Parser::NewThrowTypeError(Handle<String> type,
4013 Expression* Parser::NewThrowError(Handle<String> constructor,
4037 Expression* Parser::ParseJson(bool* ok) {
4045 Expression* Parser::ParseJsonValue(bool* ok) {
4092 Expression* Parser::ParseJsonObject(bool* ok) {
4142 Expression* Parser::ParseJsonArray(bool* ok) {
4624 // don't want to scan the regexp twice unless it is necessary. This mini-parser
4970 // The Parser interface.
4972 // MakeAST() is just a wrapper for the corresponding Parser calls
4973 // so we don't have to expose the entire Parser class in the .h file.
5013 PreParser parser(no_script, allow_natives_syntax, extension);
5014 if (!parser.PreParseProgram(source, stream)) return NULL;
5018 Vector<unsigned> store = parser.recorder()->store()->ToVector().Clone();
5027 RegExpParser parser(input, &result->error, multiline);
5028 RegExpTree* tree = parser.ParsePattern();
5029 if (parser.failed()) {
5036 int capture_count = parser.captures_started();
5037 result->simple = tree->IsAtom() && parser.simple() && capture_count == 0;
5038 result->contains_anchor = parser.contains_anchor();
5041 return !parser.failed();
5054 AstBuildingParser parser(script, allow_natives_syntax, extension, pre_data);
5059 parser.ReportMessageAt(loc, message, args);
5072 result = parser
5074 result = parser.ParseProgram(source, &input, compile_in_global_context);
5087 AstBuildingParser parser(script, true, NULL, NULL); // always allow
5092 parser.ParseLazy(SubString(script_source, start_position, end_position),