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

Unified Diff: src/scanner.cc

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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/scanner.h ('k') | src/scopeinfo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index a2ca30a9be5df0b08eede51835eb506ff78752a1..1fa8db36eaebf5dfa82b865334a701d619eba390 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -1424,6 +1424,16 @@ const AstRawString* Scanner::CurrentRawSymbol(
}
+bool Scanner::IsFloat() {
+ Vector<const uint8_t> literal_string = literal_one_byte_string();
+ for (int i = 0; i < literal_string.length(); ++i) {
+ if (literal_string[i] == '.')
+ return true;
+ }
+ return false;
+}
+
+
double Scanner::DoubleValue() {
DCHECK(is_literal_one_byte());
return StringToDouble(
« no previous file with comments | « src/scanner.h ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698