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

Side by Side Diff: src/scanner.cc

Issue 12646003: Add parser support for generators. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Fix bad initialization list in last preparser commit Created 7 years, 8 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
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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 KEYWORD("true", Token::TRUE_LITERAL) \ 870 KEYWORD("true", Token::TRUE_LITERAL) \
871 KEYWORD("try", Token::TRY) \ 871 KEYWORD("try", Token::TRY) \
872 KEYWORD("typeof", Token::TYPEOF) \ 872 KEYWORD("typeof", Token::TYPEOF) \
873 KEYWORD_GROUP('v') \ 873 KEYWORD_GROUP('v') \
874 KEYWORD("var", Token::VAR) \ 874 KEYWORD("var", Token::VAR) \
875 KEYWORD("void", Token::VOID) \ 875 KEYWORD("void", Token::VOID) \
876 KEYWORD_GROUP('w') \ 876 KEYWORD_GROUP('w') \
877 KEYWORD("while", Token::WHILE) \ 877 KEYWORD("while", Token::WHILE) \
878 KEYWORD("with", Token::WITH) \ 878 KEYWORD("with", Token::WITH) \
879 KEYWORD_GROUP('y') \ 879 KEYWORD_GROUP('y') \
880 KEYWORD("yield", Token::FUTURE_STRICT_RESERVED_WORD) 880 KEYWORD("yield", Token::YIELD)
881 881
882 882
883 static Token::Value KeywordOrIdentifierToken(const char* input, 883 static Token::Value KeywordOrIdentifierToken(const char* input,
884 int input_length, 884 int input_length,
885 bool harmony_scoping, 885 bool harmony_scoping,
886 bool harmony_modules) { 886 bool harmony_modules) {
887 ASSERT(input_length >= 1); 887 ASSERT(input_length >= 1);
888 const int kMinLength = 2; 888 const int kMinLength = 2;
889 const int kMaxLength = 10; 889 const int kMaxLength = 10;
890 if (input_length < kMinLength || input_length > kMaxLength) { 890 if (input_length < kMinLength || input_length > kMaxLength) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 Advance(); 1080 Advance();
1081 } 1081 }
1082 } 1082 }
1083 literal.Complete(); 1083 literal.Complete();
1084 1084
1085 next_.location.end_pos = source_pos() - 1; 1085 next_.location.end_pos = source_pos() - 1;
1086 return true; 1086 return true;
1087 } 1087 }
1088 1088
1089 } } // namespace v8::internal 1089 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/scanner.h ('k') | src/token.h » ('j') | test/mjsunit/harmony/generators-parsing.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698