| Index: src/scanner.h
|
| ===================================================================
|
| --- src/scanner.h (revision 6800)
|
| +++ src/scanner.h (working copy)
|
| @@ -43,7 +43,7 @@
|
| BufferedUC16CharacterStream();
|
| virtual ~BufferedUC16CharacterStream();
|
|
|
| - virtual void PushBack(uc16 character);
|
| + virtual void PushBack(uc32 character);
|
|
|
| protected:
|
| static const unsigned kBufferSize = 512;
|
| @@ -107,11 +107,12 @@
|
| int end_position);
|
| virtual ~ExternalTwoByteStringUC16CharacterStream();
|
|
|
| - virtual void PushBack(uc16 character) {
|
| + virtual void PushBack(uc32 character) {
|
| ASSERT(buffer_cursor_ > raw_data_);
|
| buffer_cursor_--;
|
| pos_--;
|
| }
|
| +
|
| protected:
|
| virtual unsigned SlowSeekForward(unsigned delta) {
|
| // Fast case always handles seeking.
|
| @@ -147,6 +148,12 @@
|
| // Returns the next token.
|
| Token::Value Next();
|
|
|
| + // Returns the value of a number token.
|
| + double number() {
|
| + return number_;
|
| + }
|
| +
|
| +
|
| protected:
|
| // Skip past JSON whitespace (only space, tab, newline and carrige-return).
|
| bool SkipJsonWhiteSpace();
|
| @@ -177,6 +184,9 @@
|
| // are the only valid JSON identifiers (productions JSONBooleanLiteral,
|
| // JSONNullLiteral).
|
| Token::Value ScanJsonIdentifier(const char* text, Token::Value token);
|
| +
|
| + // Holds the value of a scanned number token.
|
| + double number_;
|
| };
|
|
|
| } } // namespace v8::internal
|
|
|