Skip to content

Commit 46f04f2

Browse files
authored
Fixes #196. (#206)
Changed to a multiline regex where we seek for the ) explicitly. This seems to have done the trick. The highlighting for the `name.type` should also now match the colour of the `name.type` where the type/class defined. Previously it inherited the colour from (.
1 parent bbc2d9d commit 46f04f2

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

syntaxes/fortran_free-form.tmLanguage.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4648,8 +4648,8 @@
46484648
"derived-type": {
46494649
"comment": "Introduced in the Fortran 1995 standard.",
46504650
"name": "meta.specification.type.derived.fortran",
4651-
"match": "(?i)\\b(?:(class)|(type))\\s*(\\()\\s*(([a-z]\\w*)|\\*)\\s*(\\))",
4652-
"captures": {
4651+
"begin": "(?i)\\b(?:(class)|(type))\\s*(\\()\\s*(([a-z]\\w*)|\\*)",
4652+
"beginCaptures": {
46534653
"1": {
46544654
"name": "storage.type.class.fortran"
46554655
},
@@ -4661,11 +4661,20 @@
46614661
},
46624662
"4": {
46634663
"name": "entity.name.type.fortran"
4664-
},
4665-
"5": {
4664+
}
4665+
},
4666+
"end": "(\\))",
4667+
"endCaptures": {
4668+
"1": {
46664669
"name": "punctuation.parentheses.right.fortran"
46674670
}
4668-
}
4671+
},
4672+
"contentName": "meta.type-spec.fortran",
4673+
"patterns": [
4674+
{
4675+
"include": "#parentheses-dummy-variables"
4676+
}
4677+
]
46694678
},
46704679
"logical-type": {
46714680
"comment": "Introduced in the Fortran 1977 standard.",

0 commit comments

Comments
 (0)