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

Side by Side Diff: src/parser.h

Issue 12646003: Add parser support for generators. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | src/parser.cc » ('j') | src/preparser.cc » ('J')
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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 } 701 }
702 if (StackLimitCheck(isolate()).HasOverflowed()) { 702 if (StackLimitCheck(isolate()).HasOverflowed()) {
703 // Any further calls to Next or peek will return the illegal token. 703 // Any further calls to Next or peek will return the illegal token.
704 // The current call must return the next token, which might already 704 // The current call must return the next token, which might already
705 // have been peek'ed. 705 // have been peek'ed.
706 stack_overflow_ = true; 706 stack_overflow_ = true;
707 } 707 }
708 return scanner().Next(); 708 return scanner().Next();
709 } 709 }
710 710
711 bool inside_generator() const { return top_scope_->inside_generator(); }
712
711 bool peek_any_identifier(); 713 bool peek_any_identifier();
712 714
713 INLINE(void Consume(Token::Value token)); 715 INLINE(void Consume(Token::Value token));
714 void Expect(Token::Value token, bool* ok); 716 void Expect(Token::Value token, bool* ok);
715 bool Check(Token::Value token); 717 bool Check(Token::Value token);
716 void ExpectSemicolon(bool* ok); 718 void ExpectSemicolon(bool* ok);
717 void ExpectContextualKeyword(const char* keyword, bool* ok); 719 void ExpectContextualKeyword(const char* keyword, bool* ok);
718 720
719 Handle<String> LiteralString(PretenureFlag tenured) { 721 Handle<String> LiteralString(PretenureFlag tenured) {
720 if (scanner().is_literal_ascii()) { 722 if (scanner().is_literal_ascii()) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 private: 879 private:
878 static const int kTypeSlot = 0; 880 static const int kTypeSlot = 0;
879 static const int kElementsSlot = 1; 881 static const int kElementsSlot = 1;
880 882
881 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 883 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
882 }; 884 };
883 885
884 } } // namespace v8::internal 886 } } // namespace v8::internal
885 887
886 #endif // V8_PARSER_H_ 888 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | src/preparser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698