/src/WasmEdge/lib/validator/validator_component.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // SPDX-License-Identifier: Apache-2.0 |
2 | | // SPDX-FileCopyrightText: 2019-2024 Second State INC |
3 | | #include "validator/validator_component.h" |
4 | | #include "common/spdlog.h" |
5 | | |
6 | | #include <variant> |
7 | | |
8 | | namespace WasmEdge { |
9 | | namespace Validator { |
10 | | |
11 | | using namespace std::literals; |
12 | | using namespace AST::Component; |
13 | | |
14 | 0 | Expect<void> Validator::validate(const AST::Component::Component &Comp) { |
15 | 0 | spdlog::warn("Component Model Validation is in active development."sv); |
16 | |
|
17 | 0 | ComponentContextGuard guard(Comp, Ctx); |
18 | 0 | for (auto &Sec : Comp.getSections()) { |
19 | 0 | EXPECTED_TRY(std::visit(SectionVisitor{*this, Ctx}, Sec)); |
20 | 0 | } |
21 | | |
22 | 0 | return {}; |
23 | 0 | } |
24 | | |
25 | | } // namespace Validator |
26 | | } // namespace WasmEdge |