|
994 | 994 | "include": "#if-construct"
|
995 | 995 | },
|
996 | 996 | {
|
997 |
| - "include": "#select-construct" |
| 997 | + "include": "#select-case-construct" |
| 998 | + }, |
| 999 | + { |
| 1000 | + "include": "#select-type-construct" |
| 1001 | + }, |
| 1002 | + { |
| 1003 | + "include": "#select-rank-construct" |
998 | 1004 | },
|
999 | 1005 | {
|
1000 | 1006 | "include": "#where-construct"
|
@@ -1274,121 +1280,167 @@
|
1274 | 1280 | }
|
1275 | 1281 | ]
|
1276 | 1282 | },
|
1277 |
| - "select-construct": { |
| 1283 | + "select-case-construct":{ |
| 1284 | + "comment": "Select case construct. Introduced in the Fortran 1990 standard.", |
| 1285 | + "begin": "(?i)\\b(select)\\s*(case)\\b", |
| 1286 | + "beginCaptures": { |
| 1287 | + "1": { |
| 1288 | + "name": "keyword.control.select.fortran" |
| 1289 | + }, |
| 1290 | + "2": { |
| 1291 | + "name": "keyword.control.case.fortran" |
| 1292 | + } |
| 1293 | + }, |
| 1294 | + "end": "(?i)(?=\\b(end\\s*select)\\b)", |
| 1295 | + "endCaptures": { |
| 1296 | + "1": { |
| 1297 | + "name": "keyword.control.endselect.fortran" |
| 1298 | + } |
| 1299 | + }, |
1278 | 1300 | "patterns": [
|
1279 | 1301 | {
|
1280 |
| - "name": "meta.block.select.fortran", |
1281 |
| - "begin": "(?i)\\b(select)", |
| 1302 | + "include": "#parentheses" |
| 1303 | + }, |
| 1304 | + { |
| 1305 | + "begin": "(?i)\\b(case)\\b", |
1282 | 1306 | "beginCaptures": {
|
1283 | 1307 | "1": {
|
1284 |
| - "name": "keyword.control.select.fortran" |
| 1308 | + "name": "keyword.control.case.fortran" |
1285 | 1309 | }
|
1286 | 1310 | },
|
1287 |
| - "end": "(?i)\\b(end\\s*select)\\b", |
1288 |
| - "endCaptures": { |
| 1311 | + "end": "(?i)(?=[;!\\n])", |
| 1312 | + "patterns": [ |
| 1313 | + { |
| 1314 | + "match": "(?i)\\G\\s*\\b(default)\\b", |
| 1315 | + "captures": { |
| 1316 | + "1": { |
| 1317 | + "name": "keyword.control.default.fortran" |
| 1318 | + } |
| 1319 | + } |
| 1320 | + }, |
| 1321 | + { |
| 1322 | + "include": "#parentheses" |
| 1323 | + }, |
| 1324 | + { |
| 1325 | + "include": "#invalid-word" |
| 1326 | + } |
| 1327 | + ] |
| 1328 | + }, |
| 1329 | + { |
| 1330 | + "include": "$base" |
| 1331 | + } |
| 1332 | + ] |
| 1333 | + }, |
| 1334 | + "select-type-construct":{ |
| 1335 | + "comment": "Select type construct. Introduced in the Fortran 2003 standard.", |
| 1336 | + "begin": "(?i)\\b(select)\\s*(type)\\b", |
| 1337 | + "beginCaptures": { |
| 1338 | + "1": { |
| 1339 | + "name": "keyword.control.select.fortran" |
| 1340 | + }, |
| 1341 | + "2": { |
| 1342 | + "name": "keyword.control.type.fortran" |
| 1343 | + } |
| 1344 | + }, |
| 1345 | + "end": "(?i)(?=\\b(end\\s*select)\\b)", |
| 1346 | + "endCaptures": { |
| 1347 | + "1": { |
| 1348 | + "name": "keyword.control.endselect.fortran" |
| 1349 | + } |
| 1350 | + }, |
| 1351 | + "patterns": [ |
| 1352 | + { |
| 1353 | + "include": "#parentheses" |
| 1354 | + }, |
| 1355 | + { |
| 1356 | + "begin": "(?i)\\b(?:(class)|(type))", |
| 1357 | + "beginCaptures": { |
1289 | 1358 | "1": {
|
1290 |
| - "name": "keyword.control.endselect.fortran" |
| 1359 | + "name": "keyword.control.class.fortran" |
| 1360 | + }, |
| 1361 | + "2": { |
| 1362 | + "name": "keyword.control.type.fortran" |
1291 | 1363 | }
|
1292 | 1364 | },
|
| 1365 | + "end": "(?i)(?=[;!\\n])", |
1293 | 1366 | "patterns": [
|
1294 | 1367 | {
|
1295 |
| - "comment": "Select case construct. Introduced in the Fortran 1990 standard.", |
1296 |
| - "begin": "(?i)\\s*(case)\\b", |
1297 |
| - "beginCaptures": { |
| 1368 | + "match": "(?i)\\G\\s*\\b(default)\\b", |
| 1369 | + "captures": { |
1298 | 1370 | "1": {
|
1299 |
| - "name": "keyword.control.case.fortran" |
| 1371 | + "name": "keyword.control.default.fortran" |
1300 | 1372 | }
|
1301 |
| - }, |
1302 |
| - "end": "(?i)(?=\\b(end\\s*select)\\b)", |
1303 |
| - "patterns": [ |
1304 |
| - { |
1305 |
| - "include": "#parentheses" |
1306 |
| - }, |
1307 |
| - { |
1308 |
| - "begin": "(?i)\\b(case)\\b", |
1309 |
| - "beginCaptures": { |
1310 |
| - "1": { |
1311 |
| - "name": "keyword.control.case.fortran" |
1312 |
| - } |
1313 |
| - }, |
1314 |
| - "end": "(?i)(?=[;!\\n])", |
1315 |
| - "patterns": [ |
1316 |
| - { |
1317 |
| - "match": "(?i)\\G\\s*\\b(default)\\b", |
1318 |
| - "captures": { |
1319 |
| - "1": { |
1320 |
| - "name": "keyword.control.default.fortran" |
1321 |
| - } |
1322 |
| - } |
1323 |
| - }, |
1324 |
| - { |
1325 |
| - "include": "#parentheses" |
1326 |
| - }, |
1327 |
| - { |
1328 |
| - "include": "#invalid-word" |
1329 |
| - } |
1330 |
| - ] |
1331 |
| - }, |
1332 |
| - { |
1333 |
| - "include": "$base" |
1334 |
| - } |
1335 |
| - ] |
| 1373 | + } |
1336 | 1374 | },
|
1337 | 1375 | {
|
1338 |
| - "comment": "Select type construct. Introduced in the Fortran 2003 standard.", |
1339 |
| - "begin": "(?i)\\s*(type)\\b", |
1340 |
| - "beginCaptures": { |
| 1376 | + "match": "(?i)\\G\\s*(is)\\b", |
| 1377 | + "captures": { |
1341 | 1378 | "1": {
|
1342 |
| - "name": "keyword.control.type.fortran" |
| 1379 | + "name": "keyword.control.is.fortran" |
1343 | 1380 | }
|
1344 |
| - }, |
1345 |
| - "end": "(?i)(?=\\b(end\\s*select)\\b)", |
1346 |
| - "patterns": [ |
1347 |
| - { |
1348 |
| - "include": "#parentheses" |
1349 |
| - }, |
1350 |
| - { |
1351 |
| - "begin": "(?i)\\b(?:(class)|(type))", |
1352 |
| - "beginCaptures": { |
1353 |
| - "1": { |
1354 |
| - "name": "keyword.control.class.fortran" |
1355 |
| - }, |
1356 |
| - "2": { |
1357 |
| - "name": "keyword.control.type.fortran" |
1358 |
| - } |
1359 |
| - }, |
1360 |
| - "end": "(?i)(?=[;!\\n])", |
1361 |
| - "patterns": [ |
1362 |
| - { |
1363 |
| - "match": "(?i)\\G\\s*\\b(default)\\b", |
1364 |
| - "captures": { |
1365 |
| - "1": { |
1366 |
| - "name": "keyword.control.default.fortran" |
1367 |
| - } |
1368 |
| - } |
1369 |
| - }, |
1370 |
| - { |
1371 |
| - "match": "(?i)\\G\\s*(is)\\b", |
1372 |
| - "captures": { |
1373 |
| - "1": { |
1374 |
| - "name": "keyword.control.is.fortran" |
1375 |
| - } |
1376 |
| - } |
1377 |
| - }, |
1378 |
| - { |
1379 |
| - "include": "#parentheses" |
1380 |
| - }, |
1381 |
| - { |
1382 |
| - "include": "#invalid-word" |
1383 |
| - } |
1384 |
| - ] |
1385 |
| - }, |
1386 |
| - { |
1387 |
| - "include": "$base" |
| 1381 | + } |
| 1382 | + }, |
| 1383 | + { |
| 1384 | + "include": "#parentheses" |
| 1385 | + }, |
| 1386 | + { |
| 1387 | + "include": "#invalid-word" |
| 1388 | + } |
| 1389 | + ] |
| 1390 | + }, |
| 1391 | + { |
| 1392 | + "include": "$base" |
| 1393 | + } |
| 1394 | + ] |
| 1395 | + }, |
| 1396 | + "select-rank-construct":{ |
| 1397 | + "comment": "Select rank construct. Introduced in the Fortran 2008 standard.", |
| 1398 | + "begin": "(?i)\\b(select)\\s*(rank)\\b", |
| 1399 | + "beginCaptures": { |
| 1400 | + "1": { |
| 1401 | + "name": "keyword.control.select.fortran" |
| 1402 | + }, |
| 1403 | + "2": { |
| 1404 | + "name": "keyword.control.rank.fortran" |
| 1405 | + } |
| 1406 | + }, |
| 1407 | + "end": "(?i)(?=\\b(end\\s*select)\\b)", |
| 1408 | + "endCaptures": { |
| 1409 | + "1": { |
| 1410 | + "name": "keyword.control.endselect.fortran" |
| 1411 | + } |
| 1412 | + }, |
| 1413 | + "patterns": [ |
| 1414 | + { |
| 1415 | + "include": "#parentheses" |
| 1416 | + }, |
| 1417 | + { |
| 1418 | + "begin": "(?i)\\b(rank)\\b", |
| 1419 | + "beginCaptures": { |
| 1420 | + "1": { |
| 1421 | + "name": "keyword.control.rank.fortran" |
| 1422 | + } |
| 1423 | + }, |
| 1424 | + "end": "(?i)(?=[;!\\n])", |
| 1425 | + "patterns": [ |
| 1426 | + { |
| 1427 | + "match": "(?i)\\G\\s*\\b(default)\\b", |
| 1428 | + "captures": { |
| 1429 | + "1": { |
| 1430 | + "name": "keyword.control.default.fortran" |
1388 | 1431 | }
|
1389 |
| - ] |
| 1432 | + } |
| 1433 | + }, |
| 1434 | + { |
| 1435 | + "include": "#parentheses" |
| 1436 | + }, |
| 1437 | + { |
| 1438 | + "include": "#invalid-word" |
1390 | 1439 | }
|
1391 | 1440 | ]
|
| 1441 | + }, |
| 1442 | + { |
| 1443 | + "include": "$base" |
1392 | 1444 | }
|
1393 | 1445 | ]
|
1394 | 1446 | },
|
|
2110 | 2162 | "include": "#invalid-word"
|
2111 | 2163 | }
|
2112 | 2164 | ]
|
| 2165 | + }, |
| 2166 | + { |
| 2167 | + "include": "#line-continuation-operator" |
2113 | 2168 | }
|
2114 | 2169 | ]
|
2115 | 2170 | },
|
|
4070 | 4125 | {
|
4071 | 4126 | "include": "#types"
|
4072 | 4127 | },
|
| 4128 | + { |
| 4129 | + "include": "#line-continuation-operator" |
| 4130 | + }, |
4073 | 4131 | {
|
4074 | 4132 | "comment": "Attribute list.",
|
4075 | 4133 | "contentName": "meta.attribute-list.fortran",
|
|
4148 | 4206 | "include": "#invalid-word"
|
4149 | 4207 | }
|
4150 | 4208 | ]
|
| 4209 | + }, |
| 4210 | + { |
| 4211 | + "include": "#line-continuation-operator" |
4151 | 4212 | }
|
4152 | 4213 | ]
|
4153 | 4214 | },
|
|
4939 | 5000 | },
|
4940 | 5001 | {
|
4941 | 5002 | "include": "#variable"
|
| 5003 | + }, |
| 5004 | + { |
| 5005 | + "include": "#line-continuation-operator" |
4942 | 5006 | }
|
4943 | 5007 | ]
|
4944 | 5008 | },
|
|
0 commit comments