• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2021-2022 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 ASSEMBLER_DEFINE_H
17 #define ASSEMBLER_DEFINE_H
18 
19 /* Implementation-specific defines */
20 
21 constexpr char PARSE_COMMENT_MARKER = '#';
22 
23 constexpr char PARSE_AREA_MARKER = '.';
24 
25 #define PANDA_ASSEMBLER_TYPES(_) \
26     _("void", VOID)              \
27     _("u1", U1)                  \
28     _("u8", U8)                  \
29     _("i8", I8)                  \
30     _("u16", U16)                \
31     _("i16", I16)                \
32     _("u32", U32)                \
33     _("i32", I32)                \
34     _("u64", U64)                \
35     _("i64", I64)                \
36     _("f32", F32)                \
37     _("f64", F64)                \
38     _("any", TAGGED)
39 
40 #define KEYWORDS_LIST(_)     \
41     _(".catch", CATCH)       \
42     _(".catchall", CATCHALL) \
43     _(".language", LANG)     \
44     _(".function", FUN)      \
45     _(".record", REC)        \
46     _(".array", ARR)         \
47     _(".field", FLD)
48 
49 #endif  // ASSEMBLER_DEFINE_H
50