Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 1ea2a2284a7b49382ba3f3ec957600c21cb361a2..1c1e1c4520d0e3cad95a6f2cbb3afdec963d02a7 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -676,21 +676,24 @@ class PreParserExpression { |
return (code_ & kTypeMask) == kTypeStringLiteral; |
} |
- bool IsUseStrictLiteral() { |
+ bool IsUseStrictLiteral() const { |
return (code_ & kUseStrictString) == kUseStrictString; |
} |
- bool IsThis() { return code_ == kThisExpression; } |
+ bool IsThis() const { return (code_ & kThisExpression) == kThisExpression; } |
wingo
2014/07/23 12:54:55
Since the kThisExpression et al are just bitflags
Sven Panne
2014/07/23 13:26:05
For consistency, I would leave it as it is. All th
|
- bool IsThisProperty() { return code_ == kThisPropertyExpression; } |
+ bool IsThisProperty() const { |
+ return (code_ & kThisPropertyExpression) == kThisPropertyExpression; |
+ } |
- bool IsProperty() { |
- return code_ == kPropertyExpression || code_ == kThisPropertyExpression; |
+ bool IsProperty() const { |
+ return (code_ & kPropertyExpression) == kPropertyExpression || |
+ (code_ & kThisPropertyExpression) == kThisPropertyExpression; |
} |
- bool IsCall() { return code_ == kCallExpression; } |
+ bool IsCall() const { return (code_ & kCallExpression) == kCallExpression; } |
- bool IsValidReferenceExpression() { |
+ bool IsValidReferenceExpression() const { |
return IsIdentifier() || IsProperty(); |
} |