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

Unified Diff: src/scanner.h

Issue 6334106: Improve ScanJsonNumber. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | src/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.h
===================================================================
--- src/scanner.h (revision 6635)
+++ src/scanner.h (working copy)
@@ -148,6 +148,12 @@
// Returns the next token.
Token::Value Next();
+ // Returns the value of a number token.
+ double number() {
tfarina 2011/02/04 15:04:44 I'll not insist in the const here, but I'd like to
Lasse Reichstein 2011/02/07 08:40:43 We generally don't use const in the V8 code. It sh
+ return number_;
+ }
+
+
protected:
// Skip past JSON whitespace (only space, tab, newline and carrige-return).
bool SkipJsonWhiteSpace();
@@ -178,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
« no previous file with comments | « src/parser.cc ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698