Index: src/scanner-base.h |
diff --git a/src/scanner-base.h b/src/scanner-base.h |
index 72797a8945d644f4581057c3c0ca2c181756b1e9..50f30305c4aa3e150bedb3965668c56678d8af1b 100644 |
--- a/src/scanner-base.h |
+++ b/src/scanner-base.h |
@@ -41,6 +41,25 @@ |
namespace v8 { |
namespace internal { |
+// Interface through which the scanner reads characters from the input source. |
+class UTF16Buffer { |
+ public: |
+ UTF16Buffer(); |
+ virtual ~UTF16Buffer() {} |
+ |
+ virtual void PushBack(uc32 ch) = 0; |
+ // Returns a value < 0 when the buffer end is reached. |
+ virtual uc32 Advance() = 0; |
+ virtual void SeekForward(int pos) = 0; |
+ |
+ int pos() const { return pos_; } |
+ |
+ protected: |
+ int pos_; // Current position in the buffer. |
+ int end_; // Position where scanning should stop (EOF). |
+}; |
+ |
+ |
class ScannerConstants : AllStatic { |
public: |
typedef unibrow::Utf8InputBuffer<1024> Utf8Decoder; |