• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef MAPLE_IR_INCLUDE_TOKENS_H
17 #define MAPLE_IR_INCLUDE_TOKENS_H
18 
19 namespace maple {
20 enum TokenKind {
21     TK_invalid,
22 // keywords from this file
23 #define KEYWORD(STR) TK_##STR,
24 #include "keywords.def"
25 #undef KEYWORD
26     // non-keywords starting here
27     // constants
28     TK_intconst,
29     TK_floatconst,
30     TK_doubleconst,
31     // local name
32     TK_lname,
33     // global name
34     TK_gname,
35     // function name
36     TK_fname,
37     // pseudo register
38     TK_preg,
39     // special register
40     TK_specialreg,
41     // parent field
42     TK_prntfield,
43     // type parameter name
44     TK_typeparam,
45     // misc.
46     TK_newline,
47     TK_lparen,     // (
48     TK_rparen,     // )
49     TK_lbrace,     // {
50     TK_rbrace,     // }
51     TK_lbrack,     // [
52     TK_rbrack,     // ]
53     TK_langle,     // <
54     TK_rangle,     // >
55     TK_eqsign,     // =
56     TK_coma,       // ,
57     TK_dotdotdot,  // ...
58     TK_colon,      // :
59     TK_asterisk,   // *
60     TK_string,     // a literal string enclosed between "
61     TK_eof
62 };
63 }  // namespace maple
64 #endif  // MAPLE_IR_INCLUDE_TOKENS_H
65