Skip to content

Commit

Permalink
Merge branch 'aphirst/patch-1'
Browse files Browse the repository at this point in the history
Closes PR#209.
  • Loading branch information
b4n committed Feb 14, 2014
2 parents df9a1b1 + e1b115e commit f22c028
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tagmanager/ctags/fortran.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ typedef enum eKeywordId {
KEYWORD_NONE = -1,
KEYWORD_allocatable,
KEYWORD_assignment,
KEYWORD_associate,
KEYWORD_automatic,
KEYWORD_block,
KEYWORD_byte,
Expand Down Expand Up @@ -230,6 +231,7 @@ static const keywordDesc FortranKeywordTable [] = {
/* keyword keyword ID */
{ "allocatable", KEYWORD_allocatable },
{ "assignment", KEYWORD_assignment },
{ "associate", KEYWORD_associate },
{ "automatic", KEYWORD_automatic },
{ "block", KEYWORD_block },
{ "byte", KEYWORD_byte },
Expand Down Expand Up @@ -2052,7 +2054,8 @@ static boolean parseExecutionPart (tokenInfo *const token)
isSecondaryKeyword (token, KEYWORD_if) ||
isSecondaryKeyword (token, KEYWORD_select) ||
isSecondaryKeyword (token, KEYWORD_where) ||
isSecondaryKeyword (token, KEYWORD_forall))
isSecondaryKeyword (token, KEYWORD_forall) ||
isSecondaryKeyword (token, KEYWORD_associate))
{
skipToNextStatement (token);
result = TRUE;
Expand Down
1 change: 1 addition & 0 deletions tests/ctags/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ test_sources = \
extern_variable.h \
forall_module.f90 \
format.pl \
fortran_associate.f90 \
func_typedef.h \
general.cs \
hex2dec.sql \
Expand Down
20 changes: 20 additions & 0 deletions tests/ctags/fortran_associate.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module with_associate
real :: a

contains

function do_stuff(a) result(c)
real, intent(in) :: a

associate (b => a)
c = b
end associate
end function do_stuff

subroutine do_other_stuff(a)
real, intent(in out) :: a

a = 2 * a
end subroutine do_other_stuff

end module with_associate
5 changes: 5 additions & 0 deletions tests/ctags/fortran_associate.f90.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# format=tagmanager
a�16384�with_associate�0
do_other_stuff�64�with_associate�0
do_stuff�16�with_associate�0
with_associate�256�0

0 comments on commit f22c028

Please sign in to comment.