Fortran: fix handling of pointer association operator
Test case contributed by Adam Hirst, thanks. Closes #1030.
This commit is contained in:
parent
1c0fa99e1d
commit
7d76063282
@ -1371,7 +1371,8 @@ static void parseEntityDecl (tokenInfo *const token)
|
||||
readToken (token);
|
||||
skipPast (token, TOKEN_OPERATOR);
|
||||
}
|
||||
else if (strcmp (vStringValue (token->string), "=") == 0)
|
||||
else if (strcmp (vStringValue (token->string), "=") == 0 ||
|
||||
strcmp (vStringValue (token->string), "=>") == 0)
|
||||
{
|
||||
while (! isType (token, TOKEN_COMMA) &&
|
||||
! isType (token, TOKEN_STATEMENT_END))
|
||||
|
@ -193,6 +193,7 @@ test_sources = \
|
||||
Package.pm \
|
||||
php5_5_class_kw.php \
|
||||
procedure_pointer_module.f90 \
|
||||
procpoint.f90 \
|
||||
property.cs \
|
||||
prototype.h \
|
||||
pure_elem.f95 \
|
||||
|
32
tests/ctags/procpoint.f90
Normal file
32
tests/ctags/procpoint.f90
Normal file
@ -0,0 +1,32 @@
|
||||
module Test
|
||||
implicit none
|
||||
|
||||
procedure(ProcOne), pointer :: MyProc => null(), &
|
||||
MyOtherProc => ProcTwo
|
||||
real, parameter :: myparameter
|
||||
|
||||
contains
|
||||
|
||||
function ProcOne(arg1, optformat)
|
||||
! not relevant
|
||||
end function ProcOne
|
||||
|
||||
function ProcTwo(arg1, optformat)
|
||||
! not relevant
|
||||
end function ProcTwo
|
||||
|
||||
end module Test
|
||||
|
||||
program Main
|
||||
implicit none
|
||||
|
||||
! deliberately break up the line to make sure the tagparser doesn't choke on awkward cases
|
||||
procedure(:), pointer :: ProcPointOne &
|
||||
=> null(), ProcPointTwo => &
|
||||
null()
|
||||
real :: variable, variable_two
|
||||
integer :: variable_three
|
||||
|
||||
ProcPointOne => ProcTwo
|
||||
|
||||
end program Main
|
13
tests/ctags/procpoint.f90.tags
Normal file
13
tests/ctags/procpoint.f90.tags
Normal file
@ -0,0 +1,13 @@
|
||||
# format=tagmanager
|
||||
MainÌ512Ö0
|
||||
MyOtherProcÌ16384ÎTestÖ0
|
||||
MyProcÌ16384ÎTestÖ0
|
||||
ProcOneÌ16ÎTestÖ0
|
||||
ProcPointOneÌ16384ÎMainÖ0
|
||||
ProcPointTwoÌ16384ÎMainÖ0
|
||||
ProcTwoÌ16ÎTestÖ0
|
||||
TestÌ256Ö0
|
||||
myparameterÌ16384ÎTestÖ0
|
||||
variableÌ16384ÎMainÖ0
|
||||
variable_threeÌ16384ÎMainÖ0
|
||||
variable_twoÌ16384ÎMainÖ0
|
Loading…
x
Reference in New Issue
Block a user