Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 13 May 2024 20:20:49 UTC Commit: 77614bd228aaba187faaef3631d127f231fce1f4 https://github.com/geany/geany/commit/77614bd228aaba187faaef3631d127f231fce1...
Log Message: ----------- Map PowerShell classes and enums
Modified Paths: -------------- src/tagmanager/tm_parser.c tests/ctags/Makefile.am tests/ctags/class.ps1 tests/ctags/class.ps1.tags tests/ctags/enum.ps1 tests/ctags/enum.ps1.tags tests/meson.build
Modified: src/tagmanager/tm_parser.c 6 lines changed, 4 insertions(+), 2 deletions(-) =================================================================== @@ -948,12 +948,14 @@ static TMParserMapGroup group_JSON[] = { static TMParserMapEntry map_POWERSHELL[] = { {'f', tm_tag_function_t}, // function {'v', tm_tag_variable_t}, // variable - {'c', tm_tag_undef_t}, // class + {'c', tm_tag_class_t}, // class {'i', tm_tag_function_t}, // filter - {'g', tm_tag_undef_t}, // enum + {'g', tm_tag_enum_t}, // enum }; static TMParserMapGroup group_POWERSHELL[] = { + {N_("Classes"), TM_ICON_CLASS, tm_tag_class_t}, {N_("Functions"), TM_ICON_METHOD, tm_tag_function_t}, + {N_("Enums"), TM_ICON_STRUCT, tm_tag_enum_t}, {N_("Variables"), TM_ICON_VAR, tm_tag_variable_t}, };
Modified: tests/ctags/Makefile.am 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -128,6 +128,7 @@ test_sources = \ case_sensitivity.php \ char-selector.f90 \ classes.php \ + class.ps1 \ cobol/helloworld.cbl \ cobol/helloworld2.cbl \ cobol/levels.cbl \ @@ -165,6 +166,7 @@ test_sources = \ enum.c \ enum.f90 \ enum.java \ + enum.ps1 \ enumerators.f90 \ events.cs \ extern_variable.h \
Modified: tests/ctags/class.ps1 29 lines changed, 29 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,29 @@ +class MyException : Exception { + MyException([String]$Message) : base([String]$Message) { + Write-Host "dummy" + } +} + +class Derived : Base { +} + +class Derived2: Base { +} + +class Foo { + $Property1 + $Property2 = 20 + Method($Arg1) { + $LocalVar1 = 100 + Write-Host "dummy" + } +} + +function GetBar { + $LocalVar2 = 200 + Write-Host "dummy" +} + +function GetBaz() { + Write-Host "dummy" +}
Modified: tests/ctags/class.ps1.tags 12 lines changed, 12 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,12 @@ +Derived�1�0 +class: Derived +Derived2�1�0 +class: Derived2 +Foo�1�0 +class: Foo +GetBar�16�0 +function: GetBar +GetBaz�16�()�0 +function: GetBaz() +MyException�1�0 +class: MyException
Modified: tests/ctags/enum.ps1 23 lines changed, 23 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,23 @@ +# EnumName1 +enum EnumName1 { + Label11 + Label12 = 10 +} + +# EnumName2 +enum EnumName2 { + Label21 + Label22 = 20 +} + +# EnumName3 +Enum EnumName3 { + Label31 + Label32 = 30 +} + +# EnumName4 +[Flags()] enum EnumName4 { + Label41 + Label42 = 40 +}
Modified: tests/ctags/enum.ps1.tags 8 lines changed, 8 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,8 @@ +EnumName1�2�0 +enum: EnumName1 +EnumName2�2�0 +enum: EnumName2 +EnumName3�2�0 +enum: EnumName3 +EnumName4�2�0 +enum: EnumName4
Modified: tests/meson.build 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -128,6 +128,7 @@ ctags_tests = files([ 'ctags/case_sensitivity.php.tags', 'ctags/char-selector.f90.tags', 'ctags/classes.php.tags', + 'ctags/class.ps1.tags', 'ctags/cobol/helloworld.cbl.tags', 'ctags/cobol/helloworld2.cbl.tags', 'ctags/cobol/levels.cbl.tags', @@ -165,6 +166,7 @@ ctags_tests = files([ 'ctags/enum.c.tags', 'ctags/enum.f90.tags', 'ctags/enum.java.tags', + 'ctags/enum.ps1.tags', 'ctags/enumerators.f90.tags', 'ctags/events.cs.tags', 'ctags/extern_variable.h.tags',
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).