| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 static bool IsTypeTestOperator(Kind tok) { | 221 static bool IsTypeTestOperator(Kind tok) { |
| 222 return (tok == kIS) || (tok == kISNOT); | 222 return (tok == kIS) || (tok == kISNOT); |
| 223 } | 223 } |
| 224 | 224 |
| 225 static bool IsTypeCastOperator(Kind tok) { | 225 static bool IsTypeCastOperator(Kind tok) { |
| 226 return tok == kAS; | 226 return tok == kAS; |
| 227 } | 227 } |
| 228 | 228 |
| 229 static bool IsIndexOperator(Kind tok) { |
| 230 return tok == kINDEX || tok == kASSIGN_INDEX; |
| 231 } |
| 232 |
| 229 static bool IsPseudoKeyword(Kind tok) { | 233 static bool IsPseudoKeyword(Kind tok) { |
| 230 return (Attributes(tok) & kPseudoKeyword) != 0; | 234 return (Attributes(tok) & kPseudoKeyword) != 0; |
| 231 } | 235 } |
| 232 | 236 |
| 233 static bool IsKeyword(Kind tok) { | 237 static bool IsKeyword(Kind tok) { |
| 234 return (Attributes(tok) & kKeyword) != 0; | 238 return (Attributes(tok) & kKeyword) != 0; |
| 235 } | 239 } |
| 236 | 240 |
| 237 static bool IsIdentifier(Kind tok) { | 241 static bool IsIdentifier(Kind tok) { |
| 238 return (tok == kIDENT) || IsPseudoKeyword(tok); | 242 return (tok == kIDENT) || IsPseudoKeyword(tok); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 static const char* name_[]; | 291 static const char* name_[]; |
| 288 static const char* tok_str_[]; | 292 static const char* tok_str_[]; |
| 289 static const uint8_t precedence_[]; | 293 static const uint8_t precedence_[]; |
| 290 static const Attribute attributes_[]; | 294 static const Attribute attributes_[]; |
| 291 }; | 295 }; |
| 292 | 296 |
| 293 | 297 |
| 294 } // namespace dart | 298 } // namespace dart |
| 295 | 299 |
| 296 #endif // VM_TOKEN_H_ | 300 #endif // VM_TOKEN_H_ |
| OLD | NEW |