| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_TOKEN_H_ | 5 #ifndef VM_TOKEN_H_ |
| 6 #define VM_TOKEN_H_ | 6 #define VM_TOKEN_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } | 211 } |
| 212 | 212 |
| 213 static bool IsRelationalOperator(Kind tok) { | 213 static bool IsRelationalOperator(Kind tok) { |
| 214 return kLT <= tok && tok <= kGTE; | 214 return kLT <= tok && tok <= kGTE; |
| 215 } | 215 } |
| 216 | 216 |
| 217 static bool IsEqualityOperator(Kind tok) { | 217 static bool IsEqualityOperator(Kind tok) { |
| 218 return kEQ <= tok && tok <= kNE_STRICT; | 218 return kEQ <= tok && tok <= kNE_STRICT; |
| 219 } | 219 } |
| 220 | 220 |
| 221 static bool IsStrictEqualityOperator(Kind tok) { |
| 222 return (tok == kEQ_STRICT) || (tok == kNE_STRICT); |
| 223 } |
| 224 |
| 221 static bool IsTypeTestOperator(Kind tok) { | 225 static bool IsTypeTestOperator(Kind tok) { |
| 222 return (tok == kIS) || (tok == kISNOT); | 226 return (tok == kIS) || (tok == kISNOT); |
| 223 } | 227 } |
| 224 | 228 |
| 225 static bool IsTypeCastOperator(Kind tok) { | 229 static bool IsTypeCastOperator(Kind tok) { |
| 226 return tok == kAS; | 230 return tok == kAS; |
| 227 } | 231 } |
| 228 | 232 |
| 229 static bool IsIndexOperator(Kind tok) { | 233 static bool IsIndexOperator(Kind tok) { |
| 230 return tok == kINDEX || tok == kASSIGN_INDEX; | 234 return tok == kINDEX || tok == kASSIGN_INDEX; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 static const char* name_[]; | 295 static const char* name_[]; |
| 292 static const char* tok_str_[]; | 296 static const char* tok_str_[]; |
| 293 static const uint8_t precedence_[]; | 297 static const uint8_t precedence_[]; |
| 294 static const Attribute attributes_[]; | 298 static const Attribute attributes_[]; |
| 295 }; | 299 }; |
| 296 | 300 |
| 297 | 301 |
| 298 } // namespace dart | 302 } // namespace dart |
| 299 | 303 |
| 300 #endif // VM_TOKEN_H_ | 304 #endif // VM_TOKEN_H_ |
| OLD | NEW |