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

Side by Side Diff: src/scanner.h

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | 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 2010 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 116 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 V8JavaScriptScanner(); 137 explicit V8JavaScriptScanner(Isolate* isolate)
138 : JavaScriptScanner(isolate) {}
139
138 void Initialize(UC16CharacterStream* source); 140 void Initialize(UC16CharacterStream* source);
139 }; 141 };
140 142
141 143
142 class JsonScanner : public Scanner { 144 class JsonScanner : public Scanner {
143 public: 145 public:
144 JsonScanner(); 146 explicit JsonScanner(Isolate* isolate);
145 147
146 void Initialize(UC16CharacterStream* source); 148 void Initialize(UC16CharacterStream* source);
147 149
148 // Returns the next token. 150 // Returns the next token.
149 Token::Value Next(); 151 Token::Value Next();
150 152
151 // Returns the value of a number token. 153 // Returns the value of a number token.
152 double number() { 154 double number() {
153 return number_; 155 return number_;
154 } 156 }
(...skipping 30 matching lines...) Expand all
185 // JSONNullLiteral). 187 // JSONNullLiteral).
186 Token::Value ScanJsonIdentifier(const char* text, Token::Value token); 188 Token::Value ScanJsonIdentifier(const char* text, Token::Value token);
187 189
188 // Holds the value of a scanned number token. 190 // Holds the value of a scanned number token.
189 double number_; 191 double number_;
190 }; 192 };
191 193
192 } } // namespace v8::internal 194 } } // namespace v8::internal
193 195
194 #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