Index: src/scanner.cc |
diff --git a/src/scanner.cc b/src/scanner.cc |
index 3425f4159e571d4bdfa0eb83d3064ac244821a61..69ea8ae6e7c296affc62211a96b435a035c01479 100644 |
--- a/src/scanner.cc |
+++ b/src/scanner.cc |
@@ -36,6 +36,25 @@ namespace v8 { |
namespace internal { |
// ---------------------------------------------------------------------------- |
+// Scanner::LiteralScope |
+ |
+Scanner::LiteralScope::LiteralScope(Scanner* self) |
+ : scanner_(self), complete_(false) { |
+ self->StartLiteral(); |
+} |
+ |
+ |
+Scanner::LiteralScope::~LiteralScope() { |
+ if (!complete_) scanner_->DropLiteral(); |
+} |
+ |
+ |
+void Scanner::LiteralScope::Complete() { |
+ scanner_->TerminateLiteral(); |
+ complete_ = true; |
+} |
+ |
+// ---------------------------------------------------------------------------- |
// Scanner |
Scanner::Scanner(UnicodeCache* unicode_cache) |