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

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

Issue 2954713002: Fix precedence of assert keyword in VM parser (fixes #29990). (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 RUNTIME_VM_TOKEN_H_ 5 #ifndef RUNTIME_VM_TOKEN_H_
6 #define RUNTIME_VM_TOKEN_H_ 6 #define RUNTIME_VM_TOKEN_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 /* Support for optimized code */ \ 141 /* Support for optimized code */ \
142 TOK(kREM, "", 0, kNoAttribute) 142 TOK(kREM, "", 0, kNoAttribute)
143 143
144 // List of keywords. The list must be alphabetically ordered. The 144 // List of keywords. The list must be alphabetically ordered. The
145 // keyword recognition code depends on the ordering. 145 // keyword recognition code depends on the ordering.
146 // If you add a keyword at the beginning or end of this list, make sure 146 // If you add a keyword at the beginning or end of this list, make sure
147 // to update kFirstKeyword and kLastKeyword below. 147 // to update kFirstKeyword and kLastKeyword below.
148 #define DART_KEYWORD_LIST(KW) \ 148 #define DART_KEYWORD_LIST(KW) \
149 KW(kABSTRACT, "abstract", 0, kPseudoKeyword) /* == kFirstKeyword */ \ 149 KW(kABSTRACT, "abstract", 0, kPseudoKeyword) /* == kFirstKeyword */ \
150 KW(kAS, "as", 11, kPseudoKeyword) \ 150 KW(kAS, "as", 11, kPseudoKeyword) \
151 KW(kASSERT, "assert", 11, kKeyword) \ 151 KW(kASSERT, "assert", 0, kKeyword) \
152 KW(kBREAK, "break", 0, kKeyword) \ 152 KW(kBREAK, "break", 0, kKeyword) \
153 KW(kCASE, "case", 0, kKeyword) \ 153 KW(kCASE, "case", 0, kKeyword) \
154 KW(kCATCH, "catch", 0, kKeyword) \ 154 KW(kCATCH, "catch", 0, kKeyword) \
155 KW(kCLASS, "class", 0, kKeyword) \ 155 KW(kCLASS, "class", 0, kKeyword) \
156 KW(kCONST, "const", 0, kKeyword) \ 156 KW(kCONST, "const", 0, kKeyword) \
157 KW(kCONTINUE, "continue", 0, kKeyword) \ 157 KW(kCONTINUE, "continue", 0, kKeyword) \
158 KW(kCOVARIANT, "covariant", 0, kPseudoKeyword) \ 158 KW(kCOVARIANT, "covariant", 0, kPseudoKeyword) \
159 KW(kDEFAULT, "default", 0, kKeyword) \ 159 KW(kDEFAULT, "default", 0, kKeyword) \
160 KW(kDO, "do", 0, kKeyword) \ 160 KW(kDO, "do", 0, kKeyword) \
161 KW(kELSE, "else", 0, kKeyword) \ 161 KW(kELSE, "else", 0, kKeyword) \
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 private: 325 private:
326 static const char* name_[]; 326 static const char* name_[];
327 static const char* tok_str_[]; 327 static const char* tok_str_[];
328 static const uint8_t precedence_[]; 328 static const uint8_t precedence_[];
329 static const Attribute attributes_[]; 329 static const Attribute attributes_[];
330 }; 330 };
331 331
332 } // namespace dart 332 } // namespace dart
333 333
334 #endif // RUNTIME_VM_TOKEN_H_ 334 #endif // RUNTIME_VM_TOKEN_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698