| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 // which is set to false if parsing failed; it is unchanged otherwise. | 493 // which is set to false if parsing failed; it is unchanged otherwise. |
| 494 // By making the 'exception handling' explicit, we are forced to check | 494 // By making the 'exception handling' explicit, we are forced to check |
| 495 // for failure at the call sites. | 495 // for failure at the call sites. |
| 496 void* ParseSourceElements(ZoneList<Statement*>* processor, | 496 void* ParseSourceElements(ZoneList<Statement*>* processor, |
| 497 int end_token, bool* ok); | 497 int end_token, bool* ok); |
| 498 Statement* ParseSourceElement(ZoneStringList* labels, bool* ok); | 498 Statement* ParseSourceElement(ZoneStringList* labels, bool* ok); |
| 499 Statement* ParseStatement(ZoneStringList* labels, bool* ok); | 499 Statement* ParseStatement(ZoneStringList* labels, bool* ok); |
| 500 Statement* ParseFunctionDeclaration(bool* ok); | 500 Statement* ParseFunctionDeclaration(bool* ok); |
| 501 Statement* ParseNativeDeclaration(bool* ok); | 501 Statement* ParseNativeDeclaration(bool* ok); |
| 502 Block* ParseBlock(ZoneStringList* labels, bool* ok); | 502 Block* ParseBlock(ZoneStringList* labels, bool* ok); |
| 503 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok); | |
| 504 Block* ParseVariableStatement(VariableDeclarationContext var_context, | 503 Block* ParseVariableStatement(VariableDeclarationContext var_context, |
| 505 bool* ok); | 504 bool* ok); |
| 506 Block* ParseVariableDeclarations(VariableDeclarationContext var_context, | 505 Block* ParseVariableDeclarations(VariableDeclarationContext var_context, |
| 507 VariableDeclarationProperties* decl_props, | 506 VariableDeclarationProperties* decl_props, |
| 508 Handle<String>* out, | 507 Handle<String>* out, |
| 509 bool* ok); | 508 bool* ok); |
| 510 Statement* ParseExpressionOrLabelledStatement(ZoneStringList* labels, | 509 Statement* ParseExpressionOrLabelledStatement(ZoneStringList* labels, |
| 511 bool* ok); | 510 bool* ok); |
| 512 IfStatement* ParseIfStatement(ZoneStringList* labels, bool* ok); | 511 IfStatement* ParseIfStatement(ZoneStringList* labels, bool* ok); |
| 513 Statement* ParseContinueStatement(bool* ok); | 512 Statement* ParseContinueStatement(bool* ok); |
| 514 Statement* ParseBreakStatement(ZoneStringList* labels, bool* ok); | 513 Statement* ParseBreakStatement(ZoneStringList* labels, bool* ok); |
| 515 Statement* ParseReturnStatement(bool* ok); | 514 Statement* ParseReturnStatement(bool* ok); |
| 516 Statement* ParseWithStatement(ZoneStringList* labels, bool* ok); | 515 Statement* ParseWithStatement(ZoneStringList* labels, bool* ok); |
| 517 CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok); | 516 CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok); |
| 518 SwitchStatement* ParseSwitchStatement(ZoneStringList* labels, bool* ok); | 517 SwitchStatement* ParseSwitchStatement(ZoneStringList* labels, bool* ok); |
| 519 DoWhileStatement* ParseDoWhileStatement(ZoneStringList* labels, bool* ok); | 518 DoWhileStatement* ParseDoWhileStatement(ZoneStringList* labels, bool* ok); |
| 520 WhileStatement* ParseWhileStatement(ZoneStringList* labels, bool* ok); | 519 WhileStatement* ParseWhileStatement(ZoneStringList* labels, bool* ok); |
| 521 Statement* ParseForStatement(ZoneStringList* labels, bool* ok); | 520 Statement* ParseForStatement(ZoneStringList* labels, bool* ok); |
| 522 Statement* ParseThrowStatement(bool* ok); | 521 Statement* ParseThrowStatement(bool* ok); |
| 523 Expression* MakeCatchContext(Handle<String> id, VariableProxy* value); | 522 Expression* MakeCatchContext(Handle<String> id, VariableProxy* value); |
| 524 TryStatement* ParseTryStatement(bool* ok); | 523 TryStatement* ParseTryStatement(bool* ok); |
| 525 DebuggerStatement* ParseDebuggerStatement(bool* ok); | 524 DebuggerStatement* ParseDebuggerStatement(bool* ok); |
| 526 | 525 |
| 526 // Support for hamony block scoped bindings. |
| 527 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok); |
| 528 |
| 527 Expression* ParseExpression(bool accept_IN, bool* ok); | 529 Expression* ParseExpression(bool accept_IN, bool* ok); |
| 528 Expression* ParseAssignmentExpression(bool accept_IN, bool* ok); | 530 Expression* ParseAssignmentExpression(bool accept_IN, bool* ok); |
| 529 Expression* ParseConditionalExpression(bool accept_IN, bool* ok); | 531 Expression* ParseConditionalExpression(bool accept_IN, bool* ok); |
| 530 Expression* ParseBinaryExpression(int prec, bool accept_IN, bool* ok); | 532 Expression* ParseBinaryExpression(int prec, bool accept_IN, bool* ok); |
| 531 Expression* ParseUnaryExpression(bool* ok); | 533 Expression* ParseUnaryExpression(bool* ok); |
| 532 Expression* ParsePostfixExpression(bool* ok); | 534 Expression* ParsePostfixExpression(bool* ok); |
| 533 Expression* ParseLeftHandSideExpression(bool* ok); | 535 Expression* ParseLeftHandSideExpression(bool* ok); |
| 534 Expression* ParseNewExpression(bool* ok); | 536 Expression* ParseNewExpression(bool* ok); |
| 535 Expression* ParseMemberExpression(bool* ok); | 537 Expression* ParseMemberExpression(bool* ok); |
| 536 Expression* ParseNewPrefix(PositionStack* stack, bool* ok); | 538 Expression* ParseNewPrefix(PositionStack* stack, bool* ok); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 private: | 774 private: |
| 773 static const int kTypeSlot = 0; | 775 static const int kTypeSlot = 0; |
| 774 static const int kElementsSlot = 1; | 776 static const int kElementsSlot = 1; |
| 775 | 777 |
| 776 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 778 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 777 }; | 779 }; |
| 778 | 780 |
| 779 } } // namespace v8::internal | 781 } } // namespace v8::internal |
| 780 | 782 |
| 781 #endif // V8_PARSER_H_ | 783 #endif // V8_PARSER_H_ |
| OLD | NEW |