OLD | NEW |
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 #ifndef V8_SCANNER_CHARACTER_STREAMS_H_ | 5 #ifndef V8_SCANNER_CHARACTER_STREAMS_H_ |
6 #define V8_SCANNER_CHARACTER_STREAMS_H_ | 6 #define V8_SCANNER_CHARACTER_STREAMS_H_ |
7 | 7 |
| 8 #include "src/handles.h" |
8 #include "src/scanner.h" | 9 #include "src/scanner.h" |
| 10 #include "src/vector.h" |
9 | 11 |
10 namespace v8 { | 12 namespace v8 { |
11 namespace internal { | 13 namespace internal { |
12 | 14 |
| 15 // Forward declarations. |
| 16 class ExternalTwoByteString; |
| 17 |
13 // A buffered character stream based on a random access character | 18 // A buffered character stream based on a random access character |
14 // source (ReadBlock can be called with pos_ pointing to any position, | 19 // source (ReadBlock can be called with pos_ pointing to any position, |
15 // even positions before the current). | 20 // even positions before the current). |
16 class BufferedUtf16CharacterStream: public Utf16CharacterStream { | 21 class BufferedUtf16CharacterStream: public Utf16CharacterStream { |
17 public: | 22 public: |
18 BufferedUtf16CharacterStream(); | 23 BufferedUtf16CharacterStream(); |
19 virtual ~BufferedUtf16CharacterStream(); | 24 virtual ~BufferedUtf16CharacterStream(); |
20 | 25 |
21 virtual void PushBack(uc32 character); | 26 virtual void PushBack(uc32 character); |
22 | 27 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 175 |
171 private: | 176 private: |
172 static const size_t kNoBookmark = -1; | 177 static const size_t kNoBookmark = -1; |
173 | 178 |
174 size_t bookmark_; | 179 size_t bookmark_; |
175 }; | 180 }; |
176 | 181 |
177 } } // namespace v8::internal | 182 } } // namespace v8::internal |
178 | 183 |
179 #endif // V8_SCANNER_CHARACTER_STREAMS_H_ | 184 #endif // V8_SCANNER_CHARACTER_STREAMS_H_ |
OLD | NEW |