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

Unified Diff: src/scanner.cc

Issue 1201783003: Allow numeric literals to be checked for a decimal point. (Closed) 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') | test/cctest/test-parsing.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 cf5a69c142de44b9d4e9d36db1aa911337872899..ad7c7d983c5e375afa7ddea2b1e89d6ac2ea89fd 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -1425,6 +1425,13 @@ double Scanner::DoubleValue() {
}
+bool Scanner::ContainsDot() {
+ DCHECK(is_literal_one_byte());
+ Vector<const uint8_t> str = literal_one_byte_string();
+ return std::find(str.begin(), str.end(), '.') != str.end();
+}
+
+
int Scanner::FindSymbol(DuplicateFinder* finder, int value) {
if (is_literal_one_byte()) {
return finder->AddOneByteSymbol(literal_one_byte_string(), value);
« no previous file with comments | « src/scanner.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698