Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Fri, 10 May 2024 22:07:38 UTC Commit: acb4678486110d90dd46eb6dea336f5907cafb14 https://github.com/geany/geany/commit/acb4678486110d90dd46eb6dea336f5907cafb...
Log Message: ----------- Map freepascal namespaces and add a unit test for them
Modified Paths: -------------- src/tagmanager/tm_parser.c tests/ctags/Makefile.am tests/ctags/namespace.bas tests/ctags/namespace.bas.tags tests/meson.build
Modified: src/tagmanager/tm_parser.c 5 lines changed, 3 insertions(+), 2 deletions(-) =================================================================== @@ -562,13 +562,14 @@ static TMParserMapEntry map_FREEBASIC[] = { {'t', tm_tag_struct_t}, // type {'v', tm_tag_variable_t}, // variable {'g', tm_tag_externvar_t}, // enum - {'n', tm_tag_undef_t}, // namespace + {'n', tm_tag_package_t}, // namespace }; static TMParserMapGroup group_FREEBASIC[] = { + {N_("Namespaces"), TM_ICON_NAMESPACE, tm_tag_package_t}, {N_("Functions"), TM_ICON_METHOD, tm_tag_function_t}, {N_("Variables"), TM_ICON_VAR, tm_tag_variable_t | tm_tag_externvar_t}, {N_("Constants"), TM_ICON_MACRO, tm_tag_macro_t}, - {N_("Types"), TM_ICON_NAMESPACE, tm_tag_struct_t}, + {N_("Types"), TM_ICON_STRUCT, tm_tag_struct_t}, {N_("Labels"), TM_ICON_MEMBER, tm_tag_namespace_t}, };
Modified: tests/ctags/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -249,6 +249,7 @@ test_sources = \ mode.php \ moniker.x68.asm \ namelist.f \ + namespace.bas \ namespace.cpp \ namespaces2.php \ namespaces.php \
Modified: tests/ctags/namespace.bas 15 lines changed, 15 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,15 @@ +namespace first 'first defines something' + sub first_func + end sub + + namespace second 'second defines something' + sub first_func 'oh a second first_func + end sub + + sub second_func + end sub + end namespace 'ignored' +end namespace + +sub first_func 'oh another first_func +end sub
Modified: tests/ctags/namespace.bas.tags 12 lines changed, 12 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,12 @@ +first�512�0 +package: first +first_func�16�0 +function: first_func +first_func�16�first�0 +function: first :: first_func +first_func�16�first.second�0 +function: first.second :: first_func +second�512�first�0 +package: first :: second +second_func�16�first.second�0 +function: first.second :: second_func
Modified: tests/meson.build 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -246,6 +246,7 @@ ctags_tests = files([ 'ctags/mode.php.tags', 'ctags/moniker.x68.asm.tags', 'ctags/namelist.f.tags', + 'ctags/namespace.bas.tags', 'ctags/namespace.cpp.tags', 'ctags/namespaces2.php.tags', 'ctags/namespaces.php.tags',
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).