token.cc 793 Bytes
Newer Older
1
// Copyright 2006-2008 the V8 project authors. All rights reserved.
2 3
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
4

5
#include <stdint.h>
6
#include "src/token.h"
7

8 9
namespace v8 {
namespace internal {
10 11

#define T(name, string, precedence) #name,
12
const char* const Token::name_[NUM_TOKENS] = {
13
  TOKEN_LIST(T, T)
14 15 16 17 18
};
#undef T


#define T(name, string, precedence) string,
19
const char* const Token::string_[NUM_TOKENS] = {
20
  TOKEN_LIST(T, T)
21 22 23 24 25
};
#undef T


#define T(name, string, precedence) precedence,
26
const int8_t Token::precedence_[NUM_TOKENS] = {
27
  TOKEN_LIST(T, T)
28 29 30 31
};
#undef T


32 33 34
#define KT(a, b, c) 'T',
#define KK(a, b, c) 'K',
const char Token::token_type[] = {
35
  TOKEN_LIST(KT, KK)
36 37 38 39
};
#undef KT
#undef KK

40
} }  // namespace v8::internal