Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 23 Feb 2014 19:13:36 UTC Commit: d8954bbf67d575883a3fb3687e776cb92793d88c https://github.com/geany/geany/commit/d8954bbf67d575883a3fb3687e776cb92793d8...
Log Message: ----------- Fortran: add support for "len" and "kind" qualifiers
Test cases contributed by Adam Hirst, thanks.
Modified Paths: -------------- tagmanager/ctags/fortran.c tests/ctags/Makefile.am tests/ctags/members.f90 tests/ctags/members.f90.tags tests/ctags/qualified_types.f90 tests/ctags/qualified_types.f90.tags
Modified: tagmanager/ctags/fortran.c 6 files changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -100,6 +100,8 @@ KEYWORD_intent, KEYWORD_interface, KEYWORD_intrinsic, + KEYWORD_kind, + KEYWORD_len, KEYWORD_logical, KEYWORD_map, KEYWORD_module, @@ -280,6 +282,8 @@ { "intent", KEYWORD_intent }, { "interface", KEYWORD_interface }, { "intrinsic", KEYWORD_intrinsic }, + { "kind", KEYWORD_kind }, + { "len", KEYWORD_len }, { "logical", KEYWORD_logical }, { "map", KEYWORD_map }, { "module", KEYWORD_module }, @@ -1331,6 +1335,8 @@ static void parseQualifierSpecList (tokenInfo *const token) case KEYWORD_allocatable: case KEYWORD_external: case KEYWORD_intrinsic: + case KEYWORD_kind: + case KEYWORD_len: case KEYWORD_optional: case KEYWORD_private: case KEYWORD_pointer:
Modified: tests/ctags/Makefile.am 2 files changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -179,6 +179,7 @@ test_sources = \ matlab_backtracking.m \ matlab_test.m \ maze.erl \ + members.f90 \ misc_types.f90 \ misc_types.f \ mode.php \ @@ -202,6 +203,7 @@ test_sources = \ prototype.h \ pure_elem.f95 \ py_constructor_arglist.py \ + qualified_types.f90 \ random.sql \ readlob.sql \ readlong.sql \
Modified: tests/ctags/members.f90 19 files changed, 19 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,19 @@ +module Members + implicit none + + type HasMembers + ! a "derived type" in Fortran is analagous to a "class" in other languages + integer, kind :: kind_member + integer, len :: len_member + integer :: member + contains + procedure :: MyMethod + end type HasMembers + +contains + + subroutine MySubroutine(arg) + ! ... + end subroutine MySubroutine + +end module Members
Modified: tests/ctags/members.f90.tags 8 files changed, 8 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,8 @@ +# format=tagmanager +HasMembersÌ1ÎMembersÖ0 +MembersÌ256Ö0 +MyMethodÌ64ÎHasMembersÖ0 +MySubroutineÌ128ÎMembersÖ0 +kind_memberÌ64ÎHasMembersÖ0 +len_memberÌ64ÎHasMembersÖ0 +memberÌ64ÎHasMembersÖ0
Modified: tests/ctags/qualified_types.f90 12 files changed, 12 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,12 @@ +module test + implicit none + type goodtype(p1, p2, p3, p4) ! the stuff in brackets after the name of the type shouldn't appear in the type's name + ! this is already correctly handled, so that's fine + integer, kind :: p1, p3 + integer, len :: p2, p4 ! the question is whether or not these "kind" and "len"s should be shown as members + real(kind=p1) :: c1 + character(len=p2) :: c2 + complex :: c3(p3) + integer :: c4 = p1 +contains +end module test
Modified: tests/ctags/qualified_types.f90.tags 11 files changed, 11 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,11 @@ +# format=tagmanager +c1フ64ホgoodtypeヨ0 +c2フ64ホgoodtypeヨ0 +c3フ64ホgoodtypeヨ0 +c4フ64ホgoodtypeヨ0 +goodtypeフ1ホtestヨ0 +p1フ64ホgoodtypeヨ0 +p2フ64ホgoodtypeヨ0 +p3フ64ホgoodtypeヨ0 +p4フ64ホgoodtypeヨ0 +testフ256ヨ0
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).