From 324acb731c1df25256159b658b7b283d45ba6e4d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 19 Apr 2024 23:48:03 +0200 Subject: [PATCH] fix: File format and update schema and readme --- README.md | 1 + src/clang_function_visitor.rs | 2 +- src/schema.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a9c9b3..c79a379 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ SELECT DISTINCT name AS function_name FROM functions | is_static | Boolean | Return ture if a C++ member function is static. | | is_const | Boolean | Return ture if a C++ member function is const. | | has_template | Boolean | True if it's has template | +| access_modifier | Integer | Returns the access control level for method, 1 for public, 2 protected, 3 provide, 0 for invalid. | --- diff --git a/src/clang_function_visitor.rs b/src/clang_function_visitor.rs index ba6af04..f20902e 100644 --- a/src/clang_function_visitor.rs +++ b/src/clang_function_visitor.rs @@ -119,7 +119,7 @@ extern "C" fn visit_children( is_static, is_const, has_template, - access_modifier + access_modifier, }); clang_disposeString(cursor_name); diff --git a/src/schema.rs b/src/schema.rs index 660d538..cb730fd 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -16,6 +16,7 @@ lazy_static! { map.insert("is_static", DataType::Boolean); map.insert("is_const", DataType::Boolean); map.insert("has_template", DataType::Boolean); + map.insert("access_modifier", DataType::Integer); map }; } @@ -37,6 +38,7 @@ lazy_static! { "is_static", "is_const", "has_template", + "access_modifier", ], ); map