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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 default: | 62 default: |
63 return false; | 63 return false; |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 | 67 |
68 bool Token::IsUnaryArithmeticOperator(Token::Kind token) { | 68 bool Token::IsUnaryArithmeticOperator(Token::Kind token) { |
69 return (token == kBIT_NOT) || (token == kNEGATE); | 69 return (token == kBIT_NOT) || (token == kNEGATE); |
70 } | 70 } |
71 | 71 |
| 72 |
| 73 bool Token::IsBinaryBitwiseOperator(Token::Kind token) { |
| 74 switch (token) { |
| 75 case Token::kBIT_OR: |
| 76 case Token::kBIT_XOR: |
| 77 case Token::kBIT_AND: |
| 78 case Token::kSHL: |
| 79 case Token::kSHR: |
| 80 return true; |
| 81 default: |
| 82 return false; |
| 83 } |
| 84 } |
| 85 |
72 } // namespace dart | 86 } // namespace dart |
OLD | NEW |