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

Unified Diff: src/parser.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/ast-value-factory.cc ('k') | src/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index faf36c4c7455d541f2bf38f6761f52fe1b359bd1..b9dcbfd84d11baf66e5b9f51e3f822510e0ed1d1 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -815,8 +815,9 @@ Literal* ParserTraits::ExpressionFromLiteral(Token::Value token, int pos,
return factory->NewSmiLiteral(value, pos);
}
case Token::NUMBER: {
+ bool has_dot = scanner->ContainsDot();
double value = scanner->DoubleValue();
- return factory->NewNumberLiteral(value, pos);
+ return factory->NewNumberLiteral(value, pos, has_dot);
}
default:
DCHECK(false);
« no previous file with comments | « src/ast-value-factory.cc ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698