| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #include "vm/token.h" | 5 #include "vm/token.h" |
| 6 | 6 |
| 7 #include "vm/object.h" | 7 #include "vm/object.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 default: | 70 default: |
| 71 return false; | 71 return false; |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 | 74 |
| 75 | 75 |
| 76 bool Token::IsUnaryArithmeticOperator(Token::Kind token) { | 76 bool Token::IsUnaryArithmeticOperator(Token::Kind token) { |
| 77 return (token == kBIT_NOT) || (token == kNEGATE); | 77 return (token == kBIT_NOT) || (token == kNEGATE); |
| 78 } | 78 } |
| 79 | 79 |
| 80 |
| 81 bool Token::IsBinaryBitwiseOperator(Token::Kind token) { |
| 82 switch (token) { |
| 83 case Token::kBIT_OR: |
| 84 case Token::kBIT_XOR: |
| 85 case Token::kBIT_AND: |
| 86 case Token::kSHL: |
| 87 case Token::kSHR: |
| 88 return true; |
| 89 default: |
| 90 return false; |
| 91 } |
| 92 } |
| 93 |
| 80 } // namespace dart | 94 } // namespace dart |
| OLD | NEW |