-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathtokens.h
32 lines (26 loc) · 1002 Bytes
/
tokens.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
/*****************************************************************************
*
* Define the token kind enum. Note that all entries from the keyword
* table are defined first, such that the first entry has the value 0.
*/
enum tokens
{
tkNone,
#define KEYWORD(tk,...) tk,
#define TOK_DCL(tk,...) tk,
#include "keywords.h"
tkLimKwd,
tkLastKwd = tkLimKwd - 1,
tkEOF, // end of source code
tkIntCon, // integer literal
tkFltCon, // floating literal
tkStrCon, // string literal
tkRegExp, // regular expression literal
tkBigIntCon, // bigint literal
tkLim
};