Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: runtime/vm/token.cc

Issue 11199002: Remove built-in identifier 'negate' from VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 #undef TOKEN_PRECEDENCE 30 #undef TOKEN_PRECEDENCE
31 31
32 #define TOKEN_ATTRIBUTE(t, s, p, a) a, 32 #define TOKEN_ATTRIBUTE(t, s, p, a) a,
33 const Token::Attribute Token::attributes_[] = { 33 const Token::Attribute Token::attributes_[] = {
34 DART_TOKEN_LIST(TOKEN_ATTRIBUTE) 34 DART_TOKEN_LIST(TOKEN_ATTRIBUTE)
35 DART_KEYWORD_LIST(TOKEN_ATTRIBUTE) 35 DART_KEYWORD_LIST(TOKEN_ATTRIBUTE)
36 }; 36 };
37 #undef TOKEN_ATTRIBUTE 37 #undef TOKEN_ATTRIBUTE
38 38
39 39
40 bool Token::IsBinaryToken(Token::Kind token) { 40 bool Token::IsBinaryOperator(Token::Kind token) {
41 switch (token) { 41 switch (token) {
42 case Token::kADD: 42 case Token::kADD:
43 case Token::kSUB: 43 case Token::kSUB:
44 case Token::kMUL: 44 case Token::kMUL:
45 case Token::kDIV: 45 case Token::kDIV:
46 case Token::kTRUNCDIV: 46 case Token::kTRUNCDIV:
47 case Token::kMOD: 47 case Token::kMOD:
48 case Token::kBIT_OR: 48 case Token::kBIT_OR:
49 case Token::kBIT_XOR: 49 case Token::kBIT_XOR:
50 case Token::kBIT_AND: 50 case Token::kBIT_AND:
51 case Token::kOR: 51 case Token::kOR:
52 case Token::kAND: 52 case Token::kAND:
53 case Token::kSHL: 53 case Token::kSHL:
54 case Token::kSHR: 54 case Token::kSHR:
55 return true; 55 return true;
56 default: 56 default:
57 return false; 57 return false;
58 } 58 }
59 } 59 }
60 60
61 61
62 bool Token::IsUnaryToken(Token::Kind token) { 62 bool Token::IsPrefixOperator(Token::Kind token) {
63 return (token == Token::kNEGATE) || (token == kBIT_NOT); 63 return (token == kNOT) || (token == kBIT_NOT) || (token == kNEGATE);
64 } 64 }
65 65
66 } // namespace dart 66 } // namespace dart
OLDNEW
« runtime/vm/parser.cc ('K') | « runtime/vm/token.h ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698