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

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

Issue 9264051: Fix for bug 1229: Unary operator plus is not allowed ... except for literals. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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) 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 TOK(kBIT_AND, "&", 8, kNoAttribute) \ 70 TOK(kBIT_AND, "&", 8, kNoAttribute) \
71 TOK(kBIT_NOT, "~", 0, kNoAttribute) \ 71 TOK(kBIT_NOT, "~", 0, kNoAttribute) \
72 \ 72 \
73 /* Shift operators. */ \ 73 /* Shift operators. */ \
74 TOK(kSHL, "<<", 11, kNoAttribute) \ 74 TOK(kSHL, "<<", 11, kNoAttribute) \
75 TOK(kSHR, ">>", 11, kNoAttribute) \ 75 TOK(kSHR, ">>", 11, kNoAttribute) \
76 \ 76 \
77 /* Additive operators. */ \ 77 /* Additive operators. */ \
78 TOK(kADD, "+", 12, kNoAttribute) \ 78 TOK(kADD, "+", 12, kNoAttribute) \
79 TOK(kSUB, "-", 12, kNoAttribute) \ 79 TOK(kSUB, "-", 12, kNoAttribute) \
80 /* A 'plus' without a trailing whitespace (handle literals). */ \
81 TOK(kTIGHTADD, "+", 12, kNoAttribute) \
80 \ 82 \
81 /* Multiplicative operators */ \ 83 /* Multiplicative operators */ \
82 TOK(kMUL, "*", 13, kNoAttribute) \ 84 TOK(kMUL, "*", 13, kNoAttribute) \
83 TOK(kDIV, "/", 13, kNoAttribute) \ 85 TOK(kDIV, "/", 13, kNoAttribute) \
84 TOK(kTRUNCDIV, "~/", 13, kNoAttribute) \ 86 TOK(kTRUNCDIV, "~/", 13, kNoAttribute) \
85 TOK(kMOD, "%", 13, kNoAttribute) \ 87 TOK(kMOD, "%", 13, kNoAttribute) \
86 \ 88 \
87 TOK(kNOT, "!", 0, kNoAttribute) \ 89 TOK(kNOT, "!", 0, kNoAttribute) \
88 TOK(kCONDITIONAL, "?", 3, kNoAttribute) \ 90 TOK(kCONDITIONAL, "?", 3, kNoAttribute) \
89 \ 91 \
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 static const char* name_[kNumTokens]; 256 static const char* name_[kNumTokens];
255 static const char* tok_str_[kNumTokens]; 257 static const char* tok_str_[kNumTokens];
256 static const uint8_t precedence_[kNumTokens]; 258 static const uint8_t precedence_[kNumTokens];
257 static const Attribute attributes_[kNumTokens]; 259 static const Attribute attributes_[kNumTokens];
258 }; 260 };
259 261
260 262
261 } // namespace dart 263 } // namespace dart
262 264
263 #endif // VM_TOKEN_H_ 265 #endif // VM_TOKEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698