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_); |
} |