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

Side by Side Diff: src/parser.h

Issue 16739008: For-of statements do not permit initializers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 // Any further calls to Next or peek will return the illegal token. 722 // Any further calls to Next or peek will return the illegal token.
723 // The current call must return the next token, which might already 723 // The current call must return the next token, which might already
724 // have been peek'ed. 724 // have been peek'ed.
725 stack_overflow_ = true; 725 stack_overflow_ = true;
726 } 726 }
727 return scanner().Next(); 727 return scanner().Next();
728 } 728 }
729 729
730 bool is_generator() const { return current_function_state_->is_generator(); } 730 bool is_generator() const { return current_function_state_->is_generator(); }
731 731
732 bool CheckInOrOf(ForEachStatement::VisitMode* visit_mode); 732 bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode);
733 733
734 bool peek_any_identifier(); 734 bool peek_any_identifier();
735 735
736 INLINE(void Consume(Token::Value token)); 736 INLINE(void Consume(Token::Value token));
737 void Expect(Token::Value token, bool* ok); 737 void Expect(Token::Value token, bool* ok);
738 bool Check(Token::Value token); 738 bool Check(Token::Value token);
739 void ExpectSemicolon(bool* ok); 739 void ExpectSemicolon(bool* ok);
740 bool CheckContextualKeyword(Vector<const char> keyword); 740 bool CheckContextualKeyword(Vector<const char> keyword);
741 void ExpectContextualKeyword(Vector<const char> keyword, bool* ok); 741 void ExpectContextualKeyword(Vector<const char> keyword, bool* ok);
742 742
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 private: 902 private:
903 static const int kLiteralTypeSlot = 0; 903 static const int kLiteralTypeSlot = 0;
904 static const int kElementsSlot = 1; 904 static const int kElementsSlot = 1;
905 905
906 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 906 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
907 }; 907 };
908 908
909 } } // namespace v8::internal 909 } } // namespace v8::internal
910 910
911 #endif // V8_PARSER_H_ 911 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698