Index: src/scanner-base.cc |
diff --git a/src/scanner-base.cc b/src/scanner-base.cc |
index a55f0f42feba6305574fec82aa3a9e7d66c3494d..1564e9876ae30ebe1df9d8770a5f4a34428428fc 100644 |
--- a/src/scanner-base.cc |
+++ b/src/scanner-base.cc |
@@ -77,6 +77,18 @@ JavaScriptScanner::JavaScriptScanner(UnicodeCache* scanner_contants) |
: Scanner(scanner_contants), octal_pos_(Location::invalid()) { } |
+void JavaScriptScanner::Initialize(UC16CharacterStream* source) { |
+ source_ = source; |
+ // Need to capture identifiers in order to recognize "get" and "set" |
+ // in object literals. |
+ Init(); |
+ // Skip initial whitespace allowing HTML comment ends just like |
+ // after a newline and scan first token. |
+ has_line_terminator_before_next_ = true; |
+ SkipWhiteSpace(); |
+ Scan(); |
+} |
+ |
Token::Value JavaScriptScanner::Next() { |
current_ = next_; |
has_line_terminator_before_next_ = false; |