From e361f440e8f915dcd521adbebe5aa697cfe96d6c Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Fri, 1 Sep 2023 06:27:11 +0000 Subject: [PATCH 1/6] Parser: Implement `AST` optimization pass `SingleNodePathFoldPass`. --- include/ast.h | 64 ++++++++++++++++++++++++++++++++++++++ include/token.h | 8 +++++ src/ast.cc | 41 ++++++++++++++++++++++++ src/constant_expression.cc | 12 +++++++ 4 files changed, 125 insertions(+) create mode 100644 src/ast.cc diff --git a/include/ast.h b/include/ast.h index 75d3c9c..318a985 100644 --- a/include/ast.h +++ b/include/ast.h @@ -23,6 +23,7 @@ #pragma once #include +#include #include "basic/map.h" #include "basic/vec.h" #include "token.h" @@ -99,6 +100,9 @@ class Tree { token::details::TokenKind token_kind_{token::details::TokenKind::unknown}; size_t len_{0}; explicit Node() = default; + [[nodiscard]] bool valid() const { + return start_ != nullptr && end_ != nullptr && len_ != 0; + } Node(const Line* line) : start_(line->start_), end_(line->end_), @@ -111,11 +115,71 @@ class Tree { } }; Tree() = default; + Tree(Node&& n) : root_(std::move(n)) {} explicit Tree(const Line* line) : root_(Node(line)) {} [[nodiscard]] const Node& root() const { return root_; } + [[nodiscard]] basic::Vector<4, const token::Token*> leafs() const { + using out_type = basic::Vector<4, const token::Token*>; + out_type out; + [](const Node& root, out_type& o) -> void { + auto visit_impl = [](const Node& root, out_type& o, + const auto& func) -> void { + if (root.children_.empty() && root.len_ == 1) { + o.append(root.start_); + return; + } + + for (const auto& child : root.children_) { + func(child, o, func); + } + }; + + return visit_impl(root, o, visit_impl); + }(root_, out); + + return out; + } private: Node root_; }; +namespace opt { + +class Pass { + + public: + virtual Tree operator()(const Tree& t) = 0; +}; + +class SingleNodePathFoldPass : public Pass { + public: + Tree operator()(const Tree& in) override { + return Tree([](const Tree::Node& root) -> Tree::Node { + auto visit_impl = [](const Tree::Node& root, + const auto& func) -> Tree::Node { + if (root.children_.empty()) { + return root; + } + + if (root.children_.size() == 1) { + return func(root.children_[0], func); + } + Tree::Node out = root; + out.children_.clear(); + for (const auto& child : root.children_) { + out.children_.push_back(func(child, func)); + } + return out; + }; + + return visit_impl(root, visit_impl); + }(in.root())); + } +}; + +Tree run(const Tree& in); + +} // namespace opt + } // namespace lps::parser::details diff --git a/include/token.h b/include/token.h index 840b244..4e6ef11 100644 --- a/include/token.h +++ b/include/token.h @@ -203,6 +203,14 @@ struct Token { return basic::StringRef(char_store_->data(), offset()); } + [[nodiscard]] bool is_number_literal() const { + return kind_ == details::TokenKind::floating_point_literal || + kind_ == details::TokenKind::integer_literal || + kind_ == details::TokenKind::binary_literal || + kind_ == details::TokenKind::decimal_literal || + kind_ == details::TokenKind::hexadecimal_literal; + } + [[nodiscard]] const archived_type* next() const { return next_token_; } [[nodiscard]] const archived_type* last() const { return last_token_; } diff --git a/src/ast.cc b/src/ast.cc new file mode 100644 index 0000000..b9c2869 --- /dev/null +++ b/src/ast.cc @@ -0,0 +1,41 @@ +/* +* MIT License +* Copyright (c) 2023 mxlol233 (mxlol233@outlook.com) + +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: + +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. + +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +*LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE. +*/ + +#include "ast.h" +#include + +namespace lps::parser::details::opt { + +static SingleNodePathFoldPass single_node_path_fold_pass; + +static std::vector passes = {&single_node_path_fold_pass}; + +Tree run(const Tree& in) { + Tree out = in; + for (auto* p : passes) { + out = p->operator()(out); + } + return out; +} + +} // namespace lps::parser::details::opt diff --git a/src/constant_expression.cc b/src/constant_expression.cc index bbce3b4..7685137 100644 --- a/src/constant_expression.cc +++ b/src/constant_expression.cc @@ -58,6 +58,18 @@ bool Preprocessing::lex_conditional_expression( return false; } auto tree = context.l2t(line); + + // run optimization passes + tree = parser::details::opt::run(tree); + + // now, check whether all the leaf tokens are constant + auto leafs = tree.leafs(); + for (const auto& leaf : leafs) { + if (!leaf->is_number_literal()) { + return false; + } + } + int dummy = -1; } From 541f1d7db9a0506f93f093207d2f4e38ec211faf Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Fri, 1 Sep 2023 07:41:57 +0000 Subject: [PATCH 2/6] Parser: Fix error children nodes in `recursive_function`. --- gram/create_parse_functions.py | 10 ++++++++-- include/parse_function/recursive_function_impl.h | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gram/create_parse_functions.py b/gram/create_parse_functions.py index 647cbfe..3d8eb98 100644 --- a/gram/create_parse_functions.py +++ b/gram/create_parse_functions.py @@ -262,8 +262,14 @@ def create_parallel_function(serial_idx, key, v): this->calling_depth(), Line::segments_type() }}; - line.segments_.append(non_recursive_output.line_); - line.segments_.append(output.line_); + lps_assert({tag_name}, !non_recursive_output.line_->segments_.empty()); + for(const auto&l : non_recursive_output.line_->segments_){{ + line.segments_.append(l); + }} + lps_assert({tag_name}, !output.line_->segments_.empty()); + for(const auto&l : output.line_->segments_){{ + line.segments_.append(l); + }} output.line_ = context_->paint(line); for (const auto& a : recursive_funcs_1.valid_outputs()) {{ this->context_->save(this->cur_token(), a.cur_token_, this->kind(), diff --git a/include/parse_function/recursive_function_impl.h b/include/parse_function/recursive_function_impl.h index 96aacaa..2911461 100644 --- a/include/parse_function/recursive_function_impl.h +++ b/include/parse_function/recursive_function_impl.h @@ -67,7 +67,10 @@ RecursiveParseFunctions::operator()() { } valid_idx = this->valid_outputs_.size() - 1; - saved_lines.append(tmp_output.line_); + lps_assert(kName_, !tmp_output.line_->segments_.empty()); + for (const auto& l : tmp_output.line_->segments_) { + saved_lines.append(l); + } } while (true); if (!this->valid_outputs_.empty()) { @@ -164,7 +167,10 @@ void RecursiveParseFunctions::execute( for (auto& a : local_saved_outputs) { Line::segments_type tmp_saved_lines(saved_lines); - tmp_saved_lines.append(a.line_); + lps_assert(kName_, !a.line_->segments_.empty()); + for (const auto& l : a.line_->segments_) { + tmp_saved_lines.append(l); + } const auto* p_start = &context_->token_lists().at(this->cur_token()); const auto* p_end = a.line_->end_; Line line{ From 4aa1150a88d037a68cb239797c24808a7dc8dd9d Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Tue, 5 Sep 2023 08:56:40 +0000 Subject: [PATCH 3/6] [WIP] Sema: design semantics basic elements. --- include/ast.h | 1 + include/sema.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/include/ast.h b/include/ast.h index 318a985..b76afd3 100644 --- a/include/ast.h +++ b/include/ast.h @@ -24,6 +24,7 @@ #include #include +#include "basic/apn.h" #include "basic/map.h" #include "basic/vec.h" #include "token.h" diff --git a/include/sema.h b/include/sema.h index 05a23b8..27f9e64 100644 --- a/include/sema.h +++ b/include/sema.h @@ -22,6 +22,8 @@ */ #pragma once +#include +#include "basic/exception.h" #include "basic/mem.h" #include "parser.h" #include "token.h" @@ -36,8 +38,17 @@ class Unit { protected: const parser::details::Tree::Node* gram_node_{nullptr}; + + private: + constexpr static const char* kTag = "lps::sema::details::Unit"; }; +class TranslationUnit; +class Expression; +class AssignmentExpression; +class LogicalOrExpression; +class InitializerClause; + // A program consists of one or more translation units linked together. // A `translation unit` consists of a sequence of declarations. // A name is said to have linkage when it can denote the same object, @@ -47,7 +58,43 @@ class Unit { class TranslationUnit : public Unit { public: - void build() override; + void build() override { LPS_ERROR(kTag, "not implemented"); } + + private: + constexpr static const char* kTag = "lps::sema::details::TranslationUnit"; +}; + +// A pair of expressions separated by a comma is evaluated left-to-right; +// the left expression is a `discarded-value expression`. The left expression +// is sequenced before the right expression. +// The type and value of the result are the type and value of the right operand; +// the result is of the same value category as its right operand, +// and is a bit-field if its right operand is a bit-field. +class Expression : public Unit { + + public: + void build() override { LPS_ERROR(kTag, "not implemented"); } + virtual void constant_evaluate() { LPS_ERROR(kTag, "not implemented"); } + + private: + constexpr static const char* kTag = "lps::sema::details::Expression"; + + basic::Vector<2, std::shared_ptr> assignment_exprs_; +}; + +class AssignmentExpression : public Expression { + + public: + void build() override { LPS_ERROR(kTag, "not implemented"); } + void constant_evaluate() override { LPS_ERROR(kTag, "not implemented"); } + + private: + constexpr static const char* kTag = + "lps::sema::details::AssignmentExpression"; + + std::shared_ptr logical_or_expr_{nullptr}; + std::shared_ptr init_clause_{nullptr}; + const char* assignment_op_{nullptr}; }; } // namespace details From 6920c8bbdc024dc347c044b165ff35c49f80c972 Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Thu, 7 Sep 2023 08:29:46 +0000 Subject: [PATCH 4/6] [WIP] Sema: design semantic basic elements, part 2. --- gram/create_parse_functions.py | 44 +-------- gram/create_semantic_unit.py | 151 +++++++++++++++++++++++++++++++ gram/util.py | 74 +++++++++++++++ include/sema.h | 64 +++++-------- include/semantic_unit/.gitignore | 0 include/semantic_unit/unit.h | 86 ++++++++++++++++++ 6 files changed, 334 insertions(+), 85 deletions(-) create mode 100644 gram/create_semantic_unit.py create mode 100644 gram/util.py create mode 100644 include/semantic_unit/.gitignore create mode 100644 include/semantic_unit/unit.h diff --git a/gram/create_parse_functions.py b/gram/create_parse_functions.py index 3d8eb98..79b90a1 100644 --- a/gram/create_parse_functions.py +++ b/gram/create_parse_functions.py @@ -27,10 +27,7 @@ import sys import os - -def camel_case(s): - s = sub(r"(_|-)+", " ", s).title().replace(" ", "") - return ''.join([s[0].upper(), s[1:]]) +from util import camel_case, remove_opt, write_to_file diag_kinds = {} @@ -291,45 +288,6 @@ def create_parallel_function(serial_idx, key, v): return content_op, "", content_type, "", flg -def remove_opt(s_: str): - s = s_ - if s_.endswith("[opt]"): - s = s_.replace("[opt]", "") - return s, s != s_ - - -def write_to_file(src_file_name, the_contents, title, end="}"): - with open(src_file_name, "w") as f: - f.write(title + the_contents + end) - encoding_py3 = {} - if sys.version_info[0] >= 3: - encoding_py3['encoding'] = 'utf-8' - - try: - invocation = ["clang-format", src_file_name, - "-i", f'--style=file:{os.path.dirname(__file__)}/../.clang-format'] - - proc = subprocess.Popen( - invocation, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - universal_newlines=True, - **encoding_py3) - except OSError as exc: - print("error.") - assert (False) - proc_stdout = proc.stdout - proc_stderr = proc.stderr - outs = list(proc_stdout.readlines()) - errs = list(proc_stderr.readlines()) - proc.wait() - - if proc.returncode: - print("error.", subprocess.list2cmdline( - invocation), proc.returncode, errs) - assert (False) - - if __name__ == "__main__": args = sys.argv[1:] all_content_out_path = args[0] diff --git a/gram/create_semantic_unit.py b/gram/create_semantic_unit.py new file mode 100644 index 0000000..a8f19ae --- /dev/null +++ b/gram/create_semantic_unit.py @@ -0,0 +1,151 @@ +# +# MIT License +# Copyright (c) 2023 mxlol233 (mxlol233@outlook.com) + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +from config import gram_tree, sp_tokens +from re import sub +import subprocess +import sys +import os + +from util import camel_case, remove_opt, write_to_file, underline_case + + +if __name__ == "__main__": + args = sys.argv[1:] + unit_h_out_path = args[0] + + unit_h_out_template = """/* +* MIT License +* Copyright (c) 2023 mxlol233 (mxlol233@outlook.com) + +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: + +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. + +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +*LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE. +*/ +#pragma once + +#include "sema.h" + +namespace lps::sema::details { + +__CONTENT_UNIT_DECL__ + +__CONTENT_UNIT_DEF__ + +} + """ + + unit_def_template = """ +class __NAME__ : public Unit { + + public: + void build() override { LPS_ERROR(kTag, "not implemented"); } +__TYPE__ + private: + constexpr static const char* kTag = "lps::sema::details::__NAME__"; +__MEMBER__ +}; + """ + + str_unit_decl = "" + str_unit_def_all = "" + + for k, v in gram_tree.items(): + name = camel_case(k) + + + + str_type = "" + str_member = "" + + if len(v) == 0: + # not valid semantic unit + pass + elif isinstance(v[0], str): + # only one serial + str_type += f"""struct Type{{""" + str_type += "\n" + for idx, s_ in enumerate(v): + assert isinstance(s_, str) + s, is_opt = remove_opt(s_) + if s.startswith('`'): + + str_type += f""" std::unique_ptr s{idx}_{{nullptr}};""" + + + else: + k_name = camel_case(s) + k_underline_name = underline_case(s) + str_type += f""" std::unique_ptr<{k_name}> s{idx}_{{nullptr}};""" + str_type += "\n" + str_type += f"""}};""" + str_member += f"""Type ele_; """ + else: + str_member = f"""union {{""" + for ii,tv in enumerate(v): + str_type += f"""struct Type{ii}{{""" + str_type += "\n" + for idx, s_ in enumerate(tv): + assert isinstance(s_, str) + s, is_opt = remove_opt(s_) + if s.startswith('`'): + + str_type += f""" std::unique_ptr s{idx}_{{nullptr}};""" + + + else: + k_name = camel_case(s) + k_underline_name = underline_case(s) + str_type += f""" std::unique_ptr<{k_name}> s{idx}_{{nullptr}};""" + str_type += "\n" + str_type += f"""}};""" + str_member += f"""Type{ii} v{ii}_; """ + + str_member += f"""}} ele_;""" + + str_unit_decl += f"""class {name};""" + str_unit_decl += "\n" + str_unit_def = unit_def_template.replace("__TYPE__", str_type) + str_unit_def = str_unit_def.replace("__MEMBER__", str_member) + str_unit_def = str_unit_def.replace("__NAME__", name) + str_unit_def_all += str_unit_def + + contents = unit_h_out_template.replace("__CONTENT_UNIT_DECL__", str_unit_decl) + contents = contents.replace("__CONTENT_UNIT_DEF__", str_unit_def_all) + + + write_to_file(unit_h_out_path, contents, "\n", "\n") diff --git a/gram/util.py b/gram/util.py new file mode 100644 index 0000000..5089405 --- /dev/null +++ b/gram/util.py @@ -0,0 +1,74 @@ +# +# MIT License +# Copyright (c) 2023 mxlol233 (mxlol233@outlook.com) + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +from re import sub +import subprocess +import sys +import os + + +def camel_case(s): + s = sub(r"(_|-)+", " ", s).title().replace(" ", "") + return ''.join([s[0].upper(), s[1:]]) + +def underline_case(s): + s = s.replace("-", "_").replace(" ", "_") + return ''.join([s[0].lower(), s[1:]]) + "_" + +def remove_opt(s_: str): + s = s_ + if s_.endswith("[opt]"): + s = s_.replace("[opt]", "") + return s, s != s_ + + +def write_to_file(src_file_name, the_contents, title, end="}"): + with open(src_file_name, "w") as f: + f.write(title + the_contents + end) + encoding_py3 = {} + if sys.version_info[0] >= 3: + encoding_py3['encoding'] = 'utf-8' + + try: + invocation = ["clang-format", src_file_name, + "-i", f'--style=file:{os.path.dirname(__file__)}/../.clang-format'] + + proc = subprocess.Popen( + invocation, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True, + **encoding_py3) + except OSError as _: + print("error.") + assert (False) + proc_stdout = proc.stdout + proc_stderr = proc.stderr + outs = list(proc_stdout.readlines()) + errs = list(proc_stderr.readlines()) + proc.wait() + + if proc.returncode: + print("error.", subprocess.list2cmdline( + invocation), proc.returncode, errs) + assert (False) diff --git a/include/sema.h b/include/sema.h index 27f9e64..6816412 100644 --- a/include/sema.h +++ b/include/sema.h @@ -35,66 +35,46 @@ namespace details { class Unit { public: virtual void build() = 0; + [[nodiscard]] parser::details::ParseFunctionKind kind() const { + return kind_; + } + + [[nodiscard]] token::details::TokenKind token_kind() const { + return token_kind_; + } protected: const parser::details::Tree::Node* gram_node_{nullptr}; + parser::details::ParseFunctionKind kind_{ + parser::details::ParseFunctionKind::kUnknown}; + token::details::TokenKind token_kind_{token::details::TokenKind::unknown}; private: constexpr static const char* kTag = "lps::sema::details::Unit"; }; -class TranslationUnit; -class Expression; -class AssignmentExpression; -class LogicalOrExpression; -class InitializerClause; - -// A program consists of one or more translation units linked together. -// A `translation unit` consists of a sequence of declarations. -// A name is said to have linkage when it can denote the same object, -// reference, function, type, template, namespace or value as a name -// introduced by a declaration in another scope: +class Symbol { -class TranslationUnit : public Unit { - - public: - void build() override { LPS_ERROR(kTag, "not implemented"); } + protected: + const token::Token* token_{nullptr}; private: - constexpr static const char* kTag = "lps::sema::details::TranslationUnit"; + constexpr static const char* kTag = "lps::sema::details::Symbol"; }; -// A pair of expressions separated by a comma is evaluated left-to-right; -// the left expression is a `discarded-value expression`. The left expression -// is sequenced before the right expression. -// The type and value of the result are the type and value of the right operand; -// the result is of the same value category as its right operand, -// and is a bit-field if its right operand is a bit-field. -class Expression : public Unit { - - public: - void build() override { LPS_ERROR(kTag, "not implemented"); } - virtual void constant_evaluate() { LPS_ERROR(kTag, "not implemented"); } - +class Variable : public Symbol { private: - constexpr static const char* kTag = "lps::sema::details::Expression"; - - basic::Vector<2, std::shared_ptr> assignment_exprs_; + constexpr static const char* kTag = "lps::sema::details::Variable"; }; -class AssignmentExpression : public Expression { - - public: - void build() override { LPS_ERROR(kTag, "not implemented"); } - void constant_evaluate() override { LPS_ERROR(kTag, "not implemented"); } - +class Literal : public Symbol { private: - constexpr static const char* kTag = - "lps::sema::details::AssignmentExpression"; + constexpr static const char* kTag = "lps::sema::details::Literal"; +}; - std::shared_ptr logical_or_expr_{nullptr}; - std::shared_ptr init_clause_{nullptr}; - const char* assignment_op_{nullptr}; +class Operator : public Symbol { + private: + constexpr static const char* kTag = "lps::sema::details::Operator"; }; } // namespace details diff --git a/include/semantic_unit/.gitignore b/include/semantic_unit/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/include/semantic_unit/unit.h b/include/semantic_unit/unit.h new file mode 100644 index 0000000..b6a985f --- /dev/null +++ b/include/semantic_unit/unit.h @@ -0,0 +1,86 @@ +/* +* MIT License +* Copyright (c) 2023 mxlol233 (mxlol233@outlook.com) + +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: + +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. + +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +*LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE. +*/ +#pragma once + +#include "sema.h" + +namespace lps::sema::details { + +class TranslationUnit; +class Expression; +class AssignmentExpression; +class LogicalOrExpression; +class InitializerClause; + +// A program consists of one or more translation units linked together. +// A `translation unit` consists of a sequence of declarations. +// A name is said to have linkage when it can denote the same object, +// reference, function, type, template, namespace or value as a name +// introduced by a declaration in another scope: +class TranslationUnit : public Unit { + + public: + void build() override { LPS_ERROR(kTag, "not implemented"); } + + private: + constexpr static const char* kTag = "lps::sema::details::TranslationUnit"; +}; + +// A pair of expressions separated by a comma is evaluated left-to-right; +// the left expression is a `discarded-value expression`. The left expression +// is sequenced before the right expression. +// The type and value of the result are the type and value of the right operand; +// the result is of the same value category as its right operand, +// and is a bit-field if its right operand is a bit-field. +class Expression : public Unit { + + public: + void build() override { LPS_ERROR(kTag, "not implemented"); } + virtual void constant_evaluate() { LPS_ERROR(kTag, "not implemented"); } + + private: + constexpr static const char* kTag = "lps::sema::details::Expression"; + + basic::Vector<2, std::shared_ptr> assignment_exprs_; +}; + +class AssignmentExpression : public Expression { + + public: + void build() override { LPS_ERROR(kTag, "not implemented"); } + void constant_evaluate() override { LPS_ERROR(kTag, "not implemented"); } + +struct Type0{ + std::shared_ptr logical_or_expr_{nullptr}; +}; + + private: + constexpr static const char* kTag = + "lps::sema::details::AssignmentExpression"; + + std::shared_ptr logical_or_expr_{nullptr}; + std::shared_ptr init_clause_{nullptr}; + const char* assignment_op_{nullptr}; +}; + +} // namespace lps::sema::details From db25eec5bcf8f2af72e2b262d5826c863b29c78d Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Tue, 12 Sep 2023 03:18:50 +0000 Subject: [PATCH 5/6] [WIP] Sema: design semantic basic elements, part 3. --- include/sema.h | 45 ++- src/sema.cc | 919 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 963 insertions(+), 1 deletion(-) create mode 100644 src/sema.cc diff --git a/include/sema.h b/include/sema.h index 6816412..8f0c64a 100644 --- a/include/sema.h +++ b/include/sema.h @@ -23,8 +23,10 @@ #pragma once #include +#include "ast.h" #include "basic/exception.h" #include "basic/mem.h" +#include "basic/vec.h" #include "parser.h" #include "token.h" @@ -53,7 +55,18 @@ class Unit { constexpr static const char* kTag = "lps::sema::details::Unit"; }; -class Symbol { +class HasElements { + protected: + basic::Vector<2, std::unique_ptr> elements_; +}; + +class Symbol : public Unit { + public: + void build() override {} + explicit Symbol(const token::Token* t) : token_(t) { + lps_assert(kTag, t->kind() != token::details::TokenKind::unknown); + this->token_kind_ = t->kind(); + } protected: const token::Token* token_{nullptr}; @@ -63,19 +76,49 @@ class Symbol { }; class Variable : public Symbol { + public: + explicit Variable(const token::Token* t) : Symbol(t) {} + private: constexpr static const char* kTag = "lps::sema::details::Variable"; }; class Literal : public Symbol { + public: + explicit Literal(const token::Token* t) : Symbol(t) {} + private: constexpr static const char* kTag = "lps::sema::details::Literal"; }; class Operator : public Symbol { + public: + explicit Operator(const token::Token* t) : Symbol(t) {} + private: constexpr static const char* kTag = "lps::sema::details::Operator"; }; +class KeyWord : public Symbol { + public: + explicit KeyWord(const token::Token* t) : Symbol(t) {} + + private: + constexpr static const char* kTag = "lps::sema::details::KeyWord"; +}; + } // namespace details + +class Factory { + + public: + static std::unique_ptr create( + const parser::details::Tree::Node& node); + + private: + static std::unique_ptr create_by_token( + const parser::details::Tree::Node& node); + constexpr static const char* kTag = "lps::sema:Factory"; +}; + } // namespace lps::sema diff --git a/src/sema.cc b/src/sema.cc new file mode 100644 index 0000000..be7f4f2 --- /dev/null +++ b/src/sema.cc @@ -0,0 +1,919 @@ +/* +* MIT License +* Copyright (c) 2023 mxlol233 (mxlol233@outlook.com) + +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: + +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. + +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +*LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE. +*/ + +#include "sema.h" +#include +#include "basic/exception.h" +#include "basic/vec.h" +#include "token.h" + +namespace lps::sema { + +std::unique_ptr Factory::create( + const parser::details::Tree::Node& node) { + + lps_assert(kTag, node.valid()); + + if (node.kind_ == parser::details::ParseFunctionKind::kUnknown) { + return create_by_token(node); + } + + basic::Vector<2, std::unique_ptr> elements( + node.children_.size(), nullptr); + int32_t idx = 0; + for (const auto& child : node.children_) { + elements[idx++] = std::move(create(node)); + } + + switch (node.kind_) { + case parser::details::ParseFunctionKind::kLogicalAndExpression: { + + break; + } + + case parser::details::ParseFunctionKind::kUnknown: + case parser::details::ParseFunctionKind::kExpectedToken: + case parser::details::ParseFunctionKind::kTranslationUnit: + case parser::details::ParseFunctionKind::kPrimaryExpression: + case parser::details::ParseFunctionKind::kIdExpression: + case parser::details::ParseFunctionKind::kUnqualifiedId: + case parser::details::ParseFunctionKind::kQualifiedId: + case parser::details::ParseFunctionKind::kNestedNameSpecifier: + case parser::details::ParseFunctionKind::kLambdaExpression: + case parser::details::ParseFunctionKind::kLambdaIntroducer: + case parser::details::ParseFunctionKind::kLambdaDeclarator: + case parser::details::ParseFunctionKind::kLambdaCapture: + case parser::details::ParseFunctionKind::kCaptureDefault: + case parser::details::ParseFunctionKind::kCaptureList: + case parser::details::ParseFunctionKind::kCapture: + case parser::details::ParseFunctionKind::kSimpleCapture: + case parser::details::ParseFunctionKind::kInitCapture: + case parser::details::ParseFunctionKind::kFoldExpression: + case parser::details::ParseFunctionKind::kFoldOperator: + case parser::details::ParseFunctionKind::kRequiresExpression: + case parser::details::ParseFunctionKind::kRequirementParameterList: + case parser::details::ParseFunctionKind::kRequirementBody: + case parser::details::ParseFunctionKind::kRequirementSeq: + case parser::details::ParseFunctionKind::kRequirement: + case parser::details::ParseFunctionKind::kSimpleRequirement: + case parser::details::ParseFunctionKind::kTypeRequirement: + case parser::details::ParseFunctionKind::kCompoundRequirement: + case parser::details::ParseFunctionKind::kReturnTypeRequirement: + case parser::details::ParseFunctionKind::kNestedRequirement: + case parser::details::ParseFunctionKind::kPostfixExpression: + case parser::details::ParseFunctionKind::kExpressionList: + case parser::details::ParseFunctionKind::kUnaryExpression: + case parser::details::ParseFunctionKind::kUnaryOperator: + case parser::details::ParseFunctionKind::kAwaitExpression: + case parser::details::ParseFunctionKind::kNoexceptExpression: + case parser::details::ParseFunctionKind::kNewExpression: + case parser::details::ParseFunctionKind::kNewPlacement: + case parser::details::ParseFunctionKind::kNewTypeId: + case parser::details::ParseFunctionKind::kNewDeclarator: + case parser::details::ParseFunctionKind::kNoptrNewDeclarator: + case parser::details::ParseFunctionKind::kNewInitializer: + case parser::details::ParseFunctionKind::kDeleteExpression: + case parser::details::ParseFunctionKind::kCastExpression: + case parser::details::ParseFunctionKind::kPmExpression: + case parser::details::ParseFunctionKind::kMultiplicativeExpression: + case parser::details::ParseFunctionKind::kAdditiveExpression: + case parser::details::ParseFunctionKind::kShiftExpression: + case parser::details::ParseFunctionKind::kCompareExpression: + case parser::details::ParseFunctionKind::kRelationalExpression: + case parser::details::ParseFunctionKind::kEqualityExpression: + case parser::details::ParseFunctionKind::kAndExpression: + case parser::details::ParseFunctionKind::kExclusiveOrExpression: + case parser::details::ParseFunctionKind::kInclusiveOrExpression: + case parser::details::ParseFunctionKind::kLogicalOrExpression: + case parser::details::ParseFunctionKind::kConditionalExpression: + case parser::details::ParseFunctionKind::kYieldExpression: + case parser::details::ParseFunctionKind::kThrowExpression: + case parser::details::ParseFunctionKind::kAssignmentExpression: + case parser::details::ParseFunctionKind::kAssignmentOperator: + case parser::details::ParseFunctionKind::kExpression: + case parser::details::ParseFunctionKind::kConstantExpression: + case parser::details::ParseFunctionKind::kStatement: + case parser::details::ParseFunctionKind::kInitStatement: + case parser::details::ParseFunctionKind::kCondition: + case parser::details::ParseFunctionKind::kLabeledStatement: + case parser::details::ParseFunctionKind::kExpressionStatement: + case parser::details::ParseFunctionKind::kCompoundStatement: + case parser::details::ParseFunctionKind::kStatementSeq: + case parser::details::ParseFunctionKind::kSelectionStatement: + case parser::details::ParseFunctionKind::kIterationStatement: + case parser::details::ParseFunctionKind::kForRangeDeclaration: + case parser::details::ParseFunctionKind::kForRangeInitializer: + case parser::details::ParseFunctionKind::kJumpStatement: + case parser::details::ParseFunctionKind::kCoroutineReturnStatement: + case parser::details::ParseFunctionKind::kDeclarationStatement: + case parser::details::ParseFunctionKind::kDeclarationSeq: + case parser::details::ParseFunctionKind::kDeclaration: + case parser::details::ParseFunctionKind::kBlockDeclaration: + case parser::details::ParseFunctionKind::kNodeclspecFunctionDeclaration: + case parser::details::ParseFunctionKind::kAliasDeclaration: + case parser::details::ParseFunctionKind::kSimpleDeclaration: + case parser::details::ParseFunctionKind::kStaticAssertDeclaration: + case parser::details::ParseFunctionKind::kEmptyDeclaration: + case parser::details::ParseFunctionKind::kAttributeDeclaration: + case parser::details::ParseFunctionKind::kDeclSpecifier: + case parser::details::ParseFunctionKind::kDeclSpecifierSeq: + case parser::details::ParseFunctionKind::kStorageClassSpecifier: + case parser::details::ParseFunctionKind::kFunctionSpecifier: + case parser::details::ParseFunctionKind::kExplicitSpecifier: + case parser::details::ParseFunctionKind::kTypedefName: + case parser::details::ParseFunctionKind::kTypeSpecifier: + case parser::details::ParseFunctionKind::kTypeSpecifierSeq: + case parser::details::ParseFunctionKind::kDefiningTypeSpecifier: + case parser::details::ParseFunctionKind::kDefiningTypeSpecifierSeq: + case parser::details::ParseFunctionKind::kSimpleTypeSpecifier: + case parser::details::ParseFunctionKind::kTypeName: + case parser::details::ParseFunctionKind::kElaboratedTypeSpecifier: + case parser::details::ParseFunctionKind::kElaboratedEnumSpecifier: + case parser::details::ParseFunctionKind::kDecltypeSpecifier: + case parser::details::ParseFunctionKind::kPlaceholderTypeSpecifier: + case parser::details::ParseFunctionKind::kInitDeclaratorList: + case parser::details::ParseFunctionKind::kInitDeclarator: + case parser::details::ParseFunctionKind::kDeclarator: + case parser::details::ParseFunctionKind::kPtrDeclarator: + case parser::details::ParseFunctionKind::kNoptrDeclarator: + case parser::details::ParseFunctionKind::kParametersAndQualifiers: + case parser::details::ParseFunctionKind::kTrailingReturnType: + case parser::details::ParseFunctionKind::kPtrOperator: + case parser::details::ParseFunctionKind::kCvQualifierSeq: + case parser::details::ParseFunctionKind::kCvQualifier: + case parser::details::ParseFunctionKind::kRefQualifier: + case parser::details::ParseFunctionKind::kDeclaratorId: + case parser::details::ParseFunctionKind::kTypeId: + case parser::details::ParseFunctionKind::kDefiningTypeId: + case parser::details::ParseFunctionKind::kAbstractDeclarator: + case parser::details::ParseFunctionKind::kPtrAbstractDeclarator: + case parser::details::ParseFunctionKind::kNoptrAbstractDeclarator: + case parser::details::ParseFunctionKind::kAbstractPackDeclarator: + case parser::details::ParseFunctionKind::kNoptrAbstractPackDeclarator: + case parser::details::ParseFunctionKind::kParameterDeclarationClause: + case parser::details::ParseFunctionKind::kParameterDeclarationList: + case parser::details::ParseFunctionKind::kParameterDeclaration: + case parser::details::ParseFunctionKind::kInitializer: + case parser::details::ParseFunctionKind::kBraceOrEqualInitializer: + case parser::details::ParseFunctionKind::kInitializerClause: + case parser::details::ParseFunctionKind::kBracedInitList: + case parser::details::ParseFunctionKind::kInitializerList: + case parser::details::ParseFunctionKind::kDesignatedInitializerList: + case parser::details::ParseFunctionKind::kDesignatedInitializerClause: + case parser::details::ParseFunctionKind::kDesignator: + case parser::details::ParseFunctionKind::kExprOrBracedInitList: + case parser::details::ParseFunctionKind::kFunctionDefinition: + case parser::details::ParseFunctionKind::kFunctionBody: + case parser::details::ParseFunctionKind::kEnumName: + case parser::details::ParseFunctionKind::kEnumSpecifier: + case parser::details::ParseFunctionKind::kEnumHead: + case parser::details::ParseFunctionKind::kEnumHeadName: + case parser::details::ParseFunctionKind::kOpaqueEnumDeclaration: + case parser::details::ParseFunctionKind::kEnumKey: + case parser::details::ParseFunctionKind::kEnumBase: + case parser::details::ParseFunctionKind::kEnumeratorList: + case parser::details::ParseFunctionKind::kEnumeratorDefinition: + case parser::details::ParseFunctionKind::kEnumerator: + case parser::details::ParseFunctionKind::kUsingEnumDeclaration: + case parser::details::ParseFunctionKind::kNamespaceName: + case parser::details::ParseFunctionKind::kNamespaceDefinition: + case parser::details::ParseFunctionKind::kNamedNamespaceDefinition: + case parser::details::ParseFunctionKind::kUnnamedNamespaceDefinition: + case parser::details::ParseFunctionKind::kNestedNamespaceDefinition: + case parser::details::ParseFunctionKind::kEnclosingNamespaceSpecifier: + case parser::details::ParseFunctionKind::kNamespaceBody: + case parser::details::ParseFunctionKind::kNamespaceAlias: + case parser::details::ParseFunctionKind::kNamespaceAliasDefinition: + case parser::details::ParseFunctionKind::kQualifiedNamespaceSpecifier: + case parser::details::ParseFunctionKind::kUsingDirective: + case parser::details::ParseFunctionKind::kUsingDeclaration: + case parser::details::ParseFunctionKind::kUsingDeclaratorList: + case parser::details::ParseFunctionKind::kUsingDeclarator: + case parser::details::ParseFunctionKind::kAsmDeclaration: + case parser::details::ParseFunctionKind::kLinkageSpecification: + case parser::details::ParseFunctionKind::kAttributeSpecifierSeq: + case parser::details::ParseFunctionKind::kAttributeSpecifier: + case parser::details::ParseFunctionKind::kAlignmentSpecifier: + case parser::details::ParseFunctionKind::kAttributeUsingPrefix: + case parser::details::ParseFunctionKind::kAttributeList: + case parser::details::ParseFunctionKind::kAttribute: + case parser::details::ParseFunctionKind::kAttributeToken: + case parser::details::ParseFunctionKind::kAttributeScopedToken: + case parser::details::ParseFunctionKind::kAttributeNamespace: + case parser::details::ParseFunctionKind::kAttributeArgumentClause: + case parser::details::ParseFunctionKind::kBalancedTokenSeq: + case parser::details::ParseFunctionKind::kBalancedToken: + case parser::details::ParseFunctionKind::kModuleDeclaration: + case parser::details::ParseFunctionKind::kModuleName: + case parser::details::ParseFunctionKind::kModulePartition: + case parser::details::ParseFunctionKind::kModuleNameQualifier: + case parser::details::ParseFunctionKind::kExportDeclaration: + case parser::details::ParseFunctionKind::kModuleImportDeclaration: + case parser::details::ParseFunctionKind::kGlobalModuleFragment: + case parser::details::ParseFunctionKind::kPrivateModuleFragment: + case parser::details::ParseFunctionKind::kClassName: + case parser::details::ParseFunctionKind::kClassSpecifier: + case parser::details::ParseFunctionKind::kClassHead: + case parser::details::ParseFunctionKind::kClassHeadName: + case parser::details::ParseFunctionKind::kClassVirtSpecifier: + case parser::details::ParseFunctionKind::kClassKey: + case parser::details::ParseFunctionKind::kMemberSpecification: + case parser::details::ParseFunctionKind::kMemberDeclaration: + case parser::details::ParseFunctionKind::kMemberDeclaratorList: + case parser::details::ParseFunctionKind::kMemberDeclarator: + case parser::details::ParseFunctionKind::kVirtSpecifierSeq: + case parser::details::ParseFunctionKind::kVirtSpecifier: + case parser::details::ParseFunctionKind::kPureSpecifier: + case parser::details::ParseFunctionKind::kConversionFunctionId: + case parser::details::ParseFunctionKind::kConversionTypeId: + case parser::details::ParseFunctionKind::kConversionDeclarator: + case parser::details::ParseFunctionKind::kBaseClause: + case parser::details::ParseFunctionKind::kBaseSpecifierList: + case parser::details::ParseFunctionKind::kBaseSpecifier: + case parser::details::ParseFunctionKind::kClassOrDecltype: + case parser::details::ParseFunctionKind::kAccessSpecifier: + case parser::details::ParseFunctionKind::kCtorInitializer: + case parser::details::ParseFunctionKind::kMemInitializerList: + case parser::details::ParseFunctionKind::kMemInitializer: + case parser::details::ParseFunctionKind::kMemInitializerId: + case parser::details::ParseFunctionKind::kOperatorFunctionId: + case parser::details::ParseFunctionKind::kTheOperator: + case parser::details::ParseFunctionKind::kLiteralOperatorId: + case parser::details::ParseFunctionKind::kTemplateDeclaration: + case parser::details::ParseFunctionKind::kTemplateHead: + case parser::details::ParseFunctionKind::kTemplateParameterList: + case parser::details::ParseFunctionKind::kRequiresClause: + case parser::details::ParseFunctionKind::kConstraintLogicalOrExpression: + case parser::details::ParseFunctionKind::kConstraintLogicalAndExpression: + case parser::details::ParseFunctionKind::kTemplateParameter: + case parser::details::ParseFunctionKind::kTypeParameter: + case parser::details::ParseFunctionKind::kTypeParameterKey: + case parser::details::ParseFunctionKind::kTypeConstraint: + case parser::details::ParseFunctionKind::kSimpleTemplateId: + case parser::details::ParseFunctionKind::kTemplateId: + case parser::details::ParseFunctionKind::kTemplateName: + case parser::details::ParseFunctionKind::kTemplateArgumentList: + case parser::details::ParseFunctionKind::kTemplateArgument: + case parser::details::ParseFunctionKind::kConstraintExpression: + case parser::details::ParseFunctionKind::kDeductionGuide: + case parser::details::ParseFunctionKind::kConceptDefinition: + case parser::details::ParseFunctionKind::kConceptName: + case parser::details::ParseFunctionKind::kTypenameSpecifier: + case parser::details::ParseFunctionKind::kExplicitInstantiation: + case parser::details::ParseFunctionKind::kExplicitSpecialization: + case parser::details::ParseFunctionKind::kTryBlock: + case parser::details::ParseFunctionKind::kFunctionTryBlock: + case parser::details::ParseFunctionKind::kHandlerSeq: + case parser::details::ParseFunctionKind::kHandler: + case parser::details::ParseFunctionKind::kExceptionDeclaration: + case parser::details::ParseFunctionKind::kNoexceptSpecifier: + case parser::details::ParseFunctionKind::kPreprocessingFile: + case parser::details::ParseFunctionKind::kModuleFile: + case parser::details::ParseFunctionKind::kPpGlobalModuleFragment: + case parser::details::ParseFunctionKind::kPpPrivateModuleFragment: + case parser::details::ParseFunctionKind::kGroup: + case parser::details::ParseFunctionKind::kGroupPart: + case parser::details::ParseFunctionKind::kControlLine: + case parser::details::ParseFunctionKind::kIfSection: + case parser::details::ParseFunctionKind::kIfGroup: + case parser::details::ParseFunctionKind::kElifGroups: + case parser::details::ParseFunctionKind::kElifGroup: + case parser::details::ParseFunctionKind::kElseGroup: + case parser::details::ParseFunctionKind::kEndifLine: + case parser::details::ParseFunctionKind::kTextLine: + case parser::details::ParseFunctionKind::kConditionallySupportedDirective: + case parser::details::ParseFunctionKind::kLparen: + case parser::details::ParseFunctionKind::kIdentifierList: + case parser::details::ParseFunctionKind::kReplacementList: + case parser::details::ParseFunctionKind::kPpTokens: + case parser::details::ParseFunctionKind::kNewLine: + case parser::details::ParseFunctionKind::kDefinedMacroExpression: + case parser::details::ParseFunctionKind::kHPreprocessingToken: + case parser::details::ParseFunctionKind::kHPpTokens: + case parser::details::ParseFunctionKind::kHeaderNameTokens: + case parser::details::ParseFunctionKind::kHasIncludeExpression: + case parser::details::ParseFunctionKind::kHasAttributeExpression: + case parser::details::ParseFunctionKind::kPpModule: + case parser::details::ParseFunctionKind::kPpImport: + case parser::details::ParseFunctionKind::kVaOptReplacement: + case parser::details::ParseFunctionKind::kHexQuad: + case parser::details::ParseFunctionKind::kUniversalCharacterName: + case parser::details::ParseFunctionKind::kPreprocessingToken: + case parser::details::ParseFunctionKind::kToken: + case parser::details::ParseFunctionKind::kHeaderName: + case parser::details::ParseFunctionKind::kHCharSequence: + case parser::details::ParseFunctionKind::kHChar: + case parser::details::ParseFunctionKind::kQCharSequence: + case parser::details::ParseFunctionKind::kQChar: + case parser::details::ParseFunctionKind::kPpNumber: + case parser::details::ParseFunctionKind::kIdentifierNondigit: + case parser::details::ParseFunctionKind::kNondigit: + case parser::details::ParseFunctionKind::kDigit: + case parser::details::ParseFunctionKind::kKeyword: + case parser::details::ParseFunctionKind::kPreprocessingOpOrPunc: + case parser::details::ParseFunctionKind::kPreprocessingOperator: + case parser::details::ParseFunctionKind::kOperatorOrPunctuator: + case parser::details::ParseFunctionKind::kLiteral: + case parser::details::ParseFunctionKind::kBinaryDigit: + case parser::details::ParseFunctionKind::kOctalDigit: + case parser::details::ParseFunctionKind::kNonzeroDigit: + case parser::details::ParseFunctionKind::kHexadecimalPrefix: + case parser::details::ParseFunctionKind::kHexadecimalDigitSequence: + case parser::details::ParseFunctionKind::kHexadecimalDigit: + case parser::details::ParseFunctionKind::kIntegerSuffix: + case parser::details::ParseFunctionKind::kUnsignedSuffix: + case parser::details::ParseFunctionKind::kLongSuffix: + case parser::details::ParseFunctionKind::kLongLongSuffix: + case parser::details::ParseFunctionKind::kEncodingPrefix: + case parser::details::ParseFunctionKind::kCCharSequence: + case parser::details::ParseFunctionKind::kCChar: + case parser::details::ParseFunctionKind::kEscapeSequence: + case parser::details::ParseFunctionKind::kSimpleEscapeSequence: + case parser::details::ParseFunctionKind::kOctalEscapeSequence: + case parser::details::ParseFunctionKind::kHexadecimalEscapeSequence: + case parser::details::ParseFunctionKind::kDecimalFloatingPointLiteral: + case parser::details::ParseFunctionKind::kHexadecimalFloatingPointLiteral: + case parser::details::ParseFunctionKind::kFractionalConstant: + case parser::details::ParseFunctionKind::kHexadecimalFractionalConstant: + case parser::details::ParseFunctionKind::kExponentPart: + case parser::details::ParseFunctionKind::kBinaryExponentPart: + case parser::details::ParseFunctionKind::kSign: + case parser::details::ParseFunctionKind::kDigitSequence: + case parser::details::ParseFunctionKind::kFloatingPointSuffix: + case parser::details::ParseFunctionKind::kSCharSequence: + case parser::details::ParseFunctionKind::kSChar: + case parser::details::ParseFunctionKind::kRCharSequence: + case parser::details::ParseFunctionKind::kRChar: + case parser::details::ParseFunctionKind::kDCharSequence: + case parser::details::ParseFunctionKind::kDChar: + case parser::details::ParseFunctionKind::kBooleanLiteral: + case parser::details::ParseFunctionKind::kPointerLiteral: + case parser::details::ParseFunctionKind::kUserDefinedLiteral: + case parser::details::ParseFunctionKind::kUdSuffix: + case parser::details::ParseFunctionKind::kNum: + LPS_ERROR(kTag, "not support yet: ", node.kind_); + break; + } + unreachable(kTag); + return nullptr; +} + +std::unique_ptr Factory::create_by_token( + const parser::details::Tree::Node& node) { + + lps_assert(kTag, node.token_kind_ != token::details::TokenKind::unknown); + + switch (node.token_kind_) { + case token::details::TokenKind::kw_this: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::l_paren: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::r_paren: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::tilde: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_template: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::coloncolon: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::less: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::greater: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::l_square: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::r_square: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::comma: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::amp: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::equal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::ellipsis: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::star: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::plus: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::minus: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::slash: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::percent: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::caret: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::pipe: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::lessless: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::greatergreater: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::plusequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::minusequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::starequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::slashequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::percentequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::caretequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::ampequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::pipeequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::lesslessequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::greatergreaterequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::equalequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::exclaimequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::lessequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::greaterequal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::ampamp: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::pipepipe: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::periodstar: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::arrowstar: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_requires: + break; + case token::details::TokenKind::l_brace: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::r_brace: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::semi: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_typename: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_noexcept: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::arrow: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::period: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::plusplus: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::minusminus: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_dynamic_cast: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_static_cast: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_reinterpret_cast: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_const_cast: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_typeid: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_sizeof: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::identifier: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_alignof: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::exclaim: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_co_await: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_new: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_delete: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::spaceship: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::question: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::colon: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_co_yield: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_throw: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_case: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_default: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_if: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_constexpr: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_else: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_switch: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_while: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::hashhash: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_do: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_for: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_break: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_continue: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_return: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_goto: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_co_return: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_using: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_static_assert: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_friend: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_typedef: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_consteval: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_constinit: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_inline: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_static: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_thread_local: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_extern: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_mutable: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_virtual: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_explicit: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_char: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_char8_t: + return std::make_unique(node.start_); + break; + break; + case token::details::TokenKind::kw_char16_t: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_char32_t: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_wchar_t: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_bool: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_short: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_int: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_long: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_signed: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_unsigned: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_float: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_double: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_void: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_enum: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_decltype: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_auto: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_const: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_volatile: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_class: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_struct: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_namespace: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_asm: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_alignas: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_export: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_module: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_import: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_private: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_final: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_union: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_override: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_operator: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_protected: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_public: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_concept: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_try: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_catch: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::hash: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_include: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_define: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_undef: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_line: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_error: + break; + case token::details::TokenKind::kw_pragma: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_ifdef: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_ifndef: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_elif: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_endif: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_defined: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw___has_include: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw___has_cpp_attribute: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw___va_opt__: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_and: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_or: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_xor: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_not: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_bitand: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_bitor: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_compl: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_and_eq: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_or_eq: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_xor_eq: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_not_eq: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_false: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_true: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::kw_nullptr: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::binary_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::floating_point_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::char_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::string_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::integer_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::decimal_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::octal_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::hexadecimal_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::raw_string: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::user_defined_char_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::user_defined_string_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::user_defined_floating_point_literal: + return std::make_unique(node.start_); + break; + case token::details::TokenKind::user_defined_integer_literal: + return std::make_unique(node.start_); + break; + default: + LPS_ERROR(kTag, "not support token: ", node.token_kind_); + break; + } + unreachable(kTag); + return nullptr; +} + +} // namespace lps::sema From edad6a102dc8eb5c5385dd2863370da7ccdc31dd Mon Sep 17 00:00:00 2001 From: Xiao Ma Date: Wed, 13 Sep 2023 07:09:59 +0000 Subject: [PATCH 6/6] [WIP] Sema: design semantic basic elements, part 4. --- gram/create_semantic_unit.py | 23 +- include/sema.h | 8 +- include/semantic_unit/unit.h | 5422 +++++++++++++++++++++++++++++++++- src/constant_expression.cc | 9 +- src/sema.cc | 2149 ++++++++++++-- 5 files changed, 7247 insertions(+), 364 deletions(-) diff --git a/gram/create_semantic_unit.py b/gram/create_semantic_unit.py index a8f19ae..4709623 100644 --- a/gram/create_semantic_unit.py +++ b/gram/create_semantic_unit.py @@ -60,7 +60,7 @@ #include "sema.h" -namespace lps::sema::details { +namespace lps::sema::details::unit { __CONTENT_UNIT_DECL__ @@ -70,19 +70,32 @@ """ unit_def_template = """ -class __NAME__ : public Unit { +class __NAME__ : public Unit, public HasElements { public: + explicit __NAME__(const parser::details::Tree::Node* gram_node, basic::Vector<2, std::unique_ptr>&& elements):Unit(gram_node), HasElements(std::move(elements)){{ + this->kind_ = parser::details::ParseFunctionKind::k__NAME__; + }} void build() override { LPS_ERROR(kTag, "not implemented"); } -__TYPE__ + void check() override { LPS_ERROR(kTag, "not implemented"); } +~__NAME__() override = default; + private: constexpr static const char* kTag = "lps::sema::details::__NAME__"; -__MEMBER__ }; """ + case_template = f""" + case parser::details::ParseFunctionKind::k__NAME__: {{ + return std::make_unique(&node, + std::move(elements)); + break; + }} + """ + str_unit_decl = "" str_unit_def_all = "" + case_strs = "" for k, v in gram_tree.items(): name = camel_case(k) @@ -142,6 +155,7 @@ class __NAME__ : public Unit { str_unit_def = unit_def_template.replace("__TYPE__", str_type) str_unit_def = str_unit_def.replace("__MEMBER__", str_member) str_unit_def = str_unit_def.replace("__NAME__", name) + case_strs += case_template.replace("__NAME__", name) str_unit_def_all += str_unit_def contents = unit_h_out_template.replace("__CONTENT_UNIT_DECL__", str_unit_decl) @@ -149,3 +163,4 @@ class __NAME__ : public Unit { write_to_file(unit_h_out_path, contents, "\n", "\n") + write_to_file(unit_h_out_path + ".case", case_strs, "\n", "\n") diff --git a/include/sema.h b/include/sema.h index 8f0c64a..b2771c4 100644 --- a/include/sema.h +++ b/include/sema.h @@ -37,16 +37,17 @@ namespace details { class Unit { public: virtual void build() = 0; + virtual void check() = 0; [[nodiscard]] parser::details::ParseFunctionKind kind() const { return kind_; } + virtual ~Unit() = default; [[nodiscard]] token::details::TokenKind token_kind() const { return token_kind_; } protected: - const parser::details::Tree::Node* gram_node_{nullptr}; parser::details::ParseFunctionKind kind_{ parser::details::ParseFunctionKind::kUnknown}; token::details::TokenKind token_kind_{token::details::TokenKind::unknown}; @@ -56,6 +57,10 @@ class Unit { }; class HasElements { + public: + explicit HasElements(basic::Vector<2, std::unique_ptr>&& elements) + : elements_(std::move(elements)) {} + protected: basic::Vector<2, std::unique_ptr> elements_; }; @@ -63,6 +68,7 @@ class HasElements { class Symbol : public Unit { public: void build() override {} + void check() override {} explicit Symbol(const token::Token* t) : token_(t) { lps_assert(kTag, t->kind() != token::details::TokenKind::unknown); this->token_kind_ = t->kind(); diff --git a/include/semantic_unit/unit.h b/include/semantic_unit/unit.h index b6a985f..eb8564d 100644 --- a/include/semantic_unit/unit.h +++ b/include/semantic_unit/unit.h @@ -1,3 +1,4 @@ + /* * MIT License * Copyright (c) 2023 mxlol233 (mxlol233@outlook.com) @@ -24,63 +25,5428 @@ #include "sema.h" -namespace lps::sema::details { +namespace lps::sema::details::unit { class TranslationUnit; -class Expression; -class AssignmentExpression; +class PrimaryExpression; +class IdExpression; +class UnqualifiedId; +class QualifiedId; +class NestedNameSpecifier; +class LambdaExpression; +class LambdaIntroducer; +class LambdaDeclarator; +class LambdaCapture; +class CaptureDefault; +class CaptureList; +class Capture; +class SimpleCapture; +class InitCapture; +class FoldExpression; +class FoldOperator; +class RequiresExpression; +class RequirementParameterList; +class RequirementBody; +class RequirementSeq; +class Requirement; +class SimpleRequirement; +class TypeRequirement; +class CompoundRequirement; +class ReturnTypeRequirement; +class NestedRequirement; +class PostfixExpression; +class ExpressionList; +class UnaryExpression; +class UnaryOperator; +class AwaitExpression; +class NoexceptExpression; +class NewExpression; +class NewPlacement; +class NewTypeId; +class NewDeclarator; +class NoptrNewDeclarator; +class NewInitializer; +class DeleteExpression; +class CastExpression; +class PmExpression; +class MultiplicativeExpression; +class AdditiveExpression; +class ShiftExpression; +class CompareExpression; +class RelationalExpression; +class EqualityExpression; +class AndExpression; +class ExclusiveOrExpression; +class InclusiveOrExpression; +class LogicalAndExpression; class LogicalOrExpression; +class ConditionalExpression; +class YieldExpression; +class ThrowExpression; +class AssignmentExpression; +class AssignmentOperator; +class Expression; +class ConstantExpression; +class Statement; +class InitStatement; +class Condition; +class LabeledStatement; +class ExpressionStatement; +class CompoundStatement; +class StatementSeq; +class SelectionStatement; +class IterationStatement; +class ForRangeDeclaration; +class ForRangeInitializer; +class JumpStatement; +class CoroutineReturnStatement; +class DeclarationStatement; +class DeclarationSeq; +class Declaration; +class BlockDeclaration; +class NodeclspecFunctionDeclaration; +class AliasDeclaration; +class SimpleDeclaration; +class StaticAssertDeclaration; +class EmptyDeclaration; +class AttributeDeclaration; +class DeclSpecifier; +class DeclSpecifierSeq; +class StorageClassSpecifier; +class FunctionSpecifier; +class ExplicitSpecifier; +class TypedefName; +class TypeSpecifier; +class TypeSpecifierSeq; +class DefiningTypeSpecifier; +class DefiningTypeSpecifierSeq; +class SimpleTypeSpecifier; +class TypeName; +class ElaboratedTypeSpecifier; +class ElaboratedEnumSpecifier; +class DecltypeSpecifier; +class PlaceholderTypeSpecifier; +class InitDeclaratorList; +class InitDeclarator; +class Declarator; +class PtrDeclarator; +class NoptrDeclarator; +class ParametersAndQualifiers; +class TrailingReturnType; +class PtrOperator; +class CvQualifierSeq; +class CvQualifier; +class RefQualifier; +class DeclaratorId; +class TypeId; +class DefiningTypeId; +class AbstractDeclarator; +class PtrAbstractDeclarator; +class NoptrAbstractDeclarator; +class AbstractPackDeclarator; +class NoptrAbstractPackDeclarator; +class ParameterDeclarationClause; +class ParameterDeclarationList; +class ParameterDeclaration; +class Initializer; +class BraceOrEqualInitializer; class InitializerClause; +class BracedInitList; +class InitializerList; +class DesignatedInitializerList; +class DesignatedInitializerClause; +class Designator; +class ExprOrBracedInitList; +class FunctionDefinition; +class FunctionBody; +class EnumName; +class EnumSpecifier; +class EnumHead; +class EnumHeadName; +class OpaqueEnumDeclaration; +class EnumKey; +class EnumBase; +class EnumeratorList; +class EnumeratorDefinition; +class Enumerator; +class UsingEnumDeclaration; +class NamespaceName; +class NamespaceDefinition; +class NamedNamespaceDefinition; +class UnnamedNamespaceDefinition; +class NestedNamespaceDefinition; +class EnclosingNamespaceSpecifier; +class NamespaceBody; +class NamespaceAlias; +class NamespaceAliasDefinition; +class QualifiedNamespaceSpecifier; +class UsingDirective; +class UsingDeclaration; +class UsingDeclaratorList; +class UsingDeclarator; +class AsmDeclaration; +class LinkageSpecification; +class AttributeSpecifierSeq; +class AttributeSpecifier; +class AlignmentSpecifier; +class AttributeUsingPrefix; +class AttributeList; +class Attribute; +class AttributeToken; +class AttributeScopedToken; +class AttributeNamespace; +class AttributeArgumentClause; +class BalancedTokenSeq; +class BalancedToken; +class ModuleDeclaration; +class ModuleName; +class ModulePartition; +class ModuleNameQualifier; +class ExportDeclaration; +class ModuleImportDeclaration; +class GlobalModuleFragment; +class PrivateModuleFragment; +class ClassName; +class ClassSpecifier; +class ClassHead; +class ClassHeadName; +class ClassVirtSpecifier; +class ClassKey; +class MemberSpecification; +class MemberDeclaration; +class MemberDeclaratorList; +class MemberDeclarator; +class VirtSpecifierSeq; +class VirtSpecifier; +class PureSpecifier; +class ConversionFunctionId; +class ConversionTypeId; +class ConversionDeclarator; +class BaseClause; +class BaseSpecifierList; +class BaseSpecifier; +class ClassOrDecltype; +class AccessSpecifier; +class CtorInitializer; +class MemInitializerList; +class MemInitializer; +class MemInitializerId; +class OperatorFunctionId; +class TheOperator; +class LiteralOperatorId; +class TemplateDeclaration; +class TemplateHead; +class TemplateParameterList; +class RequiresClause; +class ConstraintLogicalOrExpression; +class ConstraintLogicalAndExpression; +class TemplateParameter; +class TypeParameter; +class TypeParameterKey; +class TypeConstraint; +class SimpleTemplateId; +class TemplateId; +class TemplateName; +class TemplateArgumentList; +class TemplateArgument; +class ConstraintExpression; +class DeductionGuide; +class ConceptDefinition; +class ConceptName; +class TypenameSpecifier; +class ExplicitInstantiation; +class ExplicitSpecialization; +class TryBlock; +class FunctionTryBlock; +class HandlerSeq; +class Handler; +class ExceptionDeclaration; +class NoexceptSpecifier; +class PreprocessingFile; +class ModuleFile; +class PpGlobalModuleFragment; +class PpPrivateModuleFragment; +class Group; +class GroupPart; +class ControlLine; +class IfSection; +class IfGroup; +class ElifGroups; +class ElifGroup; +class ElseGroup; +class EndifLine; +class TextLine; +class ConditionallySupportedDirective; +class Lparen; +class IdentifierList; +class ReplacementList; +class PpTokens; +class NewLine; +class DefinedMacroExpression; +class HPreprocessingToken; +class HPpTokens; +class HeaderNameTokens; +class HasIncludeExpression; +class HasAttributeExpression; +class PpModule; +class PpImport; +class VaOptReplacement; +class HexQuad; +class UniversalCharacterName; +class PreprocessingToken; +class Token; +class HeaderName; +class HCharSequence; +class HChar; +class QCharSequence; +class QChar; +class PpNumber; +class IdentifierNondigit; +class Nondigit; +class Digit; +class Keyword; +class PreprocessingOpOrPunc; +class PreprocessingOperator; +class OperatorOrPunctuator; +class Literal; +class BinaryDigit; +class OctalDigit; +class NonzeroDigit; +class HexadecimalPrefix; +class HexadecimalDigitSequence; +class HexadecimalDigit; +class IntegerSuffix; +class UnsignedSuffix; +class LongSuffix; +class LongLongSuffix; +class EncodingPrefix; +class CCharSequence; +class CChar; +class EscapeSequence; +class SimpleEscapeSequence; +class OctalEscapeSequence; +class HexadecimalEscapeSequence; +class DecimalFloatingPointLiteral; +class HexadecimalFloatingPointLiteral; +class FractionalConstant; +class HexadecimalFractionalConstant; +class ExponentPart; +class BinaryExponentPart; +class Sign; +class DigitSequence; +class FloatingPointSuffix; +class SCharSequence; +class SChar; +class RCharSequence; +class RChar; +class DCharSequence; +class DChar; +class BooleanLiteral; +class PointerLiteral; +class UserDefinedLiteral; +class UdSuffix; -// A program consists of one or more translation units linked together. -// A `translation unit` consists of a sequence of declarations. -// A name is said to have linkage when it can denote the same object, -// reference, function, type, template, namespace or value as a name -// introduced by a declaration in another scope: -class TranslationUnit : public Unit { +class TranslationUnit : public Unit, public HasElements { public: + explicit TranslationUnit(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTranslationUnit; } + } void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TranslationUnit() override = default; private: constexpr static const char* kTag = "lps::sema::details::TranslationUnit"; }; -// A pair of expressions separated by a comma is evaluated left-to-right; -// the left expression is a `discarded-value expression`. The left expression -// is sequenced before the right expression. -// The type and value of the result are the type and value of the right operand; -// the result is of the same value category as its right operand, -// and is a bit-field if its right operand is a bit-field. -class Expression : public Unit { +class PrimaryExpression : public Unit, public HasElements { public: + explicit PrimaryExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPrimaryExpression; } + } void build() override { LPS_ERROR(kTag, "not implemented"); } - virtual void constant_evaluate() { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PrimaryExpression() override = default; private: - constexpr static const char* kTag = "lps::sema::details::Expression"; + constexpr static const char* kTag = "lps::sema::details::PrimaryExpression"; +}; + +class IdExpression : public Unit, public HasElements { + + public: + explicit IdExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kIdExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~IdExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::IdExpression"; +}; + +class UnqualifiedId : public Unit, public HasElements { + + public: + explicit UnqualifiedId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUnqualifiedId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UnqualifiedId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UnqualifiedId"; +}; + +class QualifiedId : public Unit, public HasElements { + + public: + explicit QualifiedId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kQualifiedId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~QualifiedId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::QualifiedId"; +}; + +class NestedNameSpecifier : public Unit, public HasElements { + + public: + explicit NestedNameSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNestedNameSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NestedNameSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NestedNameSpecifier"; +}; + +class LambdaExpression : public Unit, public HasElements { + + public: + explicit LambdaExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLambdaExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LambdaExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LambdaExpression"; +}; + +class LambdaIntroducer : public Unit, public HasElements { + + public: + explicit LambdaIntroducer(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLambdaIntroducer; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LambdaIntroducer() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LambdaIntroducer"; +}; + +class LambdaDeclarator : public Unit, public HasElements { + + public: + explicit LambdaDeclarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLambdaDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LambdaDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LambdaDeclarator"; +}; + +class LambdaCapture : public Unit, public HasElements { + + public: + explicit LambdaCapture(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLambdaCapture; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LambdaCapture() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LambdaCapture"; +}; + +class CaptureDefault : public Unit, public HasElements { - basic::Vector<2, std::shared_ptr> assignment_exprs_; + public: + explicit CaptureDefault(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCaptureDefault; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CaptureDefault() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CaptureDefault"; +}; + +class CaptureList : public Unit, public HasElements { + + public: + explicit CaptureList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCaptureList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CaptureList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CaptureList"; +}; + +class Capture : public Unit, public HasElements { + + public: + explicit Capture(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCapture; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Capture() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Capture"; +}; + +class SimpleCapture : public Unit, public HasElements { + + public: + explicit SimpleCapture(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSimpleCapture; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SimpleCapture() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SimpleCapture"; +}; + +class InitCapture : public Unit, public HasElements { + + public: + explicit InitCapture(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kInitCapture; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~InitCapture() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::InitCapture"; }; -class AssignmentExpression : public Expression { +class FoldExpression : public Unit, public HasElements { public: + explicit FoldExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFoldExpression; } + } void build() override { LPS_ERROR(kTag, "not implemented"); } - void constant_evaluate() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FoldExpression() override = default; -struct Type0{ - std::shared_ptr logical_or_expr_{nullptr}; + private: + constexpr static const char* kTag = "lps::sema::details::FoldExpression"; +}; + +class FoldOperator : public Unit, public HasElements { + + public: + explicit FoldOperator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFoldOperator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FoldOperator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::FoldOperator"; }; +class RequiresExpression : public Unit, public HasElements { + + public: + explicit RequiresExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRequiresExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RequiresExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::RequiresExpression"; +}; + +class RequirementParameterList : public Unit, public HasElements { + + public: + explicit RequirementParameterList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kRequirementParameterList; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RequirementParameterList() override = default; + private: constexpr static const char* kTag = - "lps::sema::details::AssignmentExpression"; + "lps::sema::details::RequirementParameterList"; +}; + +class RequirementBody : public Unit, public HasElements { + + public: + explicit RequirementBody(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRequirementBody; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RequirementBody() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::RequirementBody"; +}; + +class RequirementSeq : public Unit, public HasElements { + + public: + explicit RequirementSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRequirementSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RequirementSeq() override = default; - std::shared_ptr logical_or_expr_{nullptr}; - std::shared_ptr init_clause_{nullptr}; - const char* assignment_op_{nullptr}; + private: + constexpr static const char* kTag = "lps::sema::details::RequirementSeq"; +}; + +class Requirement : public Unit, public HasElements { + + public: + explicit Requirement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRequirement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Requirement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Requirement"; +}; + +class SimpleRequirement : public Unit, public HasElements { + + public: + explicit SimpleRequirement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSimpleRequirement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SimpleRequirement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SimpleRequirement"; +}; + +class TypeRequirement : public Unit, public HasElements { + + public: + explicit TypeRequirement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeRequirement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeRequirement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeRequirement"; +}; + +class CompoundRequirement : public Unit, public HasElements { + + public: + explicit CompoundRequirement( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCompoundRequirement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CompoundRequirement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CompoundRequirement"; +}; + +class ReturnTypeRequirement : public Unit, public HasElements { + + public: + explicit ReturnTypeRequirement( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kReturnTypeRequirement; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ReturnTypeRequirement() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ReturnTypeRequirement"; +}; + +class NestedRequirement : public Unit, public HasElements { + + public: + explicit NestedRequirement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNestedRequirement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NestedRequirement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NestedRequirement"; +}; + +class PostfixExpression : public Unit, public HasElements { + + public: + explicit PostfixExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPostfixExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PostfixExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PostfixExpression"; +}; + +class ExpressionList : public Unit, public HasElements { + + public: + explicit ExpressionList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExpressionList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExpressionList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ExpressionList"; +}; + +class UnaryExpression : public Unit, public HasElements { + + public: + explicit UnaryExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUnaryExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UnaryExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UnaryExpression"; +}; + +class UnaryOperator : public Unit, public HasElements { + + public: + explicit UnaryOperator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUnaryOperator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UnaryOperator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UnaryOperator"; +}; + +class AwaitExpression : public Unit, public HasElements { + + public: + explicit AwaitExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAwaitExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AwaitExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AwaitExpression"; +}; + +class NoexceptExpression : public Unit, public HasElements { + + public: + explicit NoexceptExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNoexceptExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NoexceptExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NoexceptExpression"; +}; + +class NewExpression : public Unit, public HasElements { + + public: + explicit NewExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNewExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NewExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NewExpression"; +}; + +class NewPlacement : public Unit, public HasElements { + + public: + explicit NewPlacement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNewPlacement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NewPlacement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NewPlacement"; +}; + +class NewTypeId : public Unit, public HasElements { + + public: + explicit NewTypeId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNewTypeId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NewTypeId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NewTypeId"; +}; + +class NewDeclarator : public Unit, public HasElements { + + public: + explicit NewDeclarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNewDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NewDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NewDeclarator"; +}; + +class NoptrNewDeclarator : public Unit, public HasElements { + + public: + explicit NoptrNewDeclarator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNoptrNewDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NoptrNewDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NoptrNewDeclarator"; +}; + +class NewInitializer : public Unit, public HasElements { + + public: + explicit NewInitializer(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNewInitializer; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NewInitializer() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NewInitializer"; +}; + +class DeleteExpression : public Unit, public HasElements { + + public: + explicit DeleteExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeleteExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DeleteExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DeleteExpression"; +}; + +class CastExpression : public Unit, public HasElements { + + public: + explicit CastExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCastExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CastExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CastExpression"; +}; + +class PmExpression : public Unit, public HasElements { + + public: + explicit PmExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPmExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PmExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PmExpression"; +}; + +class MultiplicativeExpression : public Unit, public HasElements { + + public: + explicit MultiplicativeExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kMultiplicativeExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MultiplicativeExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::MultiplicativeExpression"; +}; + +class AdditiveExpression : public Unit, public HasElements { + + public: + explicit AdditiveExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAdditiveExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AdditiveExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AdditiveExpression"; +}; + +class ShiftExpression : public Unit, public HasElements { + + public: + explicit ShiftExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kShiftExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ShiftExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ShiftExpression"; +}; + +class CompareExpression : public Unit, public HasElements { + + public: + explicit CompareExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCompareExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CompareExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CompareExpression"; +}; + +class RelationalExpression : public Unit, public HasElements { + + public: + explicit RelationalExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRelationalExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RelationalExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::RelationalExpression"; +}; + +class EqualityExpression : public Unit, public HasElements { + + public: + explicit EqualityExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEqualityExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EqualityExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EqualityExpression"; +}; + +class AndExpression : public Unit, public HasElements { + + public: + explicit AndExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAndExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AndExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AndExpression"; +}; + +class ExclusiveOrExpression : public Unit, public HasElements { + + public: + explicit ExclusiveOrExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kExclusiveOrExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExclusiveOrExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ExclusiveOrExpression"; +}; + +class InclusiveOrExpression : public Unit, public HasElements { + + public: + explicit InclusiveOrExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kInclusiveOrExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~InclusiveOrExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::InclusiveOrExpression"; +}; + +class LogicalAndExpression : public Unit, public HasElements { + + public: + explicit LogicalAndExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLogicalAndExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LogicalAndExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::LogicalAndExpression"; +}; + +class LogicalOrExpression : public Unit, public HasElements { + + public: + explicit LogicalOrExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLogicalOrExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LogicalOrExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LogicalOrExpression"; +}; + +class ConditionalExpression : public Unit, public HasElements { + + public: + explicit ConditionalExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kConditionalExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConditionalExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ConditionalExpression"; +}; + +class YieldExpression : public Unit, public HasElements { + + public: + explicit YieldExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kYieldExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~YieldExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::YieldExpression"; +}; + +class ThrowExpression : public Unit, public HasElements { + + public: + explicit ThrowExpression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kThrowExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ThrowExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ThrowExpression"; +}; + +class AssignmentExpression : public Unit, public HasElements { + + public: + explicit AssignmentExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAssignmentExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AssignmentExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::AssignmentExpression"; +}; + +class AssignmentOperator : public Unit, public HasElements { + + public: + explicit AssignmentOperator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAssignmentOperator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AssignmentOperator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AssignmentOperator"; +}; + +class Expression : public Unit, public HasElements { + + public: + explicit Expression(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Expression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Expression"; +}; + +class ConstantExpression : public Unit, public HasElements { + + public: + explicit ConstantExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kConstantExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConstantExpression() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ConstantExpression"; +}; + +class Statement : public Unit, public HasElements { + + public: + explicit Statement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Statement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Statement"; +}; + +class InitStatement : public Unit, public HasElements { + + public: + explicit InitStatement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kInitStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~InitStatement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::InitStatement"; +}; + +class Condition : public Unit, public HasElements { + + public: + explicit Condition(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCondition; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Condition() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Condition"; +}; + +class LabeledStatement : public Unit, public HasElements { + + public: + explicit LabeledStatement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLabeledStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LabeledStatement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LabeledStatement"; +}; + +class ExpressionStatement : public Unit, public HasElements { + + public: + explicit ExpressionStatement( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExpressionStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExpressionStatement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ExpressionStatement"; +}; + +class CompoundStatement : public Unit, public HasElements { + + public: + explicit CompoundStatement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCompoundStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CompoundStatement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CompoundStatement"; +}; + +class StatementSeq : public Unit, public HasElements { + + public: + explicit StatementSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kStatementSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~StatementSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::StatementSeq"; +}; + +class SelectionStatement : public Unit, public HasElements { + + public: + explicit SelectionStatement( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSelectionStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SelectionStatement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SelectionStatement"; +}; + +class IterationStatement : public Unit, public HasElements { + + public: + explicit IterationStatement( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kIterationStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~IterationStatement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::IterationStatement"; +}; + +class ForRangeDeclaration : public Unit, public HasElements { + + public: + explicit ForRangeDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kForRangeDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ForRangeDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ForRangeDeclaration"; +}; + +class ForRangeInitializer : public Unit, public HasElements { + + public: + explicit ForRangeInitializer( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kForRangeInitializer; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ForRangeInitializer() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ForRangeInitializer"; +}; + +class JumpStatement : public Unit, public HasElements { + + public: + explicit JumpStatement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kJumpStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~JumpStatement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::JumpStatement"; +}; + +class CoroutineReturnStatement : public Unit, public HasElements { + + public: + explicit CoroutineReturnStatement( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kCoroutineReturnStatement; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CoroutineReturnStatement() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::CoroutineReturnStatement"; +}; + +class DeclarationStatement : public Unit, public HasElements { + + public: + explicit DeclarationStatement( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeclarationStatement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DeclarationStatement() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::DeclarationStatement"; +}; + +class DeclarationSeq : public Unit, public HasElements { + + public: + explicit DeclarationSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeclarationSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DeclarationSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DeclarationSeq"; +}; + +class Declaration : public Unit, public HasElements { + + public: + explicit Declaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Declaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Declaration"; +}; + +class BlockDeclaration : public Unit, public HasElements { + + public: + explicit BlockDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBlockDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BlockDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BlockDeclaration"; +}; + +class NodeclspecFunctionDeclaration : public Unit, public HasElements { + + public: + explicit NodeclspecFunctionDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kNodeclspecFunctionDeclaration; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NodeclspecFunctionDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::NodeclspecFunctionDeclaration"; +}; + +class AliasDeclaration : public Unit, public HasElements { + + public: + explicit AliasDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAliasDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AliasDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AliasDeclaration"; +}; + +class SimpleDeclaration : public Unit, public HasElements { + + public: + explicit SimpleDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSimpleDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SimpleDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SimpleDeclaration"; +}; + +class StaticAssertDeclaration : public Unit, public HasElements { + + public: + explicit StaticAssertDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kStaticAssertDeclaration; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~StaticAssertDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::StaticAssertDeclaration"; +}; + +class EmptyDeclaration : public Unit, public HasElements { + + public: + explicit EmptyDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEmptyDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EmptyDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EmptyDeclaration"; +}; + +class AttributeDeclaration : public Unit, public HasElements { + + public: + explicit AttributeDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttributeDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::AttributeDeclaration"; +}; + +class DeclSpecifier : public Unit, public HasElements { + + public: + explicit DeclSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeclSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DeclSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DeclSpecifier"; +}; + +class DeclSpecifierSeq : public Unit, public HasElements { + + public: + explicit DeclSpecifierSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeclSpecifierSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DeclSpecifierSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DeclSpecifierSeq"; +}; + +class StorageClassSpecifier : public Unit, public HasElements { + + public: + explicit StorageClassSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kStorageClassSpecifier; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~StorageClassSpecifier() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::StorageClassSpecifier"; +}; + +class FunctionSpecifier : public Unit, public HasElements { + + public: + explicit FunctionSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFunctionSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FunctionSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::FunctionSpecifier"; +}; + +class ExplicitSpecifier : public Unit, public HasElements { + + public: + explicit ExplicitSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExplicitSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExplicitSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ExplicitSpecifier"; +}; + +class TypedefName : public Unit, public HasElements { + + public: + explicit TypedefName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypedefName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypedefName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypedefName"; +}; + +class TypeSpecifier : public Unit, public HasElements { + + public: + explicit TypeSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeSpecifier"; +}; + +class TypeSpecifierSeq : public Unit, public HasElements { + + public: + explicit TypeSpecifierSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeSpecifierSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeSpecifierSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeSpecifierSeq"; +}; + +class DefiningTypeSpecifier : public Unit, public HasElements { + + public: + explicit DefiningTypeSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kDefiningTypeSpecifier; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DefiningTypeSpecifier() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::DefiningTypeSpecifier"; +}; + +class DefiningTypeSpecifierSeq : public Unit, public HasElements { + + public: + explicit DefiningTypeSpecifierSeq( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kDefiningTypeSpecifierSeq; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DefiningTypeSpecifierSeq() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::DefiningTypeSpecifierSeq"; +}; + +class SimpleTypeSpecifier : public Unit, public HasElements { + + public: + explicit SimpleTypeSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSimpleTypeSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SimpleTypeSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SimpleTypeSpecifier"; +}; + +class TypeName : public Unit, public HasElements { + + public: + explicit TypeName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeName"; +}; + +class ElaboratedTypeSpecifier : public Unit, public HasElements { + + public: + explicit ElaboratedTypeSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kElaboratedTypeSpecifier; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ElaboratedTypeSpecifier() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ElaboratedTypeSpecifier"; +}; + +class ElaboratedEnumSpecifier : public Unit, public HasElements { + + public: + explicit ElaboratedEnumSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kElaboratedEnumSpecifier; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ElaboratedEnumSpecifier() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ElaboratedEnumSpecifier"; +}; + +class DecltypeSpecifier : public Unit, public HasElements { + + public: + explicit DecltypeSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDecltypeSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DecltypeSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DecltypeSpecifier"; +}; + +class PlaceholderTypeSpecifier : public Unit, public HasElements { + + public: + explicit PlaceholderTypeSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kPlaceholderTypeSpecifier; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PlaceholderTypeSpecifier() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::PlaceholderTypeSpecifier"; +}; + +class InitDeclaratorList : public Unit, public HasElements { + + public: + explicit InitDeclaratorList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kInitDeclaratorList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~InitDeclaratorList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::InitDeclaratorList"; +}; + +class InitDeclarator : public Unit, public HasElements { + + public: + explicit InitDeclarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kInitDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~InitDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::InitDeclarator"; +}; + +class Declarator : public Unit, public HasElements { + + public: + explicit Declarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Declarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Declarator"; +}; + +class PtrDeclarator : public Unit, public HasElements { + + public: + explicit PtrDeclarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPtrDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PtrDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PtrDeclarator"; +}; + +class NoptrDeclarator : public Unit, public HasElements { + + public: + explicit NoptrDeclarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNoptrDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NoptrDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NoptrDeclarator"; +}; + +class ParametersAndQualifiers : public Unit, public HasElements { + + public: + explicit ParametersAndQualifiers( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kParametersAndQualifiers; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ParametersAndQualifiers() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ParametersAndQualifiers"; +}; + +class TrailingReturnType : public Unit, public HasElements { + + public: + explicit TrailingReturnType( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTrailingReturnType; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TrailingReturnType() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TrailingReturnType"; +}; + +class PtrOperator : public Unit, public HasElements { + + public: + explicit PtrOperator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPtrOperator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PtrOperator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PtrOperator"; +}; + +class CvQualifierSeq : public Unit, public HasElements { + + public: + explicit CvQualifierSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCvQualifierSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CvQualifierSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CvQualifierSeq"; +}; + +class CvQualifier : public Unit, public HasElements { + + public: + explicit CvQualifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCvQualifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CvQualifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CvQualifier"; +}; + +class RefQualifier : public Unit, public HasElements { + + public: + explicit RefQualifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRefQualifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RefQualifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::RefQualifier"; +}; + +class DeclaratorId : public Unit, public HasElements { + + public: + explicit DeclaratorId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeclaratorId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DeclaratorId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DeclaratorId"; +}; + +class TypeId : public Unit, public HasElements { + + public: + explicit TypeId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeId"; +}; + +class DefiningTypeId : public Unit, public HasElements { + + public: + explicit DefiningTypeId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDefiningTypeId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DefiningTypeId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DefiningTypeId"; +}; + +class AbstractDeclarator : public Unit, public HasElements { + + public: + explicit AbstractDeclarator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAbstractDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AbstractDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AbstractDeclarator"; +}; + +class PtrAbstractDeclarator : public Unit, public HasElements { + + public: + explicit PtrAbstractDeclarator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kPtrAbstractDeclarator; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PtrAbstractDeclarator() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::PtrAbstractDeclarator"; +}; + +class NoptrAbstractDeclarator : public Unit, public HasElements { + + public: + explicit NoptrAbstractDeclarator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kNoptrAbstractDeclarator; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NoptrAbstractDeclarator() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::NoptrAbstractDeclarator"; +}; + +class AbstractPackDeclarator : public Unit, public HasElements { + + public: + explicit AbstractPackDeclarator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kAbstractPackDeclarator; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AbstractPackDeclarator() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::AbstractPackDeclarator"; +}; + +class NoptrAbstractPackDeclarator : public Unit, public HasElements { + + public: + explicit NoptrAbstractPackDeclarator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kNoptrAbstractPackDeclarator; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NoptrAbstractPackDeclarator() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::NoptrAbstractPackDeclarator"; +}; + +class ParameterDeclarationClause : public Unit, public HasElements { + + public: + explicit ParameterDeclarationClause( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kParameterDeclarationClause; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ParameterDeclarationClause() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ParameterDeclarationClause"; +}; + +class ParameterDeclarationList : public Unit, public HasElements { + + public: + explicit ParameterDeclarationList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kParameterDeclarationList; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ParameterDeclarationList() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ParameterDeclarationList"; +}; + +class ParameterDeclaration : public Unit, public HasElements { + + public: + explicit ParameterDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kParameterDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ParameterDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ParameterDeclaration"; +}; + +class Initializer : public Unit, public HasElements { + + public: + explicit Initializer(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kInitializer; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Initializer() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Initializer"; +}; + +class BraceOrEqualInitializer : public Unit, public HasElements { + + public: + explicit BraceOrEqualInitializer( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kBraceOrEqualInitializer; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BraceOrEqualInitializer() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::BraceOrEqualInitializer"; +}; + +class InitializerClause : public Unit, public HasElements { + + public: + explicit InitializerClause(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kInitializerClause; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~InitializerClause() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::InitializerClause"; +}; + +class BracedInitList : public Unit, public HasElements { + + public: + explicit BracedInitList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBracedInitList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BracedInitList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BracedInitList"; +}; + +class InitializerList : public Unit, public HasElements { + + public: + explicit InitializerList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kInitializerList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~InitializerList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::InitializerList"; +}; + +class DesignatedInitializerList : public Unit, public HasElements { + + public: + explicit DesignatedInitializerList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kDesignatedInitializerList; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DesignatedInitializerList() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::DesignatedInitializerList"; +}; + +class DesignatedInitializerClause : public Unit, public HasElements { + + public: + explicit DesignatedInitializerClause( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kDesignatedInitializerClause; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DesignatedInitializerClause() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::DesignatedInitializerClause"; +}; + +class Designator : public Unit, public HasElements { + + public: + explicit Designator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDesignator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Designator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Designator"; +}; + +class ExprOrBracedInitList : public Unit, public HasElements { + + public: + explicit ExprOrBracedInitList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExprOrBracedInitList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExprOrBracedInitList() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ExprOrBracedInitList"; +}; + +class FunctionDefinition : public Unit, public HasElements { + + public: + explicit FunctionDefinition( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFunctionDefinition; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FunctionDefinition() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::FunctionDefinition"; +}; + +class FunctionBody : public Unit, public HasElements { + + public: + explicit FunctionBody(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFunctionBody; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FunctionBody() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::FunctionBody"; +}; + +class EnumName : public Unit, public HasElements { + + public: + explicit EnumName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EnumName"; +}; + +class EnumSpecifier : public Unit, public HasElements { + + public: + explicit EnumSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EnumSpecifier"; +}; + +class EnumHead : public Unit, public HasElements { + + public: + explicit EnumHead(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumHead; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumHead() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EnumHead"; +}; + +class EnumHeadName : public Unit, public HasElements { + + public: + explicit EnumHeadName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumHeadName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumHeadName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EnumHeadName"; +}; + +class OpaqueEnumDeclaration : public Unit, public HasElements { + + public: + explicit OpaqueEnumDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kOpaqueEnumDeclaration; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~OpaqueEnumDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::OpaqueEnumDeclaration"; +}; + +class EnumKey : public Unit, public HasElements { + + public: + explicit EnumKey(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumKey; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumKey() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EnumKey"; +}; + +class EnumBase : public Unit, public HasElements { + + public: + explicit EnumBase(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumBase; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumBase() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EnumBase"; +}; + +class EnumeratorList : public Unit, public HasElements { + + public: + explicit EnumeratorList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumeratorList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumeratorList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EnumeratorList"; +}; + +class EnumeratorDefinition : public Unit, public HasElements { + + public: + explicit EnumeratorDefinition( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumeratorDefinition; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnumeratorDefinition() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::EnumeratorDefinition"; +}; + +class Enumerator : public Unit, public HasElements { + + public: + explicit Enumerator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEnumerator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Enumerator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Enumerator"; +}; + +class UsingEnumDeclaration : public Unit, public HasElements { + + public: + explicit UsingEnumDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUsingEnumDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UsingEnumDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::UsingEnumDeclaration"; +}; + +class NamespaceName : public Unit, public HasElements { + + public: + explicit NamespaceName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNamespaceName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NamespaceName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NamespaceName"; +}; + +class NamespaceDefinition : public Unit, public HasElements { + + public: + explicit NamespaceDefinition( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNamespaceDefinition; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NamespaceDefinition() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NamespaceDefinition"; +}; + +class NamedNamespaceDefinition : public Unit, public HasElements { + + public: + explicit NamedNamespaceDefinition( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kNamedNamespaceDefinition; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NamedNamespaceDefinition() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::NamedNamespaceDefinition"; +}; + +class UnnamedNamespaceDefinition : public Unit, public HasElements { + + public: + explicit UnnamedNamespaceDefinition( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kUnnamedNamespaceDefinition; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UnnamedNamespaceDefinition() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::UnnamedNamespaceDefinition"; +}; + +class NestedNamespaceDefinition : public Unit, public HasElements { + + public: + explicit NestedNamespaceDefinition( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kNestedNamespaceDefinition; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NestedNamespaceDefinition() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::NestedNamespaceDefinition"; +}; + +class EnclosingNamespaceSpecifier : public Unit, public HasElements { + + public: + explicit EnclosingNamespaceSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kEnclosingNamespaceSpecifier; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EnclosingNamespaceSpecifier() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::EnclosingNamespaceSpecifier"; +}; + +class NamespaceBody : public Unit, public HasElements { + + public: + explicit NamespaceBody(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNamespaceBody; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NamespaceBody() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NamespaceBody"; +}; + +class NamespaceAlias : public Unit, public HasElements { + + public: + explicit NamespaceAlias(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNamespaceAlias; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NamespaceAlias() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NamespaceAlias"; +}; + +class NamespaceAliasDefinition : public Unit, public HasElements { + + public: + explicit NamespaceAliasDefinition( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kNamespaceAliasDefinition; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NamespaceAliasDefinition() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::NamespaceAliasDefinition"; +}; + +class QualifiedNamespaceSpecifier : public Unit, public HasElements { + + public: + explicit QualifiedNamespaceSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kQualifiedNamespaceSpecifier; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~QualifiedNamespaceSpecifier() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::QualifiedNamespaceSpecifier"; +}; + +class UsingDirective : public Unit, public HasElements { + + public: + explicit UsingDirective(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUsingDirective; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UsingDirective() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UsingDirective"; +}; + +class UsingDeclaration : public Unit, public HasElements { + + public: + explicit UsingDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUsingDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UsingDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UsingDeclaration"; +}; + +class UsingDeclaratorList : public Unit, public HasElements { + + public: + explicit UsingDeclaratorList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUsingDeclaratorList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UsingDeclaratorList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UsingDeclaratorList"; +}; + +class UsingDeclarator : public Unit, public HasElements { + + public: + explicit UsingDeclarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUsingDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UsingDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UsingDeclarator"; +}; + +class AsmDeclaration : public Unit, public HasElements { + + public: + explicit AsmDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAsmDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AsmDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AsmDeclaration"; +}; + +class LinkageSpecification : public Unit, public HasElements { + + public: + explicit LinkageSpecification( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLinkageSpecification; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LinkageSpecification() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::LinkageSpecification"; +}; + +class AttributeSpecifierSeq : public Unit, public HasElements { + + public: + explicit AttributeSpecifierSeq( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kAttributeSpecifierSeq; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeSpecifierSeq() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::AttributeSpecifierSeq"; +}; + +class AttributeSpecifier : public Unit, public HasElements { + + public: + explicit AttributeSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttributeSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AttributeSpecifier"; +}; + +class AlignmentSpecifier : public Unit, public HasElements { + + public: + explicit AlignmentSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAlignmentSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AlignmentSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AlignmentSpecifier"; +}; + +class AttributeUsingPrefix : public Unit, public HasElements { + + public: + explicit AttributeUsingPrefix( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttributeUsingPrefix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeUsingPrefix() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::AttributeUsingPrefix"; +}; + +class AttributeList : public Unit, public HasElements { + + public: + explicit AttributeList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttributeList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AttributeList"; +}; + +class Attribute : public Unit, public HasElements { + + public: + explicit Attribute(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttribute; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Attribute() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Attribute"; +}; + +class AttributeToken : public Unit, public HasElements { + + public: + explicit AttributeToken(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttributeToken; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeToken() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AttributeToken"; +}; + +class AttributeScopedToken : public Unit, public HasElements { + + public: + explicit AttributeScopedToken( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttributeScopedToken; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeScopedToken() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::AttributeScopedToken"; +}; + +class AttributeNamespace : public Unit, public HasElements { + + public: + explicit AttributeNamespace( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAttributeNamespace; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeNamespace() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AttributeNamespace"; +}; + +class AttributeArgumentClause : public Unit, public HasElements { + + public: + explicit AttributeArgumentClause( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kAttributeArgumentClause; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AttributeArgumentClause() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::AttributeArgumentClause"; +}; + +class BalancedTokenSeq : public Unit, public HasElements { + + public: + explicit BalancedTokenSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBalancedTokenSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BalancedTokenSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BalancedTokenSeq"; +}; + +class BalancedToken : public Unit, public HasElements { + + public: + explicit BalancedToken(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBalancedToken; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BalancedToken() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BalancedToken"; +}; + +class ModuleDeclaration : public Unit, public HasElements { + + public: + explicit ModuleDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kModuleDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ModuleDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ModuleDeclaration"; +}; + +class ModuleName : public Unit, public HasElements { + + public: + explicit ModuleName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kModuleName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ModuleName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ModuleName"; +}; + +class ModulePartition : public Unit, public HasElements { + + public: + explicit ModulePartition(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kModulePartition; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ModulePartition() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ModulePartition"; +}; + +class ModuleNameQualifier : public Unit, public HasElements { + + public: + explicit ModuleNameQualifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kModuleNameQualifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ModuleNameQualifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ModuleNameQualifier"; +}; + +class ExportDeclaration : public Unit, public HasElements { + + public: + explicit ExportDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExportDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExportDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ExportDeclaration"; +}; + +class ModuleImportDeclaration : public Unit, public HasElements { + + public: + explicit ModuleImportDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kModuleImportDeclaration; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ModuleImportDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ModuleImportDeclaration"; +}; + +class GlobalModuleFragment : public Unit, public HasElements { + + public: + explicit GlobalModuleFragment( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kGlobalModuleFragment; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~GlobalModuleFragment() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::GlobalModuleFragment"; +}; + +class PrivateModuleFragment : public Unit, public HasElements { + + public: + explicit PrivateModuleFragment( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kPrivateModuleFragment; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PrivateModuleFragment() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::PrivateModuleFragment"; +}; + +class ClassName : public Unit, public HasElements { + + public: + explicit ClassName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kClassName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ClassName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ClassName"; +}; + +class ClassSpecifier : public Unit, public HasElements { + + public: + explicit ClassSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kClassSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ClassSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ClassSpecifier"; +}; + +class ClassHead : public Unit, public HasElements { + + public: + explicit ClassHead(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kClassHead; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ClassHead() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ClassHead"; +}; + +class ClassHeadName : public Unit, public HasElements { + + public: + explicit ClassHeadName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kClassHeadName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ClassHeadName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ClassHeadName"; +}; + +class ClassVirtSpecifier : public Unit, public HasElements { + + public: + explicit ClassVirtSpecifier( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kClassVirtSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ClassVirtSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ClassVirtSpecifier"; +}; + +class ClassKey : public Unit, public HasElements { + + public: + explicit ClassKey(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kClassKey; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ClassKey() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ClassKey"; +}; + +class MemberSpecification : public Unit, public HasElements { + + public: + explicit MemberSpecification( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kMemberSpecification; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MemberSpecification() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::MemberSpecification"; +}; + +class MemberDeclaration : public Unit, public HasElements { + + public: + explicit MemberDeclaration(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kMemberDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MemberDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::MemberDeclaration"; +}; + +class MemberDeclaratorList : public Unit, public HasElements { + + public: + explicit MemberDeclaratorList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kMemberDeclaratorList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MemberDeclaratorList() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::MemberDeclaratorList"; +}; + +class MemberDeclarator : public Unit, public HasElements { + + public: + explicit MemberDeclarator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kMemberDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MemberDeclarator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::MemberDeclarator"; +}; + +class VirtSpecifierSeq : public Unit, public HasElements { + + public: + explicit VirtSpecifierSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kVirtSpecifierSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~VirtSpecifierSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::VirtSpecifierSeq"; +}; + +class VirtSpecifier : public Unit, public HasElements { + + public: + explicit VirtSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kVirtSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~VirtSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::VirtSpecifier"; +}; + +class PureSpecifier : public Unit, public HasElements { + + public: + explicit PureSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPureSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PureSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PureSpecifier"; +}; + +class ConversionFunctionId : public Unit, public HasElements { + + public: + explicit ConversionFunctionId( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kConversionFunctionId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConversionFunctionId() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ConversionFunctionId"; +}; + +class ConversionTypeId : public Unit, public HasElements { + + public: + explicit ConversionTypeId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kConversionTypeId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConversionTypeId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ConversionTypeId"; +}; + +class ConversionDeclarator : public Unit, public HasElements { + + public: + explicit ConversionDeclarator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kConversionDeclarator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConversionDeclarator() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ConversionDeclarator"; +}; + +class BaseClause : public Unit, public HasElements { + + public: + explicit BaseClause(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBaseClause; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BaseClause() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BaseClause"; +}; + +class BaseSpecifierList : public Unit, public HasElements { + + public: + explicit BaseSpecifierList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBaseSpecifierList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BaseSpecifierList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BaseSpecifierList"; +}; + +class BaseSpecifier : public Unit, public HasElements { + + public: + explicit BaseSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBaseSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BaseSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BaseSpecifier"; +}; + +class ClassOrDecltype : public Unit, public HasElements { + + public: + explicit ClassOrDecltype(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kClassOrDecltype; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ClassOrDecltype() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ClassOrDecltype"; +}; + +class AccessSpecifier : public Unit, public HasElements { + + public: + explicit AccessSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kAccessSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~AccessSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::AccessSpecifier"; +}; + +class CtorInitializer : public Unit, public HasElements { + + public: + explicit CtorInitializer(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCtorInitializer; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CtorInitializer() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CtorInitializer"; +}; + +class MemInitializerList : public Unit, public HasElements { + + public: + explicit MemInitializerList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kMemInitializerList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MemInitializerList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::MemInitializerList"; +}; + +class MemInitializer : public Unit, public HasElements { + + public: + explicit MemInitializer(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kMemInitializer; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MemInitializer() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::MemInitializer"; +}; + +class MemInitializerId : public Unit, public HasElements { + + public: + explicit MemInitializerId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kMemInitializerId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~MemInitializerId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::MemInitializerId"; +}; + +class OperatorFunctionId : public Unit, public HasElements { + + public: + explicit OperatorFunctionId( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kOperatorFunctionId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~OperatorFunctionId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::OperatorFunctionId"; +}; + +class TheOperator : public Unit, public HasElements { + + public: + explicit TheOperator(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTheOperator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TheOperator() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TheOperator"; +}; + +class LiteralOperatorId : public Unit, public HasElements { + + public: + explicit LiteralOperatorId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLiteralOperatorId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LiteralOperatorId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LiteralOperatorId"; +}; + +class TemplateDeclaration : public Unit, public HasElements { + + public: + explicit TemplateDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTemplateDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateDeclaration() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TemplateDeclaration"; +}; + +class TemplateHead : public Unit, public HasElements { + + public: + explicit TemplateHead(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTemplateHead; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateHead() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TemplateHead"; +}; + +class TemplateParameterList : public Unit, public HasElements { + + public: + explicit TemplateParameterList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kTemplateParameterList; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateParameterList() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::TemplateParameterList"; +}; + +class RequiresClause : public Unit, public HasElements { + + public: + explicit RequiresClause(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRequiresClause; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RequiresClause() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::RequiresClause"; +}; + +class ConstraintLogicalOrExpression : public Unit, public HasElements { + + public: + explicit ConstraintLogicalOrExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kConstraintLogicalOrExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConstraintLogicalOrExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ConstraintLogicalOrExpression"; +}; + +class ConstraintLogicalAndExpression : public Unit, public HasElements { + + public: + explicit ConstraintLogicalAndExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kConstraintLogicalAndExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConstraintLogicalAndExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ConstraintLogicalAndExpression"; +}; + +class TemplateParameter : public Unit, public HasElements { + + public: + explicit TemplateParameter(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTemplateParameter; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateParameter() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TemplateParameter"; +}; + +class TypeParameter : public Unit, public HasElements { + + public: + explicit TypeParameter(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeParameter; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeParameter() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeParameter"; +}; + +class TypeParameterKey : public Unit, public HasElements { + + public: + explicit TypeParameterKey(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeParameterKey; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeParameterKey() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeParameterKey"; +}; + +class TypeConstraint : public Unit, public HasElements { + + public: + explicit TypeConstraint(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypeConstraint; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypeConstraint() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypeConstraint"; +}; + +class SimpleTemplateId : public Unit, public HasElements { + + public: + explicit SimpleTemplateId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSimpleTemplateId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SimpleTemplateId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SimpleTemplateId"; +}; + +class TemplateId : public Unit, public HasElements { + + public: + explicit TemplateId(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTemplateId; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateId() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TemplateId"; +}; + +class TemplateName : public Unit, public HasElements { + + public: + explicit TemplateName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTemplateName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TemplateName"; +}; + +class TemplateArgumentList : public Unit, public HasElements { + + public: + explicit TemplateArgumentList( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTemplateArgumentList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateArgumentList() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::TemplateArgumentList"; +}; + +class TemplateArgument : public Unit, public HasElements { + + public: + explicit TemplateArgument(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTemplateArgument; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TemplateArgument() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TemplateArgument"; +}; + +class ConstraintExpression : public Unit, public HasElements { + + public: + explicit ConstraintExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kConstraintExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConstraintExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ConstraintExpression"; +}; + +class DeductionGuide : public Unit, public HasElements { + + public: + explicit DeductionGuide(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDeductionGuide; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DeductionGuide() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DeductionGuide"; +}; + +class ConceptDefinition : public Unit, public HasElements { + + public: + explicit ConceptDefinition(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kConceptDefinition; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConceptDefinition() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ConceptDefinition"; +}; + +class ConceptName : public Unit, public HasElements { + + public: + explicit ConceptName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kConceptName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConceptName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ConceptName"; +}; + +class TypenameSpecifier : public Unit, public HasElements { + + public: + explicit TypenameSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTypenameSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TypenameSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TypenameSpecifier"; +}; + +class ExplicitInstantiation : public Unit, public HasElements { + + public: + explicit ExplicitInstantiation( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kExplicitInstantiation; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExplicitInstantiation() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ExplicitInstantiation"; +}; + +class ExplicitSpecialization : public Unit, public HasElements { + + public: + explicit ExplicitSpecialization( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kExplicitSpecialization; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExplicitSpecialization() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ExplicitSpecialization"; +}; + +class TryBlock : public Unit, public HasElements { + + public: + explicit TryBlock(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTryBlock; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TryBlock() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TryBlock"; +}; + +class FunctionTryBlock : public Unit, public HasElements { + + public: + explicit FunctionTryBlock(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFunctionTryBlock; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FunctionTryBlock() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::FunctionTryBlock"; +}; + +class HandlerSeq : public Unit, public HasElements { + + public: + explicit HandlerSeq(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHandlerSeq; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HandlerSeq() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HandlerSeq"; +}; + +class Handler : public Unit, public HasElements { + + public: + explicit Handler(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHandler; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Handler() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Handler"; +}; + +class ExceptionDeclaration : public Unit, public HasElements { + + public: + explicit ExceptionDeclaration( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExceptionDeclaration; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExceptionDeclaration() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ExceptionDeclaration"; +}; + +class NoexceptSpecifier : public Unit, public HasElements { + + public: + explicit NoexceptSpecifier(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNoexceptSpecifier; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NoexceptSpecifier() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NoexceptSpecifier"; +}; + +class PreprocessingFile : public Unit, public HasElements { + + public: + explicit PreprocessingFile(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPreprocessingFile; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PreprocessingFile() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PreprocessingFile"; +}; + +class ModuleFile : public Unit, public HasElements { + + public: + explicit ModuleFile(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kModuleFile; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ModuleFile() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ModuleFile"; +}; + +class PpGlobalModuleFragment : public Unit, public HasElements { + + public: + explicit PpGlobalModuleFragment( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kPpGlobalModuleFragment; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PpGlobalModuleFragment() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::PpGlobalModuleFragment"; +}; + +class PpPrivateModuleFragment : public Unit, public HasElements { + + public: + explicit PpPrivateModuleFragment( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kPpPrivateModuleFragment; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PpPrivateModuleFragment() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::PpPrivateModuleFragment"; +}; + +class Group : public Unit, public HasElements { + + public: + explicit Group(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kGroup; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Group() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Group"; +}; + +class GroupPart : public Unit, public HasElements { + + public: + explicit GroupPart(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kGroupPart; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~GroupPart() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::GroupPart"; +}; + +class ControlLine : public Unit, public HasElements { + + public: + explicit ControlLine(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kControlLine; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ControlLine() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ControlLine"; +}; + +class IfSection : public Unit, public HasElements { + + public: + explicit IfSection(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kIfSection; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~IfSection() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::IfSection"; +}; + +class IfGroup : public Unit, public HasElements { + + public: + explicit IfGroup(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kIfGroup; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~IfGroup() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::IfGroup"; +}; + +class ElifGroups : public Unit, public HasElements { + + public: + explicit ElifGroups(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kElifGroups; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ElifGroups() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ElifGroups"; +}; + +class ElifGroup : public Unit, public HasElements { + + public: + explicit ElifGroup(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kElifGroup; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ElifGroup() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ElifGroup"; +}; + +class ElseGroup : public Unit, public HasElements { + + public: + explicit ElseGroup(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kElseGroup; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ElseGroup() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ElseGroup"; +}; + +class EndifLine : public Unit, public HasElements { + + public: + explicit EndifLine(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEndifLine; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EndifLine() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EndifLine"; +}; + +class TextLine : public Unit, public HasElements { + + public: + explicit TextLine(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kTextLine; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~TextLine() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::TextLine"; +}; + +class ConditionallySupportedDirective : public Unit, public HasElements { + + public: + explicit ConditionallySupportedDirective( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kConditionallySupportedDirective; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ConditionallySupportedDirective() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::ConditionallySupportedDirective"; +}; + +class Lparen : public Unit, public HasElements { + + public: + explicit Lparen(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLparen; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Lparen() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Lparen"; +}; + +class IdentifierList : public Unit, public HasElements { + + public: + explicit IdentifierList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kIdentifierList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~IdentifierList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::IdentifierList"; +}; + +class ReplacementList : public Unit, public HasElements { + + public: + explicit ReplacementList(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kReplacementList; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ReplacementList() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ReplacementList"; +}; + +class PpTokens : public Unit, public HasElements { + + public: + explicit PpTokens(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPpTokens; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PpTokens() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PpTokens"; +}; + +class NewLine : public Unit, public HasElements { + + public: + explicit NewLine(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNewLine; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NewLine() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NewLine"; +}; + +class DefinedMacroExpression : public Unit, public HasElements { + + public: + explicit DefinedMacroExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kDefinedMacroExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DefinedMacroExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::DefinedMacroExpression"; +}; + +class HPreprocessingToken : public Unit, public HasElements { + + public: + explicit HPreprocessingToken( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHPreprocessingToken; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HPreprocessingToken() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HPreprocessingToken"; +}; + +class HPpTokens : public Unit, public HasElements { + + public: + explicit HPpTokens(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHPpTokens; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HPpTokens() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HPpTokens"; +}; + +class HeaderNameTokens : public Unit, public HasElements { + + public: + explicit HeaderNameTokens(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHeaderNameTokens; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HeaderNameTokens() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HeaderNameTokens"; +}; + +class HasIncludeExpression : public Unit, public HasElements { + + public: + explicit HasIncludeExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHasIncludeExpression; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HasIncludeExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::HasIncludeExpression"; +}; + +class HasAttributeExpression : public Unit, public HasElements { + + public: + explicit HasAttributeExpression( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kHasAttributeExpression; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HasAttributeExpression() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::HasAttributeExpression"; +}; + +class PpModule : public Unit, public HasElements { + + public: + explicit PpModule(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPpModule; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PpModule() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PpModule"; +}; + +class PpImport : public Unit, public HasElements { + + public: + explicit PpImport(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPpImport; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PpImport() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PpImport"; +}; + +class VaOptReplacement : public Unit, public HasElements { + + public: + explicit VaOptReplacement(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kVaOptReplacement; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~VaOptReplacement() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::VaOptReplacement"; +}; + +class HexQuad : public Unit, public HasElements { + + public: + explicit HexQuad(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHexQuad; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HexQuad() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HexQuad"; +}; + +class UniversalCharacterName : public Unit, public HasElements { + + public: + explicit UniversalCharacterName( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kUniversalCharacterName; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UniversalCharacterName() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::UniversalCharacterName"; +}; + +class PreprocessingToken : public Unit, public HasElements { + + public: + explicit PreprocessingToken( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPreprocessingToken; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PreprocessingToken() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PreprocessingToken"; +}; + +class Token : public Unit, public HasElements { + + public: + explicit Token(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kToken; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Token() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Token"; +}; + +class HeaderName : public Unit, public HasElements { + + public: + explicit HeaderName(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHeaderName; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HeaderName() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HeaderName"; +}; + +class HCharSequence : public Unit, public HasElements { + + public: + explicit HCharSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHCharSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HCharSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HCharSequence"; +}; + +class HChar : public Unit, public HasElements { + + public: + explicit HChar(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHChar; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HChar() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HChar"; +}; + +class QCharSequence : public Unit, public HasElements { + + public: + explicit QCharSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kQCharSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~QCharSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::QCharSequence"; +}; + +class QChar : public Unit, public HasElements { + + public: + explicit QChar(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kQChar; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~QChar() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::QChar"; +}; + +class PpNumber : public Unit, public HasElements { + + public: + explicit PpNumber(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPpNumber; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PpNumber() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PpNumber"; +}; + +class IdentifierNondigit : public Unit, public HasElements { + + public: + explicit IdentifierNondigit( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kIdentifierNondigit; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~IdentifierNondigit() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::IdentifierNondigit"; +}; + +class Nondigit : public Unit, public HasElements { + + public: + explicit Nondigit(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNondigit; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Nondigit() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Nondigit"; +}; + +class Digit : public Unit, public HasElements { + + public: + explicit Digit(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDigit; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Digit() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Digit"; +}; + +class Keyword : public Unit, public HasElements { + + public: + explicit Keyword(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kKeyword; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Keyword() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Keyword"; +}; + +class PreprocessingOpOrPunc : public Unit, public HasElements { + + public: + explicit PreprocessingOpOrPunc( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kPreprocessingOpOrPunc; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PreprocessingOpOrPunc() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::PreprocessingOpOrPunc"; +}; + +class PreprocessingOperator : public Unit, public HasElements { + + public: + explicit PreprocessingOperator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = parser::details::ParseFunctionKind::kPreprocessingOperator; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PreprocessingOperator() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::PreprocessingOperator"; +}; + +class OperatorOrPunctuator : public Unit, public HasElements { + + public: + explicit OperatorOrPunctuator( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kOperatorOrPunctuator; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~OperatorOrPunctuator() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::OperatorOrPunctuator"; +}; + +class Literal : public Unit, public HasElements { + + public: + explicit Literal(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLiteral; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Literal() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Literal"; +}; + +class BinaryDigit : public Unit, public HasElements { + + public: + explicit BinaryDigit(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBinaryDigit; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BinaryDigit() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BinaryDigit"; +}; + +class OctalDigit : public Unit, public HasElements { + + public: + explicit OctalDigit(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kOctalDigit; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~OctalDigit() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::OctalDigit"; +}; + +class NonzeroDigit : public Unit, public HasElements { + + public: + explicit NonzeroDigit(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kNonzeroDigit; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~NonzeroDigit() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::NonzeroDigit"; +}; + +class HexadecimalPrefix : public Unit, public HasElements { + + public: + explicit HexadecimalPrefix(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHexadecimalPrefix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HexadecimalPrefix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HexadecimalPrefix"; +}; + +class HexadecimalDigitSequence : public Unit, public HasElements { + + public: + explicit HexadecimalDigitSequence( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kHexadecimalDigitSequence; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HexadecimalDigitSequence() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::HexadecimalDigitSequence"; +}; + +class HexadecimalDigit : public Unit, public HasElements { + + public: + explicit HexadecimalDigit(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kHexadecimalDigit; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HexadecimalDigit() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::HexadecimalDigit"; +}; + +class IntegerSuffix : public Unit, public HasElements { + + public: + explicit IntegerSuffix(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kIntegerSuffix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~IntegerSuffix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::IntegerSuffix"; +}; + +class UnsignedSuffix : public Unit, public HasElements { + + public: + explicit UnsignedSuffix(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUnsignedSuffix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UnsignedSuffix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UnsignedSuffix"; +}; + +class LongSuffix : public Unit, public HasElements { + + public: + explicit LongSuffix(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLongSuffix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LongSuffix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LongSuffix"; +}; + +class LongLongSuffix : public Unit, public HasElements { + + public: + explicit LongLongSuffix(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kLongLongSuffix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~LongLongSuffix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::LongLongSuffix"; +}; + +class EncodingPrefix : public Unit, public HasElements { + + public: + explicit EncodingPrefix(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEncodingPrefix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EncodingPrefix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EncodingPrefix"; +}; + +class CCharSequence : public Unit, public HasElements { + + public: + explicit CCharSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCCharSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CCharSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CCharSequence"; +}; + +class CChar : public Unit, public HasElements { + + public: + explicit CChar(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kCChar; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~CChar() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::CChar"; +}; + +class EscapeSequence : public Unit, public HasElements { + + public: + explicit EscapeSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kEscapeSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~EscapeSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::EscapeSequence"; +}; + +class SimpleEscapeSequence : public Unit, public HasElements { + + public: + explicit SimpleEscapeSequence( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSimpleEscapeSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SimpleEscapeSequence() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::SimpleEscapeSequence"; +}; + +class OctalEscapeSequence : public Unit, public HasElements { + + public: + explicit OctalEscapeSequence( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kOctalEscapeSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~OctalEscapeSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::OctalEscapeSequence"; +}; + +class HexadecimalEscapeSequence : public Unit, public HasElements { + + public: + explicit HexadecimalEscapeSequence( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kHexadecimalEscapeSequence; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HexadecimalEscapeSequence() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::HexadecimalEscapeSequence"; +}; + +class DecimalFloatingPointLiteral : public Unit, public HasElements { + + public: + explicit DecimalFloatingPointLiteral( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kDecimalFloatingPointLiteral; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DecimalFloatingPointLiteral() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::DecimalFloatingPointLiteral"; +}; + +class HexadecimalFloatingPointLiteral : public Unit, public HasElements { + + public: + explicit HexadecimalFloatingPointLiteral( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kHexadecimalFloatingPointLiteral; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HexadecimalFloatingPointLiteral() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::HexadecimalFloatingPointLiteral"; +}; + +class FractionalConstant : public Unit, public HasElements { + + public: + explicit FractionalConstant( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFractionalConstant; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FractionalConstant() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::FractionalConstant"; +}; + +class HexadecimalFractionalConstant : public Unit, public HasElements { + + public: + explicit HexadecimalFractionalConstant( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { + this->kind_ = + parser::details::ParseFunctionKind::kHexadecimalFractionalConstant; + } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~HexadecimalFractionalConstant() override = default; + + private: + constexpr static const char* kTag = + "lps::sema::details::HexadecimalFractionalConstant"; +}; + +class ExponentPart : public Unit, public HasElements { + + public: + explicit ExponentPart(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kExponentPart; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~ExponentPart() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::ExponentPart"; +}; + +class BinaryExponentPart : public Unit, public HasElements { + + public: + explicit BinaryExponentPart( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBinaryExponentPart; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BinaryExponentPart() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BinaryExponentPart"; +}; + +class Sign : public Unit, public HasElements { + + public: + explicit Sign(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSign; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~Sign() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::Sign"; +}; + +class DigitSequence : public Unit, public HasElements { + + public: + explicit DigitSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDigitSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DigitSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DigitSequence"; +}; + +class FloatingPointSuffix : public Unit, public HasElements { + + public: + explicit FloatingPointSuffix( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kFloatingPointSuffix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~FloatingPointSuffix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::FloatingPointSuffix"; +}; + +class SCharSequence : public Unit, public HasElements { + + public: + explicit SCharSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSCharSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SCharSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SCharSequence"; +}; + +class SChar : public Unit, public HasElements { + + public: + explicit SChar(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kSChar; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~SChar() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::SChar"; +}; + +class RCharSequence : public Unit, public HasElements { + + public: + explicit RCharSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRCharSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RCharSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::RCharSequence"; +}; + +class RChar : public Unit, public HasElements { + + public: + explicit RChar(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kRChar; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~RChar() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::RChar"; +}; + +class DCharSequence : public Unit, public HasElements { + + public: + explicit DCharSequence(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDCharSequence; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DCharSequence() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DCharSequence"; +}; + +class DChar : public Unit, public HasElements { + + public: + explicit DChar(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kDChar; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~DChar() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::DChar"; +}; + +class BooleanLiteral : public Unit, public HasElements { + + public: + explicit BooleanLiteral(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kBooleanLiteral; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~BooleanLiteral() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::BooleanLiteral"; +}; + +class PointerLiteral : public Unit, public HasElements { + + public: + explicit PointerLiteral(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kPointerLiteral; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~PointerLiteral() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::PointerLiteral"; +}; + +class UserDefinedLiteral : public Unit, public HasElements { + + public: + explicit UserDefinedLiteral( + basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUserDefinedLiteral; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UserDefinedLiteral() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UserDefinedLiteral"; +}; + +class UdSuffix : public Unit, public HasElements { + + public: + explicit UdSuffix(basic::Vector<2, std::unique_ptr>&& elements) + : HasElements(std::move(elements)) { + { this->kind_ = parser::details::ParseFunctionKind::kUdSuffix; } + } + void build() override { LPS_ERROR(kTag, "not implemented"); } + void check() override { LPS_ERROR(kTag, "not implemented"); } + ~UdSuffix() override = default; + + private: + constexpr static const char* kTag = "lps::sema::details::UdSuffix"; }; -} // namespace lps::sema::details +} // namespace lps::sema::details::unit diff --git a/src/constant_expression.cc b/src/constant_expression.cc index 7685137..8813bdc 100644 --- a/src/constant_expression.cc +++ b/src/constant_expression.cc @@ -24,6 +24,7 @@ #include "ast.h" #include "lex/pp.h" #include "parse_function/function.h" +#include "sema.h" namespace lps::lexer::details::pp { @@ -62,13 +63,7 @@ bool Preprocessing::lex_conditional_expression( // run optimization passes tree = parser::details::opt::run(tree); - // now, check whether all the leaf tokens are constant - auto leafs = tree.leafs(); - for (const auto& leaf : leafs) { - if (!leaf->is_number_literal()) { - return false; - } - } + auto units = sema::Factory::create(tree.root()); int dummy = -1; } diff --git a/src/sema.cc b/src/sema.cc index be7f4f2..cfd342a 100644 --- a/src/sema.cc +++ b/src/sema.cc @@ -25,6 +25,7 @@ #include #include "basic/exception.h" #include "basic/vec.h" +#include "semantic_unit/unit.h" #include "token.h" namespace lps::sema { @@ -34,343 +35,1843 @@ std::unique_ptr Factory::create( lps_assert(kTag, node.valid()); - if (node.kind_ == parser::details::ParseFunctionKind::kUnknown) { + if (node.kind_ == parser::details::ParseFunctionKind::kExpectedToken) { return create_by_token(node); } - basic::Vector<2, std::unique_ptr> elements( - node.children_.size(), nullptr); + basic::Vector<2, std::unique_ptr> elements; int32_t idx = 0; for (const auto& child : node.children_) { - elements[idx++] = std::move(create(node)); + elements.append(std::move(create(child))); } switch (node.kind_) { + + case parser::details::ParseFunctionKind::kTranslationUnit: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPrimaryExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kIdExpression: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUnqualifiedId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kQualifiedId: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNestedNameSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLambdaExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLambdaIntroducer: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLambdaDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLambdaCapture: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCaptureDefault: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCaptureList: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCapture: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSimpleCapture: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInitCapture: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFoldExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFoldOperator: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRequiresExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRequirementParameterList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRequirementBody: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRequirementSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRequirement: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSimpleRequirement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeRequirement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCompoundRequirement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kReturnTypeRequirement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNestedRequirement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPostfixExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExpressionList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUnaryExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUnaryOperator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAwaitExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNoexceptExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNewExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNewPlacement: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNewTypeId: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNewDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNoptrNewDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNewInitializer: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeleteExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCastExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPmExpression: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMultiplicativeExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAdditiveExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kShiftExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCompareExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRelationalExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEqualityExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAndExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExclusiveOrExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInclusiveOrExpression: { + return std::make_unique( + std::move(elements)); + break; + } + case parser::details::ParseFunctionKind::kLogicalAndExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLogicalOrExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConditionalExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kYieldExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kThrowExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAssignmentExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAssignmentOperator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExpression: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConstantExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kStatement: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInitStatement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCondition: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLabeledStatement: { + return std::make_unique( + std::move(elements)); + break; + } + case parser::details::ParseFunctionKind::kExpressionStatement: { + return std::make_unique( + std::move(elements)); break; } - case parser::details::ParseFunctionKind::kUnknown: - case parser::details::ParseFunctionKind::kExpectedToken: - case parser::details::ParseFunctionKind::kTranslationUnit: - case parser::details::ParseFunctionKind::kPrimaryExpression: - case parser::details::ParseFunctionKind::kIdExpression: - case parser::details::ParseFunctionKind::kUnqualifiedId: - case parser::details::ParseFunctionKind::kQualifiedId: - case parser::details::ParseFunctionKind::kNestedNameSpecifier: - case parser::details::ParseFunctionKind::kLambdaExpression: - case parser::details::ParseFunctionKind::kLambdaIntroducer: - case parser::details::ParseFunctionKind::kLambdaDeclarator: - case parser::details::ParseFunctionKind::kLambdaCapture: - case parser::details::ParseFunctionKind::kCaptureDefault: - case parser::details::ParseFunctionKind::kCaptureList: - case parser::details::ParseFunctionKind::kCapture: - case parser::details::ParseFunctionKind::kSimpleCapture: - case parser::details::ParseFunctionKind::kInitCapture: - case parser::details::ParseFunctionKind::kFoldExpression: - case parser::details::ParseFunctionKind::kFoldOperator: - case parser::details::ParseFunctionKind::kRequiresExpression: - case parser::details::ParseFunctionKind::kRequirementParameterList: - case parser::details::ParseFunctionKind::kRequirementBody: - case parser::details::ParseFunctionKind::kRequirementSeq: - case parser::details::ParseFunctionKind::kRequirement: - case parser::details::ParseFunctionKind::kSimpleRequirement: - case parser::details::ParseFunctionKind::kTypeRequirement: - case parser::details::ParseFunctionKind::kCompoundRequirement: - case parser::details::ParseFunctionKind::kReturnTypeRequirement: - case parser::details::ParseFunctionKind::kNestedRequirement: - case parser::details::ParseFunctionKind::kPostfixExpression: - case parser::details::ParseFunctionKind::kExpressionList: - case parser::details::ParseFunctionKind::kUnaryExpression: - case parser::details::ParseFunctionKind::kUnaryOperator: - case parser::details::ParseFunctionKind::kAwaitExpression: - case parser::details::ParseFunctionKind::kNoexceptExpression: - case parser::details::ParseFunctionKind::kNewExpression: - case parser::details::ParseFunctionKind::kNewPlacement: - case parser::details::ParseFunctionKind::kNewTypeId: - case parser::details::ParseFunctionKind::kNewDeclarator: - case parser::details::ParseFunctionKind::kNoptrNewDeclarator: - case parser::details::ParseFunctionKind::kNewInitializer: - case parser::details::ParseFunctionKind::kDeleteExpression: - case parser::details::ParseFunctionKind::kCastExpression: - case parser::details::ParseFunctionKind::kPmExpression: - case parser::details::ParseFunctionKind::kMultiplicativeExpression: - case parser::details::ParseFunctionKind::kAdditiveExpression: - case parser::details::ParseFunctionKind::kShiftExpression: - case parser::details::ParseFunctionKind::kCompareExpression: - case parser::details::ParseFunctionKind::kRelationalExpression: - case parser::details::ParseFunctionKind::kEqualityExpression: - case parser::details::ParseFunctionKind::kAndExpression: - case parser::details::ParseFunctionKind::kExclusiveOrExpression: - case parser::details::ParseFunctionKind::kInclusiveOrExpression: - case parser::details::ParseFunctionKind::kLogicalOrExpression: - case parser::details::ParseFunctionKind::kConditionalExpression: - case parser::details::ParseFunctionKind::kYieldExpression: - case parser::details::ParseFunctionKind::kThrowExpression: - case parser::details::ParseFunctionKind::kAssignmentExpression: - case parser::details::ParseFunctionKind::kAssignmentOperator: - case parser::details::ParseFunctionKind::kExpression: - case parser::details::ParseFunctionKind::kConstantExpression: - case parser::details::ParseFunctionKind::kStatement: - case parser::details::ParseFunctionKind::kInitStatement: - case parser::details::ParseFunctionKind::kCondition: - case parser::details::ParseFunctionKind::kLabeledStatement: - case parser::details::ParseFunctionKind::kExpressionStatement: - case parser::details::ParseFunctionKind::kCompoundStatement: - case parser::details::ParseFunctionKind::kStatementSeq: - case parser::details::ParseFunctionKind::kSelectionStatement: - case parser::details::ParseFunctionKind::kIterationStatement: - case parser::details::ParseFunctionKind::kForRangeDeclaration: - case parser::details::ParseFunctionKind::kForRangeInitializer: - case parser::details::ParseFunctionKind::kJumpStatement: - case parser::details::ParseFunctionKind::kCoroutineReturnStatement: - case parser::details::ParseFunctionKind::kDeclarationStatement: - case parser::details::ParseFunctionKind::kDeclarationSeq: - case parser::details::ParseFunctionKind::kDeclaration: - case parser::details::ParseFunctionKind::kBlockDeclaration: - case parser::details::ParseFunctionKind::kNodeclspecFunctionDeclaration: - case parser::details::ParseFunctionKind::kAliasDeclaration: - case parser::details::ParseFunctionKind::kSimpleDeclaration: - case parser::details::ParseFunctionKind::kStaticAssertDeclaration: - case parser::details::ParseFunctionKind::kEmptyDeclaration: - case parser::details::ParseFunctionKind::kAttributeDeclaration: - case parser::details::ParseFunctionKind::kDeclSpecifier: - case parser::details::ParseFunctionKind::kDeclSpecifierSeq: - case parser::details::ParseFunctionKind::kStorageClassSpecifier: - case parser::details::ParseFunctionKind::kFunctionSpecifier: - case parser::details::ParseFunctionKind::kExplicitSpecifier: - case parser::details::ParseFunctionKind::kTypedefName: - case parser::details::ParseFunctionKind::kTypeSpecifier: - case parser::details::ParseFunctionKind::kTypeSpecifierSeq: - case parser::details::ParseFunctionKind::kDefiningTypeSpecifier: - case parser::details::ParseFunctionKind::kDefiningTypeSpecifierSeq: - case parser::details::ParseFunctionKind::kSimpleTypeSpecifier: - case parser::details::ParseFunctionKind::kTypeName: - case parser::details::ParseFunctionKind::kElaboratedTypeSpecifier: - case parser::details::ParseFunctionKind::kElaboratedEnumSpecifier: - case parser::details::ParseFunctionKind::kDecltypeSpecifier: - case parser::details::ParseFunctionKind::kPlaceholderTypeSpecifier: - case parser::details::ParseFunctionKind::kInitDeclaratorList: - case parser::details::ParseFunctionKind::kInitDeclarator: - case parser::details::ParseFunctionKind::kDeclarator: - case parser::details::ParseFunctionKind::kPtrDeclarator: - case parser::details::ParseFunctionKind::kNoptrDeclarator: - case parser::details::ParseFunctionKind::kParametersAndQualifiers: - case parser::details::ParseFunctionKind::kTrailingReturnType: - case parser::details::ParseFunctionKind::kPtrOperator: - case parser::details::ParseFunctionKind::kCvQualifierSeq: - case parser::details::ParseFunctionKind::kCvQualifier: - case parser::details::ParseFunctionKind::kRefQualifier: - case parser::details::ParseFunctionKind::kDeclaratorId: - case parser::details::ParseFunctionKind::kTypeId: - case parser::details::ParseFunctionKind::kDefiningTypeId: - case parser::details::ParseFunctionKind::kAbstractDeclarator: - case parser::details::ParseFunctionKind::kPtrAbstractDeclarator: - case parser::details::ParseFunctionKind::kNoptrAbstractDeclarator: - case parser::details::ParseFunctionKind::kAbstractPackDeclarator: - case parser::details::ParseFunctionKind::kNoptrAbstractPackDeclarator: - case parser::details::ParseFunctionKind::kParameterDeclarationClause: - case parser::details::ParseFunctionKind::kParameterDeclarationList: - case parser::details::ParseFunctionKind::kParameterDeclaration: - case parser::details::ParseFunctionKind::kInitializer: - case parser::details::ParseFunctionKind::kBraceOrEqualInitializer: - case parser::details::ParseFunctionKind::kInitializerClause: - case parser::details::ParseFunctionKind::kBracedInitList: - case parser::details::ParseFunctionKind::kInitializerList: - case parser::details::ParseFunctionKind::kDesignatedInitializerList: - case parser::details::ParseFunctionKind::kDesignatedInitializerClause: - case parser::details::ParseFunctionKind::kDesignator: - case parser::details::ParseFunctionKind::kExprOrBracedInitList: - case parser::details::ParseFunctionKind::kFunctionDefinition: - case parser::details::ParseFunctionKind::kFunctionBody: - case parser::details::ParseFunctionKind::kEnumName: - case parser::details::ParseFunctionKind::kEnumSpecifier: - case parser::details::ParseFunctionKind::kEnumHead: - case parser::details::ParseFunctionKind::kEnumHeadName: - case parser::details::ParseFunctionKind::kOpaqueEnumDeclaration: - case parser::details::ParseFunctionKind::kEnumKey: - case parser::details::ParseFunctionKind::kEnumBase: - case parser::details::ParseFunctionKind::kEnumeratorList: - case parser::details::ParseFunctionKind::kEnumeratorDefinition: - case parser::details::ParseFunctionKind::kEnumerator: - case parser::details::ParseFunctionKind::kUsingEnumDeclaration: - case parser::details::ParseFunctionKind::kNamespaceName: - case parser::details::ParseFunctionKind::kNamespaceDefinition: - case parser::details::ParseFunctionKind::kNamedNamespaceDefinition: - case parser::details::ParseFunctionKind::kUnnamedNamespaceDefinition: - case parser::details::ParseFunctionKind::kNestedNamespaceDefinition: - case parser::details::ParseFunctionKind::kEnclosingNamespaceSpecifier: - case parser::details::ParseFunctionKind::kNamespaceBody: - case parser::details::ParseFunctionKind::kNamespaceAlias: - case parser::details::ParseFunctionKind::kNamespaceAliasDefinition: - case parser::details::ParseFunctionKind::kQualifiedNamespaceSpecifier: - case parser::details::ParseFunctionKind::kUsingDirective: - case parser::details::ParseFunctionKind::kUsingDeclaration: - case parser::details::ParseFunctionKind::kUsingDeclaratorList: - case parser::details::ParseFunctionKind::kUsingDeclarator: - case parser::details::ParseFunctionKind::kAsmDeclaration: - case parser::details::ParseFunctionKind::kLinkageSpecification: - case parser::details::ParseFunctionKind::kAttributeSpecifierSeq: - case parser::details::ParseFunctionKind::kAttributeSpecifier: - case parser::details::ParseFunctionKind::kAlignmentSpecifier: - case parser::details::ParseFunctionKind::kAttributeUsingPrefix: - case parser::details::ParseFunctionKind::kAttributeList: - case parser::details::ParseFunctionKind::kAttribute: - case parser::details::ParseFunctionKind::kAttributeToken: - case parser::details::ParseFunctionKind::kAttributeScopedToken: - case parser::details::ParseFunctionKind::kAttributeNamespace: - case parser::details::ParseFunctionKind::kAttributeArgumentClause: - case parser::details::ParseFunctionKind::kBalancedTokenSeq: - case parser::details::ParseFunctionKind::kBalancedToken: - case parser::details::ParseFunctionKind::kModuleDeclaration: - case parser::details::ParseFunctionKind::kModuleName: - case parser::details::ParseFunctionKind::kModulePartition: - case parser::details::ParseFunctionKind::kModuleNameQualifier: - case parser::details::ParseFunctionKind::kExportDeclaration: - case parser::details::ParseFunctionKind::kModuleImportDeclaration: - case parser::details::ParseFunctionKind::kGlobalModuleFragment: - case parser::details::ParseFunctionKind::kPrivateModuleFragment: - case parser::details::ParseFunctionKind::kClassName: - case parser::details::ParseFunctionKind::kClassSpecifier: - case parser::details::ParseFunctionKind::kClassHead: - case parser::details::ParseFunctionKind::kClassHeadName: - case parser::details::ParseFunctionKind::kClassVirtSpecifier: - case parser::details::ParseFunctionKind::kClassKey: - case parser::details::ParseFunctionKind::kMemberSpecification: - case parser::details::ParseFunctionKind::kMemberDeclaration: - case parser::details::ParseFunctionKind::kMemberDeclaratorList: - case parser::details::ParseFunctionKind::kMemberDeclarator: - case parser::details::ParseFunctionKind::kVirtSpecifierSeq: - case parser::details::ParseFunctionKind::kVirtSpecifier: - case parser::details::ParseFunctionKind::kPureSpecifier: - case parser::details::ParseFunctionKind::kConversionFunctionId: - case parser::details::ParseFunctionKind::kConversionTypeId: - case parser::details::ParseFunctionKind::kConversionDeclarator: - case parser::details::ParseFunctionKind::kBaseClause: - case parser::details::ParseFunctionKind::kBaseSpecifierList: - case parser::details::ParseFunctionKind::kBaseSpecifier: - case parser::details::ParseFunctionKind::kClassOrDecltype: - case parser::details::ParseFunctionKind::kAccessSpecifier: - case parser::details::ParseFunctionKind::kCtorInitializer: - case parser::details::ParseFunctionKind::kMemInitializerList: - case parser::details::ParseFunctionKind::kMemInitializer: - case parser::details::ParseFunctionKind::kMemInitializerId: - case parser::details::ParseFunctionKind::kOperatorFunctionId: - case parser::details::ParseFunctionKind::kTheOperator: - case parser::details::ParseFunctionKind::kLiteralOperatorId: - case parser::details::ParseFunctionKind::kTemplateDeclaration: - case parser::details::ParseFunctionKind::kTemplateHead: - case parser::details::ParseFunctionKind::kTemplateParameterList: - case parser::details::ParseFunctionKind::kRequiresClause: - case parser::details::ParseFunctionKind::kConstraintLogicalOrExpression: - case parser::details::ParseFunctionKind::kConstraintLogicalAndExpression: - case parser::details::ParseFunctionKind::kTemplateParameter: - case parser::details::ParseFunctionKind::kTypeParameter: - case parser::details::ParseFunctionKind::kTypeParameterKey: - case parser::details::ParseFunctionKind::kTypeConstraint: - case parser::details::ParseFunctionKind::kSimpleTemplateId: - case parser::details::ParseFunctionKind::kTemplateId: - case parser::details::ParseFunctionKind::kTemplateName: - case parser::details::ParseFunctionKind::kTemplateArgumentList: - case parser::details::ParseFunctionKind::kTemplateArgument: - case parser::details::ParseFunctionKind::kConstraintExpression: - case parser::details::ParseFunctionKind::kDeductionGuide: - case parser::details::ParseFunctionKind::kConceptDefinition: - case parser::details::ParseFunctionKind::kConceptName: - case parser::details::ParseFunctionKind::kTypenameSpecifier: - case parser::details::ParseFunctionKind::kExplicitInstantiation: - case parser::details::ParseFunctionKind::kExplicitSpecialization: - case parser::details::ParseFunctionKind::kTryBlock: - case parser::details::ParseFunctionKind::kFunctionTryBlock: - case parser::details::ParseFunctionKind::kHandlerSeq: - case parser::details::ParseFunctionKind::kHandler: - case parser::details::ParseFunctionKind::kExceptionDeclaration: - case parser::details::ParseFunctionKind::kNoexceptSpecifier: - case parser::details::ParseFunctionKind::kPreprocessingFile: - case parser::details::ParseFunctionKind::kModuleFile: - case parser::details::ParseFunctionKind::kPpGlobalModuleFragment: - case parser::details::ParseFunctionKind::kPpPrivateModuleFragment: - case parser::details::ParseFunctionKind::kGroup: - case parser::details::ParseFunctionKind::kGroupPart: - case parser::details::ParseFunctionKind::kControlLine: - case parser::details::ParseFunctionKind::kIfSection: - case parser::details::ParseFunctionKind::kIfGroup: - case parser::details::ParseFunctionKind::kElifGroups: - case parser::details::ParseFunctionKind::kElifGroup: - case parser::details::ParseFunctionKind::kElseGroup: - case parser::details::ParseFunctionKind::kEndifLine: - case parser::details::ParseFunctionKind::kTextLine: - case parser::details::ParseFunctionKind::kConditionallySupportedDirective: - case parser::details::ParseFunctionKind::kLparen: - case parser::details::ParseFunctionKind::kIdentifierList: - case parser::details::ParseFunctionKind::kReplacementList: - case parser::details::ParseFunctionKind::kPpTokens: - case parser::details::ParseFunctionKind::kNewLine: - case parser::details::ParseFunctionKind::kDefinedMacroExpression: - case parser::details::ParseFunctionKind::kHPreprocessingToken: - case parser::details::ParseFunctionKind::kHPpTokens: - case parser::details::ParseFunctionKind::kHeaderNameTokens: - case parser::details::ParseFunctionKind::kHasIncludeExpression: - case parser::details::ParseFunctionKind::kHasAttributeExpression: - case parser::details::ParseFunctionKind::kPpModule: - case parser::details::ParseFunctionKind::kPpImport: - case parser::details::ParseFunctionKind::kVaOptReplacement: - case parser::details::ParseFunctionKind::kHexQuad: - case parser::details::ParseFunctionKind::kUniversalCharacterName: - case parser::details::ParseFunctionKind::kPreprocessingToken: - case parser::details::ParseFunctionKind::kToken: - case parser::details::ParseFunctionKind::kHeaderName: - case parser::details::ParseFunctionKind::kHCharSequence: - case parser::details::ParseFunctionKind::kHChar: - case parser::details::ParseFunctionKind::kQCharSequence: - case parser::details::ParseFunctionKind::kQChar: - case parser::details::ParseFunctionKind::kPpNumber: - case parser::details::ParseFunctionKind::kIdentifierNondigit: - case parser::details::ParseFunctionKind::kNondigit: - case parser::details::ParseFunctionKind::kDigit: - case parser::details::ParseFunctionKind::kKeyword: - case parser::details::ParseFunctionKind::kPreprocessingOpOrPunc: - case parser::details::ParseFunctionKind::kPreprocessingOperator: - case parser::details::ParseFunctionKind::kOperatorOrPunctuator: - case parser::details::ParseFunctionKind::kLiteral: - case parser::details::ParseFunctionKind::kBinaryDigit: - case parser::details::ParseFunctionKind::kOctalDigit: - case parser::details::ParseFunctionKind::kNonzeroDigit: - case parser::details::ParseFunctionKind::kHexadecimalPrefix: - case parser::details::ParseFunctionKind::kHexadecimalDigitSequence: - case parser::details::ParseFunctionKind::kHexadecimalDigit: - case parser::details::ParseFunctionKind::kIntegerSuffix: - case parser::details::ParseFunctionKind::kUnsignedSuffix: - case parser::details::ParseFunctionKind::kLongSuffix: - case parser::details::ParseFunctionKind::kLongLongSuffix: - case parser::details::ParseFunctionKind::kEncodingPrefix: - case parser::details::ParseFunctionKind::kCCharSequence: - case parser::details::ParseFunctionKind::kCChar: - case parser::details::ParseFunctionKind::kEscapeSequence: - case parser::details::ParseFunctionKind::kSimpleEscapeSequence: - case parser::details::ParseFunctionKind::kOctalEscapeSequence: - case parser::details::ParseFunctionKind::kHexadecimalEscapeSequence: - case parser::details::ParseFunctionKind::kDecimalFloatingPointLiteral: - case parser::details::ParseFunctionKind::kHexadecimalFloatingPointLiteral: - case parser::details::ParseFunctionKind::kFractionalConstant: - case parser::details::ParseFunctionKind::kHexadecimalFractionalConstant: - case parser::details::ParseFunctionKind::kExponentPart: - case parser::details::ParseFunctionKind::kBinaryExponentPart: - case parser::details::ParseFunctionKind::kSign: - case parser::details::ParseFunctionKind::kDigitSequence: - case parser::details::ParseFunctionKind::kFloatingPointSuffix: - case parser::details::ParseFunctionKind::kSCharSequence: - case parser::details::ParseFunctionKind::kSChar: - case parser::details::ParseFunctionKind::kRCharSequence: - case parser::details::ParseFunctionKind::kRChar: - case parser::details::ParseFunctionKind::kDCharSequence: - case parser::details::ParseFunctionKind::kDChar: - case parser::details::ParseFunctionKind::kBooleanLiteral: - case parser::details::ParseFunctionKind::kPointerLiteral: - case parser::details::ParseFunctionKind::kUserDefinedLiteral: - case parser::details::ParseFunctionKind::kUdSuffix: - case parser::details::ParseFunctionKind::kNum: + case parser::details::ParseFunctionKind::kCompoundStatement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kStatementSeq: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSelectionStatement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kIterationStatement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kForRangeDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kForRangeInitializer: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kJumpStatement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCoroutineReturnStatement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeclarationStatement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeclarationSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeclaration: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBlockDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNodeclspecFunctionDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAliasDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSimpleDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kStaticAssertDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEmptyDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeclSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeclSpecifierSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kStorageClassSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFunctionSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExplicitSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypedefName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeSpecifierSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDefiningTypeSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDefiningTypeSpecifierSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSimpleTypeSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kElaboratedTypeSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kElaboratedEnumSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDecltypeSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPlaceholderTypeSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInitDeclaratorList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInitDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeclarator: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPtrDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNoptrDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kParametersAndQualifiers: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTrailingReturnType: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPtrOperator: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCvQualifierSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCvQualifier: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRefQualifier: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeclaratorId: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeId: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDefiningTypeId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAbstractDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPtrAbstractDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNoptrAbstractDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAbstractPackDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNoptrAbstractPackDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kParameterDeclarationClause: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kParameterDeclarationList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kParameterDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInitializer: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBraceOrEqualInitializer: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInitializerClause: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBracedInitList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kInitializerList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDesignatedInitializerList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDesignatedInitializerClause: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDesignator: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExprOrBracedInitList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFunctionDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFunctionBody: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumHead: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumHeadName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kOpaqueEnumDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumKey: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumBase: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumeratorList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumeratorDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnumerator: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUsingEnumDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNamespaceName: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNamespaceDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNamedNamespaceDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUnnamedNamespaceDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNestedNamespaceDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEnclosingNamespaceSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNamespaceBody: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNamespaceAlias: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNamespaceAliasDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kQualifiedNamespaceSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUsingDirective: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUsingDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUsingDeclaratorList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUsingDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAsmDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLinkageSpecification: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeSpecifierSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAlignmentSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeUsingPrefix: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttribute: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeToken: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeScopedToken: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeNamespace: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAttributeArgumentClause: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBalancedTokenSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBalancedToken: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kModuleDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kModuleName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kModulePartition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kModuleNameQualifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExportDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kModuleImportDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kGlobalModuleFragment: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPrivateModuleFragment: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kClassName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kClassSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kClassHead: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kClassHeadName: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kClassVirtSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kClassKey: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMemberSpecification: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMemberDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMemberDeclaratorList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMemberDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kVirtSpecifierSeq: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kVirtSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPureSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConversionFunctionId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConversionTypeId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConversionDeclarator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBaseClause: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBaseSpecifierList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBaseSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kClassOrDecltype: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kAccessSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCtorInitializer: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMemInitializerList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMemInitializer: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kMemInitializerId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kOperatorFunctionId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTheOperator: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLiteralOperatorId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateHead: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateParameterList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRequiresClause: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConstraintLogicalOrExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConstraintLogicalAndExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateParameter: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeParameter: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeParameterKey: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypeConstraint: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSimpleTemplateId: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateId: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateArgumentList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTemplateArgument: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConstraintExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDeductionGuide: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConceptDefinition: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConceptName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTypenameSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExplicitInstantiation: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExplicitSpecialization: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTryBlock: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFunctionTryBlock: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHandlerSeq: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHandler: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExceptionDeclaration: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNoexceptSpecifier: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPreprocessingFile: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kModuleFile: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPpGlobalModuleFragment: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPpPrivateModuleFragment: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kGroup: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kGroupPart: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kControlLine: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kIfSection: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kIfGroup: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kElifGroups: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kElifGroup: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kElseGroup: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEndifLine: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kTextLine: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kConditionallySupportedDirective: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLparen: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kIdentifierList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kReplacementList: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPpTokens: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNewLine: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDefinedMacroExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHPreprocessingToken: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHPpTokens: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHeaderNameTokens: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHasIncludeExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHasAttributeExpression: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPpModule: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPpImport: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kVaOptReplacement: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHexQuad: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUniversalCharacterName: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPreprocessingToken: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kToken: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHeaderName: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHCharSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHChar: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kQCharSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kQChar: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPpNumber: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kIdentifierNondigit: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNondigit: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDigit: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kKeyword: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPreprocessingOpOrPunc: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPreprocessingOperator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kOperatorOrPunctuator: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLiteral: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBinaryDigit: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kOctalDigit: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kNonzeroDigit: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHexadecimalPrefix: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHexadecimalDigitSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHexadecimalDigit: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kIntegerSuffix: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUnsignedSuffix: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLongSuffix: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kLongLongSuffix: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEncodingPrefix: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCCharSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kCChar: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kEscapeSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSimpleEscapeSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kOctalEscapeSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHexadecimalEscapeSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDecimalFloatingPointLiteral: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHexadecimalFloatingPointLiteral: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFractionalConstant: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kHexadecimalFractionalConstant: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kExponentPart: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBinaryExponentPart: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSign: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDigitSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kFloatingPointSuffix: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSCharSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kSChar: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRCharSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kRChar: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDCharSequence: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kDChar: { + return std::make_unique(std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kBooleanLiteral: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kPointerLiteral: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUserDefinedLiteral: { + return std::make_unique( + std::move(elements)); + break; + } + + case parser::details::ParseFunctionKind::kUdSuffix: { + return std::make_unique(std::move(elements)); + break; + } + + default: LPS_ERROR(kTag, "not support yet: ", node.kind_); break; }