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

Side by Side Diff: src/scanner.h

Issue 6824071: Cleanup of ScannerConstants, now named UnicodeCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | src/scanner.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 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 }; 127 };
128 128
129 129
130 // ---------------------------------------------------------------------------- 130 // ----------------------------------------------------------------------------
131 // V8JavaScriptScanner 131 // V8JavaScriptScanner
132 // JavaScript scanner getting its input from either a V8 String or a unicode 132 // JavaScript scanner getting its input from either a V8 String or a unicode
133 // CharacterStream. 133 // CharacterStream.
134 134
135 class V8JavaScriptScanner : public JavaScriptScanner { 135 class V8JavaScriptScanner : public JavaScriptScanner {
136 public: 136 public:
137 explicit V8JavaScriptScanner(ScannerConstants* scanner_constants) 137 explicit V8JavaScriptScanner(UnicodeCache* unicode_cache)
138 : JavaScriptScanner(scanner_constants) {} 138 : JavaScriptScanner(unicode_cache) {}
139 139
140 void Initialize(UC16CharacterStream* source); 140 void Initialize(UC16CharacterStream* source);
141 }; 141 };
142 142
143 143
144 class JsonScanner : public Scanner { 144 class JsonScanner : public Scanner {
145 public: 145 public:
146 explicit JsonScanner(ScannerConstants* scanner_constants); 146 explicit JsonScanner(UnicodeCache* unicode_cache);
147 147
148 void Initialize(UC16CharacterStream* source); 148 void Initialize(UC16CharacterStream* source);
149 149
150 // Returns the next token. 150 // Returns the next token.
151 Token::Value Next(); 151 Token::Value Next();
152 152
153 // Returns the value of a number token. 153 // Returns the value of a number token.
154 double number() { 154 double number() {
155 return number_; 155 return number_;
156 } 156 }
(...skipping 30 matching lines...) Expand all
187 // JSONNullLiteral). 187 // JSONNullLiteral).
188 Token::Value ScanJsonIdentifier(const char* text, Token::Value token); 188 Token::Value ScanJsonIdentifier(const char* text, Token::Value token);
189 189
190 // Holds the value of a scanned number token. 190 // Holds the value of a scanned number token.
191 double number_; 191 double number_;
192 }; 192 };
193 193
194 } } // namespace v8::internal 194 } } // namespace v8::internal
195 195
196 #endif // V8_SCANNER_H_ 196 #endif // V8_SCANNER_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698