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 namespace dart { | 7 namespace dart { |
8 | 8 |
9 #define TOKEN_NAME(t, s, p, a) #t, | 9 #define TOKEN_NAME(t, s, p, a) #t, |
10 const char* Token::name_[kNumTokens] = { | 10 const char* Token::name_[] = { |
11 DART_TOKEN_LIST(TOKEN_NAME) | 11 DART_TOKEN_LIST(TOKEN_NAME) |
12 DART_KEYWORD_LIST(TOKEN_NAME) | 12 DART_KEYWORD_LIST(TOKEN_NAME) |
13 }; | 13 }; |
14 #undef TOKEN_NAME | 14 #undef TOKEN_NAME |
15 | 15 |
16 #define TOKEN_STRING(t, s, p, a) s, | 16 #define TOKEN_STRING(t, s, p, a) s, |
17 const char* Token::tok_str_[kNumTokens] = { | 17 const char* Token::tok_str_[] = { |
18 DART_TOKEN_LIST(TOKEN_STRING) | 18 DART_TOKEN_LIST(TOKEN_STRING) |
19 DART_KEYWORD_LIST(TOKEN_STRING) | 19 DART_KEYWORD_LIST(TOKEN_STRING) |
20 }; | 20 }; |
21 #undef TOKEN_STRING | 21 #undef TOKEN_STRING |
22 | 22 |
23 #define TOKEN_PRECEDENCE(t, s, p, a) p, | 23 #define TOKEN_PRECEDENCE(t, s, p, a) p, |
24 const uint8_t Token::precedence_[kNumTokens] = { | 24 const uint8_t Token::precedence_[] = { |
25 DART_TOKEN_LIST(TOKEN_PRECEDENCE) | 25 DART_TOKEN_LIST(TOKEN_PRECEDENCE) |
26 DART_KEYWORD_LIST(TOKEN_PRECEDENCE) | 26 DART_KEYWORD_LIST(TOKEN_PRECEDENCE) |
27 }; | 27 }; |
28 #undef TOKEN_PRECEDENCE | 28 #undef TOKEN_PRECEDENCE |
29 | 29 |
30 #define TOKEN_ATTRIBUTE(t, s, p, a) a, | 30 #define TOKEN_ATTRIBUTE(t, s, p, a) a, |
31 const Token::Attribute Token::attributes_[kNumTokens] = { | 31 const Token::Attribute Token::attributes_[] = { |
32 DART_TOKEN_LIST(TOKEN_ATTRIBUTE) | 32 DART_TOKEN_LIST(TOKEN_ATTRIBUTE) |
33 DART_KEYWORD_LIST(TOKEN_ATTRIBUTE) | 33 DART_KEYWORD_LIST(TOKEN_ATTRIBUTE) |
34 }; | 34 }; |
35 #undef TOKEN_ATTRIBUTE | 35 #undef TOKEN_ATTRIBUTE |
36 | 36 |
37 | 37 |
38 } // namespace dart | 38 } // namespace dart |
OLD | NEW |