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

Side by Side Diff: src/preparser.cc

Issue 615813004: Allow escape sequences in Constructor/Prototype tokens in PreParserTraits::GetSymbol() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Escape backslash in string literals to make msvs happy Created 6 years, 1 month 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/scanner.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 6
7 #include "src/allocation.h" 7 #include "src/allocation.h"
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return PreParserIdentifier::Let(); 52 return PreParserIdentifier::Let();
53 } else if (scanner->current_token() == Token::YIELD) { 53 } else if (scanner->current_token() == Token::YIELD) {
54 return PreParserIdentifier::Yield(); 54 return PreParserIdentifier::Yield();
55 } 55 }
56 if (scanner->UnescapedLiteralMatches("eval", 4)) { 56 if (scanner->UnescapedLiteralMatches("eval", 4)) {
57 return PreParserIdentifier::Eval(); 57 return PreParserIdentifier::Eval();
58 } 58 }
59 if (scanner->UnescapedLiteralMatches("arguments", 9)) { 59 if (scanner->UnescapedLiteralMatches("arguments", 9)) {
60 return PreParserIdentifier::Arguments(); 60 return PreParserIdentifier::Arguments();
61 } 61 }
62 if (scanner->UnescapedLiteralMatches("prototype", 9)) { 62 if (scanner->LiteralMatches("prototype", 9)) {
63 return PreParserIdentifier::Prototype(); 63 return PreParserIdentifier::Prototype();
64 } 64 }
65 if (scanner->UnescapedLiteralMatches("constructor", 11)) { 65 if (scanner->LiteralMatches("constructor", 11)) {
66 return PreParserIdentifier::Constructor(); 66 return PreParserIdentifier::Constructor();
67 } 67 }
68 return PreParserIdentifier::Default(); 68 return PreParserIdentifier::Default();
69 } 69 }
70 70
71 71
72 PreParserIdentifier PreParserTraits::GetNumberAsSymbol(Scanner* scanner) { 72 PreParserIdentifier PreParserTraits::GetNumberAsSymbol(Scanner* scanner) {
73 return PreParserIdentifier::Default(); 73 return PreParserIdentifier::Default();
74 } 74 }
75 75
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); 939 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK);
940 ParseArguments(ok); 940 ParseArguments(ok);
941 941
942 return Expression::Default(); 942 return Expression::Default();
943 } 943 }
944 944
945 #undef CHECK_OK 945 #undef CHECK_OK
946 946
947 947
948 } } // v8::internal 948 } } // v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698