Index: src/scanner.h |
diff --git a/src/scanner.h b/src/scanner.h |
index 7f35e719da783767d55c96ffe04d29d8b7bb12c3..387d3319c167c014177499e90698047e2b4364ae 100644 |
--- a/src/scanner.h |
+++ b/src/scanner.h |
@@ -394,16 +394,20 @@ class Scanner { |
const AstRawString* NextSymbol(AstValueFactory* ast_value_factory); |
double DoubleValue(); |
- bool UnescapedLiteralMatches(const char* data, int length) { |
+ bool LiteralMatches(const char* data, int length, bool allow_escapes = true) { |
if (is_literal_one_byte() && |
literal_length() == length && |
- !literal_contains_escapes()) { |
+ (allow_escapes || !literal_contains_escapes())) { |
const char* token = |
reinterpret_cast<const char*>(literal_one_byte_string().start()); |
return !strncmp(token, data, length); |
} |
return false; |
} |
+ inline bool UnescapedLiteralMatches(const char* data, int length) { |
+ return LiteralMatches(data, length, false); |
+ } |
+ |
void IsGetOrSet(bool* is_get, bool* is_set) { |
if (is_literal_one_byte() && |
literal_length() == 3 && |