blob: dbb49fd03d8bfdb5c58366832aa963dc7ef64380 [file] [log] [blame]
// Copyright 2020 The Pigweed Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
// AUTOGENERATED - DO NOT EDIT
//
// This file was generated by generate_argument_types_macro.py.
// To make changes, update the script and run it to generate new files.
#pragma once
// Macro for encoding tokenizer argument types into an 4-byte value.
//
// PW_TOKENIZER_ARG_TYPES could be implemented with recursive macro expansion,
// but that seems to compile a little slower. Instead, the full macro is
// generated with Python code. This file is best viewed with line wrapping
// disabled.
//
// These macros depend on macros in pw_tokenizer/internal/argument_types.h.
// clang-format off
#define _PW_TOKENIZER_TYPES_1(a1) (_PW_VARARGS_TYPE(a1) << 4 | 1)
#define _PW_TOKENIZER_TYPES_2(a1, a2) (_PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 2)
#define _PW_TOKENIZER_TYPES_3(a1, a2, a3) (_PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 3)
#define _PW_TOKENIZER_TYPES_4(a1, a2, a3, a4) (_PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 4)
#define _PW_TOKENIZER_TYPES_5(a1, a2, a3, a4, a5) (_PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 5)
#define _PW_TOKENIZER_TYPES_6(a1, a2, a3, a4, a5, a6) (_PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 6)
#define _PW_TOKENIZER_TYPES_7(a1, a2, a3, a4, a5, a6, a7) (_PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 7)
#define _PW_TOKENIZER_TYPES_8(a1, a2, a3, a4, a5, a6, a7, a8) (_PW_VARARGS_TYPE(a8) << 18 | _PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 8)
#define _PW_TOKENIZER_TYPES_9(a1, a2, a3, a4, a5, a6, a7, a8, a9) (_PW_VARARGS_TYPE(a9) << 20 | _PW_VARARGS_TYPE(a8) << 18 | _PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 9)
#define _PW_TOKENIZER_TYPES_10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) (_PW_VARARGS_TYPE(a10) << 22 | _PW_VARARGS_TYPE(a9) << 20 | _PW_VARARGS_TYPE(a8) << 18 | _PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 10)
#define _PW_TOKENIZER_TYPES_11(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) (_PW_VARARGS_TYPE(a11) << 24 | _PW_VARARGS_TYPE(a10) << 22 | _PW_VARARGS_TYPE(a9) << 20 | _PW_VARARGS_TYPE(a8) << 18 | _PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 11)
#define _PW_TOKENIZER_TYPES_12(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) (_PW_VARARGS_TYPE(a12) << 26 | _PW_VARARGS_TYPE(a11) << 24 | _PW_VARARGS_TYPE(a10) << 22 | _PW_VARARGS_TYPE(a9) << 20 | _PW_VARARGS_TYPE(a8) << 18 | _PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 12)
#define _PW_TOKENIZER_TYPES_13(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) (_PW_VARARGS_TYPE(a13) << 28 | _PW_VARARGS_TYPE(a12) << 26 | _PW_VARARGS_TYPE(a11) << 24 | _PW_VARARGS_TYPE(a10) << 22 | _PW_VARARGS_TYPE(a9) << 20 | _PW_VARARGS_TYPE(a8) << 18 | _PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 13)
#define _PW_TOKENIZER_TYPES_14(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) (_PW_VARARGS_TYPE(a14) << 30 | _PW_VARARGS_TYPE(a13) << 28 | _PW_VARARGS_TYPE(a12) << 26 | _PW_VARARGS_TYPE(a11) << 24 | _PW_VARARGS_TYPE(a10) << 22 | _PW_VARARGS_TYPE(a9) << 20 | _PW_VARARGS_TYPE(a8) << 18 | _PW_VARARGS_TYPE(a7) << 16 | _PW_VARARGS_TYPE(a6) << 14 | _PW_VARARGS_TYPE(a5) << 12 | _PW_VARARGS_TYPE(a4) << 10 | _PW_VARARGS_TYPE(a3) << 8 | _PW_VARARGS_TYPE(a2) << 6 | _PW_VARARGS_TYPE(a1) << 4 | 14)
// clang-format on