1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16// Autogenerated file -- DO NOT EDIT!
17// NOLINTBEGIN(readability-identifier-naming)
18
19% Es2pandaLibApi::ast_nodes&.each do |ast_node|
20% if ast_node != "AstNode" && ast_node != "TypeNode"
21    bool (*Is<%= ast_node %>)(es2panda_AstNode *ast);
22% end
23% end
24
25% Es2pandaLibApi::scopes&.each do |scope|
26% if scope != "Scope"
27    bool (*ScopeIs<%= scope %>)(es2panda_Scope *scope);
28% end
29% end
30
31% Es2pandaLibApi::ast_types&.each do |type|
32% if type != "Type"
33    bool (*TypeIs<%= type %>)(es2panda_Type *type);
34% end
35% end
36
37% Es2pandaLibApi::ast_variables&.each do |variable|
38% if variable[1] != "Variable"
39    bool (*VariableIs<%= variable[1] %>)(es2panda_Variable *variable);
40% end
41% end
42
43    char const *(*AstNodeName)(es2panda_AstNode *ast);
44
45% Es2pandaLibApi::classes&.each do |className, classData|
46% classData.class_constructors&.each_with_index do |constructor, index|
47    <%= classData.constructor_type().lib_type_to_str() %>(*Create<%= className + "#{index}" %>)(es2panda_Context *context<%=
48    constructor["args"]&.map { |arg| if arg.lib_args_to_str.strip() != ""
49     then ", " + arg.lib_args_to_str end}&.join("") %>);
50
51% if classData.updater_allowed()
52    <%= classData.constructor_type().lib_type_to_str() %>(*Update<%= className + "#{index}" %>)(es2panda_Context *context, es2panda_AstNode *original<%=
53    constructor["args"]&.map { |arg| if arg.lib_args_to_str.strip() != ""
54     then ", " + arg.lib_args_to_str end}&.join("") %>);
55% end   # Updater end
56% end
57
58% classData.class_methods&.each_with_index do |method_info, index|
59    <%= method_info["const"] %> <%= method_info["return_type"].lib_type_to_str %>(*<%=
60    className + method_info["overload_name"] %>)(
61    es2panda_Context *context<%= if classData.call_cast["call_var"]
62then ", " + classData.call_cast["call_var"] end %><%=
63    method_info["args"]&.map { |arg| if arg.lib_args_to_str.strip() != "" then ", " + arg.lib_args_to_str end}&.join("")
64    %><%= method_info["return_arg_to_str"] %>);
65
66% end
67
68% end
69
70// NOLINTEND(readability-identifier-naming)
71