diff --git a/fortls/regex_patterns.py b/fortls/regex_patterns.py index 46cc5d28..a48b7685 100644 --- a/fortls/regex_patterns.py +++ b/fortls/regex_patterns.py @@ -40,7 +40,7 @@ class FortranRegularExpressions: SUBMOD: Pattern = compile(r"[ ]*SUBMODULE[ ]*\(", I) END_SMOD: Pattern = compile(r"SUBMODULE", I) END_PRO: Pattern = compile(r"(MODULE)?[ ]*PROCEDURE", I) - BLOCK: Pattern = compile(r"[ ]*([a-z_]\w*[ ]*:[ ]*)?BLOCK|CRITICAL(?!\w)", I) + BLOCK: Pattern = compile(r"[ ]*([a-z_]\w*[ ]*:[ ]*)?(BLOCK|CRITICAL)(?!\w)", I) END_BLOCK: Pattern = compile(r"BLOCK|CRITICAL", I) DO: Pattern = compile(r"[ ]*(?:[a-z_]\w*[ ]*:[ ]*)?DO([ ]+[0-9]*|$)", I) END_DO: Pattern = compile(r"DO", I)