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

Unified Diff: src/parser.cc

Issue 493173003: Fix issue with numeric property names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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.h ('k') | src/preparser.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 db4e0fed2416554afc676609979d00e0317acf46..197f81727d4960a577e2589e96dd1f39bf70d4d8 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -629,6 +629,15 @@ const AstRawString* ParserTraits::GetSymbol(Scanner* scanner) {
}
+const AstRawString* ParserTraits::GetNumberAsSymbol(Scanner* scanner) {
+ double double_value = parser_->scanner()->DoubleValue();
+ char array[100];
+ const char* string =
+ DoubleToCString(double_value, Vector<char>(array, ARRAY_SIZE(array)));
+ return ast_value_factory()->GetOneByteString(string);
+}
+
+
const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) {
return parser_->scanner()->NextSymbol(parser_->ast_value_factory_);
}
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698