Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add is_variadic to method #56

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cxx-parser/cxx/terra/include/terra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ namespace terra
method.is_overriding = cppast::is_overriding(cpp_member_function.virtual_info());
method.is_const = cpp_member_function.cv_qualifier() == cppast::cpp_cv::cpp_cv_const;
method.signature = cpp_member_function.signature();
method.is_variadic = cpp_member_function.is_variadic();
}

void parse_constructor(
Expand Down Expand Up @@ -1169,6 +1170,7 @@ namespace terra
json["is_overriding"] = node->is_overriding;
json["is_const"] = node->is_const;
json["signature"] = node->signature;
json["is_variadic"] = node->is_variadic;
}

void Variable2Json(Variable *node, nlohmann::json &json)
Expand Down
3 changes: 2 additions & 1 deletion cxx-parser/cxx/terra/include/terra_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ namespace terra
bool is_overriding;
bool is_const;
std::string signature;
bool is_variadic;
} MemberFunction;
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(MemberFunction, name, is_virtual, return_type, parameters, access_specifier, is_overriding, signature, namespaces, file_path);
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(MemberFunction, name, is_virtual, return_type, parameters, access_specifier, is_overriding, signature, is_variadic, namespaces, file_path);

typedef struct MemberVariable : BaseNode
{
Expand Down
1 change: 1 addition & 0 deletions cxx-parser/src/cxx_terra_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export class MemberFunction extends CXXTerraNode {
is_overriding: boolean = false;
is_const: boolean = false;
signature: string = '';
is_variadic: boolean = false;

override get fullName(): string {
return `${this.parent?.fullName}.${this.name}`;
Expand Down
Loading