Hi everyone,
I've made myself some folding markers for Fortran which look like this :
foldingStartMarker = '(^[\t ]*((?i:real|complex|integer)(.*)\s)*\b (?i:subroutine|program|module|function)\b(.*)$)|(^\s*\b(\w*)\s*:\s* \b(?i:do)\b|^\s*\b(?i:do)\b)|(^\s*(\b(?i:IF)\b)(.*)(\b(?i:THEN)\b))|(^\s* \b(\w*)\s*:\s*(\b(?i:IF)\b)(.*)(\b(?i:THEN)\b))'; foldingStopMarker = '^\s*\b(?i:end\sprogram|end\sfunction| end\ssubroutine|end\smodule|endif|enddo|end\sif|end\sdo)\b';
They seem to work quite allright except for the old-fashioned do-loop of Fortran 77 which reads :
do 10 i=1,10 some code here ....... 10 continue
Note that the “continue” statement which ends the loop has the label “10” which matches the loop one. I've no idea how to implement folding markers for this syntax and any help is appreciated :)
TIA