1 /* 2 * Copyright (c) 2021-2024 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 PANDA_ASSEMBLER_DEFINE_H 17 #define PANDA_ASSEMBLER_DEFINE_H 18 19 /* Implementation-specific defines */ 20 21 constexpr char PARSE_COMMENT_MARKER = '#'; 22 23 constexpr char PARSE_AREA_MARKER = '.'; 24 25 // CC-OFFNXT(G.PRE.06) solid logic 26 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 27 #define PANDA_ASSEMBLER_TYPES(_) \ 28 _("void", VOID) \ 29 _("u1", U1) \ 30 _("u8", U8) \ 31 _("i8", I8) \ 32 _("u16", U16) \ 33 _("i16", I16) \ 34 _("u32", U32) \ 35 _("i32", I32) \ 36 _("u64", U64) \ 37 _("i64", I64) \ 38 _("f32", F32) \ 39 _("f64", F64) \ 40 _("any", TAGGED) 41 42 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 43 #define KEYWORDS_LIST(_) \ 44 _(".catch", CATCH) \ 45 _(".catchall", CATCHALL) \ 46 _(".language", LANG) \ 47 _(".function", FUN) \ 48 _(".union_field", UNION) \ 49 _(".record", REC) \ 50 _(".array", ARR) \ 51 _(".field", FLD) 52 53 #endif // PANDA_ASSEMBLER_DEFINE_H 54