|
236 | 236 | "end": "(?:\\)|(?=\\n))",
|
237 | 237 | "patterns": [
|
238 | 238 | {
|
239 |
| - "name": "entity.name.derived-type.fortran", |
| 239 | + "name": "entity.name.type.fortran", |
240 | 240 | "match": "(?i)\\s*\\b([a-z]\\w*)\\b"
|
241 | 241 | }
|
242 | 242 | ]
|
|
1195 | 1195 | },
|
1196 | 1196 | "end": "(?=[;!\\n])",
|
1197 | 1197 | "patterns": [
|
| 1198 | + { |
| 1199 | + "comment": "type-bound subroutines", |
| 1200 | + "begin": "(?ix)\\G\\s*([a-z]\\w*)(%)([a-z]\\w*)\\b\\s*(?=\\()", |
| 1201 | + "beginCaptures": { |
| 1202 | + "1": { |
| 1203 | + "name": "variable.other.fortran" |
| 1204 | + }, |
| 1205 | + "2": { |
| 1206 | + "name": "punctuation.accessor.fortran" |
| 1207 | + }, |
| 1208 | + "3": { |
| 1209 | + "name": "entity.name.function.subroutine.fortran" |
| 1210 | + } |
| 1211 | + }, |
| 1212 | + "end": "(?<!\\G)", |
| 1213 | + "endCaptures": { |
| 1214 | + "1": { |
| 1215 | + "name": "punctuation.parentheses.right.fortran" |
| 1216 | + } |
| 1217 | + }, |
| 1218 | + "patterns": [ |
| 1219 | + { |
| 1220 | + "include": "#parentheses-dummy-variables" |
| 1221 | + } |
| 1222 | + ] |
| 1223 | + }, |
1198 | 1224 | {
|
1199 | 1225 | "include": "#intrinsic-subroutines"
|
1200 | 1226 | },
|
|
1493 | 1519 | "begin": "(?i)\\s*\\b([a-z]\\w*)\\b",
|
1494 | 1520 | "beginCaptures": {
|
1495 | 1521 | "1": {
|
1496 |
| - "name": "entity.name.struct" |
| 1522 | + "name": "entity.name.type.fortran" |
1497 | 1523 | }
|
1498 | 1524 | },
|
1499 | 1525 | "end": "(?i)(?:^|(?<=;))\\s*(end\\s*type)(?:\\s+(?:(\\1)|(\\w+)))?\\b",
|
|
1502 | 1528 | "name": "keyword.control.endtype.fortran"
|
1503 | 1529 | },
|
1504 | 1530 | "2": {
|
1505 |
| - "name": "entity.name.derived-type.fortran" |
| 1531 | + "name": "entity.name.type.fortran" |
1506 | 1532 | },
|
1507 | 1533 | "3": {
|
1508 | 1534 | "name": "invalid.error.fortran"
|
|
2749 | 2775 | },
|
2750 | 2776 | {
|
2751 | 2777 | "comment": "Intrinsic functions introduced in the Fortran 1990 standard.",
|
2752 |
| - "begin": "(?ix)\\b(achar|adjustl|adjustr|all|allocated|associated|any|bit_size| btest|ceiling|count|cshift|digits|dot_product|eoshift|epsilon|exponent| floor|fraction|huge|iachar|iand|ibclr|ibits|ibset|ieor|ior|ishftc?| kind|lbound|len_trim|logical|matmul|maxexponent|maxloc|maxval|merge| minexponent|minloc|minval|modulo|nearest|not|pack|precision|present| product|radix|range|repeat|reshape|rrspacing|scale|scan| selected_(int|real)_kind|set_exponent|shape|size|spacing|spread|sum| tiny|transfer|transpose|trim|ubound|unpack|verify)\\s*(?=\\()", |
| 2778 | + "begin": "(?ix)\\b(achar|adjustl|adjustr|all|allocated|associated|any|bit_size|btest|ceiling|count|cshift|digits|dot_product|eoshift|epsilon|exponent|floor|fraction|huge|iachar|iand|ibclr|ibits|ibset|ieor|ior|ishftc?| kind|lbound|len_trim|logical|matmul|maxexponent|maxloc|maxval|merge|minexponent|minloc|minval|modulo|nearest|not|pack|precision|present|product|radix|range|repeat|reshape|rrspacing|scale|scan|selected_(int|real)_kind|set_exponent|shape|size|spacing|spread|sum|tiny|transfer|transpose|trim|ubound|unpack|verify)\\s*(?=\\()", |
2753 | 2779 | "beginCaptures": {
|
2754 | 2780 | "1": {
|
2755 | 2781 | "name": "support.function.intrinsic.fortran"
|
|
3039 | 3065 | {
|
3040 | 3066 | "comment": "Introduced in the Fortran 1977 standard.",
|
3041 | 3067 | "match": "(?ix)(\\.(and|eq|eqv|le|lt|ge|gt|ne|neqv|not|or)\\.)",
|
3042 |
| - "name": "keyword.operator.logical.fortran" |
| 3068 | + "name": "keyword.fortran" |
3043 | 3069 | },
|
3044 | 3070 | {
|
3045 | 3071 | "comment": "Introduced in the Fortran 1990 standard.",
|
|
4058 | 4084 | "begin": "(?i)\\s*\\b([a-z]\\w*)\\b",
|
4059 | 4085 | "beginCaptures": {
|
4060 | 4086 | "1": {
|
4061 |
| - "name": "entity.name.module.fortran" |
| 4087 | + "name": "entity.name.class.fortran" |
4062 | 4088 | }
|
4063 | 4089 | },
|
4064 | 4090 | "end": "(?=[;!\\n])",
|
|
4169 | 4195 | "derived-type": {
|
4170 | 4196 | "comment": "Introduced in the Fortran 1995 standard.",
|
4171 | 4197 | "name": "meta.specification.type.derived.fortran",
|
4172 |
| - "begin": "(?i)\\b(?:(class)|(type))\\s*(?=\\()", |
4173 |
| - "beginCaptures": { |
| 4198 | + "match": "(?i)\\b(?:(class)|(type))\\s*(\\()\\s*([a-z]\\w*)(\\))", |
| 4199 | + "captures": { |
4174 | 4200 | "1": {
|
4175 | 4201 | "name": "storage.type.class.fortran"
|
4176 | 4202 | },
|
|
4179 | 4205 | },
|
4180 | 4206 | "3": {
|
4181 | 4207 | "name": "punctuation.parentheses.left.fortran"
|
4182 |
| - } |
4183 |
| - }, |
4184 |
| - "end": "(?<!\\G)", |
4185 |
| - "endCaptures": { |
4186 |
| - "1": { |
| 4208 | + }, |
| 4209 | + "4": { |
| 4210 | + "name": "entity.name.type.fortran" |
| 4211 | + }, |
| 4212 | + "5": { |
4187 | 4213 | "name": "punctuation.parentheses.right.fortran"
|
4188 | 4214 | }
|
4189 |
| - }, |
4190 |
| - "contentName": "meta.type-spec.fortran", |
4191 |
| - "patterns": [ |
4192 |
| - { |
4193 |
| - "include": "#parentheses-dummy-variables" |
4194 |
| - } |
4195 |
| - ] |
| 4215 | + } |
4196 | 4216 | },
|
4197 | 4217 | "logical-type": {
|
4198 | 4218 | "comment": "Introduced in the Fortran 1977 standard.",
|
|
0 commit comments