Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: src/parser.h

Issue 7616009: Parse harmony let declarations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 // Check if the given string is 'eval' or 'arguments'. 474 // Check if the given string is 'eval' or 'arguments'.
475 bool IsEvalOrArguments(Handle<String> string); 475 bool IsEvalOrArguments(Handle<String> string);
476 476
477 // All ParseXXX functions take as the last argument an *ok parameter 477 // All ParseXXX functions take as the last argument an *ok parameter
478 // which is set to false if parsing failed; it is unchanged otherwise. 478 // which is set to false if parsing failed; it is unchanged otherwise.
479 // By making the 'exception handling' explicit, we are forced to check 479 // By making the 'exception handling' explicit, we are forced to check
480 // for failure at the call sites. 480 // for failure at the call sites.
481 void* ParseSourceElements(ZoneList<Statement*>* processor, 481 void* ParseSourceElements(ZoneList<Statement*>* processor,
482 int end_token, bool* ok); 482 int end_token, bool* ok);
483 Statement* ParseSourceElement(ZoneStringList* labels, bool* ok);
483 Statement* ParseStatement(ZoneStringList* labels, bool* ok); 484 Statement* ParseStatement(ZoneStringList* labels, bool* ok);
484 Statement* ParseFunctionDeclaration(bool* ok); 485 Statement* ParseFunctionDeclaration(bool* ok);
485 Statement* ParseNativeDeclaration(bool* ok); 486 Statement* ParseNativeDeclaration(bool* ok);
486 Block* ParseBlock(ZoneStringList* labels, bool* ok); 487 Block* ParseBlock(ZoneStringList* labels, bool* ok);
487 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok); 488 Block* ParseScopedBlock(ZoneStringList* labels, bool* ok);
488 Block* ParseVariableStatement(bool* ok); 489 Block* ParseVariableStatement(bool accept_LET, bool* ok);
489 Block* ParseVariableDeclarations(bool accept_IN, 490 Block* ParseVariableDeclarations(bool accept_LET,
491 bool accept_IN,
490 Handle<String>* out, 492 Handle<String>* out,
491 bool* ok); 493 bool* ok);
492 Statement* ParseExpressionOrLabelledStatement(ZoneStringList* labels, 494 Statement* ParseExpressionOrLabelledStatement(ZoneStringList* labels,
493 bool* ok); 495 bool* ok);
494 IfStatement* ParseIfStatement(ZoneStringList* labels, bool* ok); 496 IfStatement* ParseIfStatement(ZoneStringList* labels, bool* ok);
495 Statement* ParseContinueStatement(bool* ok); 497 Statement* ParseContinueStatement(bool* ok);
496 Statement* ParseBreakStatement(ZoneStringList* labels, bool* ok); 498 Statement* ParseBreakStatement(ZoneStringList* labels, bool* ok);
497 Statement* ParseReturnStatement(bool* ok); 499 Statement* ParseReturnStatement(bool* ok);
498 Block* WithHelper(Expression* obj, ZoneStringList* labels, bool* ok); 500 Block* WithHelper(Expression* obj, ZoneStringList* labels, bool* ok);
499 Statement* ParseWithStatement(ZoneStringList* labels, bool* ok); 501 Statement* ParseWithStatement(ZoneStringList* labels, bool* ok);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 private: 751 private:
750 static const int kTypeSlot = 0; 752 static const int kTypeSlot = 0;
751 static const int kElementsSlot = 1; 753 static const int kElementsSlot = 1;
752 754
753 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 755 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
754 }; 756 };
755 757
756 } } // namespace v8::internal 758 } } // namespace v8::internal
757 759
758 #endif // V8_PARSER_H_ 760 #endif // V8_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698