|
4 | 4 | "If you want to provide a fix or improvement, please create a pull request against the original repository.", |
5 | 5 | "Once accepted there, we are happy to receive an update request." |
6 | 6 | ], |
7 | | - "version": "https://github.com/atom/language-php/commit/11b2057dbf32355019621ee3769f5c8ef577f524", |
| 7 | + "version": "https://github.com/atom/language-php/commit/b054176835218c446d22b3c1b9dcfdcf8cacf49f", |
8 | 8 | "scopeName": "source.php", |
9 | 9 | "patterns": [ |
10 | 10 | { |
|
230 | 230 | ] |
231 | 231 | }, |
232 | 232 | { |
233 | | - "begin": "(?i)^\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)", |
| 233 | + "begin": "(?i)(?:^|(?<=}))\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)", |
234 | 234 | "beginCaptures": { |
235 | 235 | "1": { |
236 | 236 | "name": "storage.modifier.${1:/downcase}.php" |
|
355 | 355 | "include": "#switch_statement" |
356 | 356 | }, |
357 | 357 | { |
358 | | - "match": "(?x)\n\\s*\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", |
| 358 | + "match": "\\s*\\b(yield\\s+from)\\b", |
| 359 | + "captures": { |
| 360 | + "1": { |
| 361 | + "name": "keyword.control.yield-from.php" |
| 362 | + } |
| 363 | + } |
| 364 | + }, |
| 365 | + { |
| 366 | + "match": "(?x)\n\\s* # FIXME: Removing this causes specs to fail. Investigate.\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", |
359 | 367 | "captures": { |
360 | 368 | "1": { |
361 | 369 | "name": "keyword.control.${1:/downcase}.php" |
|
521 | 529 | } |
522 | 530 | }, |
523 | 531 | "contentName": "meta.function.parameters.php", |
524 | | - "end": "(\\))(?:\\s*(:)\\s*([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*))?", |
| 532 | + "end": "(\\))(?:\\s*(:)\\s*(\\?)?\\s*([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*))?", |
525 | 533 | "endCaptures": { |
526 | 534 | "1": { |
527 | 535 | "name": "punctuation.definition.parameters.end.bracket.round.php" |
|
530 | 538 | "name": "keyword.operator.return-value.php" |
531 | 539 | }, |
532 | 540 | "3": { |
| 541 | + "name": "keyword.operator.nullable-type.php" |
| 542 | + }, |
| 543 | + "4": { |
533 | 544 | "name": "storage.type.php" |
534 | 545 | } |
535 | 546 | }, |
|
989 | 1000 | "name": "punctuation.separator.delimiter.php" |
990 | 1001 | }, |
991 | 1002 | { |
992 | | - "begin": "(?xi)\n(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value", |
| 1003 | + "begin": "(?xi)\n(?:(\\?)\\s*)?(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value", |
993 | 1004 | "beginCaptures": { |
994 | 1005 | "1": { |
995 | | - "name": "storage.type.php" |
| 1006 | + "name": "keyword.operator.nullable-type.php" |
996 | 1007 | }, |
997 | 1008 | "2": { |
998 | | - "name": "variable.other.php" |
| 1009 | + "name": "storage.type.php" |
999 | 1010 | }, |
1000 | 1011 | "3": { |
1001 | | - "name": "storage.modifier.reference.php" |
| 1012 | + "name": "variable.other.php" |
1002 | 1013 | }, |
1003 | 1014 | "4": { |
1004 | | - "name": "punctuation.definition.variable.php" |
| 1015 | + "name": "storage.modifier.reference.php" |
1005 | 1016 | }, |
1006 | 1017 | "5": { |
1007 | | - "name": "keyword.operator.assignment.php" |
| 1018 | + "name": "punctuation.definition.variable.php" |
1008 | 1019 | }, |
1009 | 1020 | "6": { |
1010 | | - "name": "support.function.construct.php" |
| 1021 | + "name": "keyword.operator.assignment.php" |
1011 | 1022 | }, |
1012 | 1023 | "7": { |
| 1024 | + "name": "support.function.construct.php" |
| 1025 | + }, |
| 1026 | + "8": { |
1013 | 1027 | "name": "punctuation.definition.array.begin.bracket.round.php" |
1014 | 1028 | } |
1015 | 1029 | }, |
|
1034 | 1048 | ] |
1035 | 1049 | }, |
1036 | 1050 | { |
1037 | | - "match": "(?xi)\n(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", |
| 1051 | + "match": "(?xi)\n(?:(\\?)\\s*)?(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", |
1038 | 1052 | "name": "meta.function.parameter.array.php", |
1039 | 1053 | "captures": { |
1040 | 1054 | "1": { |
1041 | | - "name": "storage.type.php" |
| 1055 | + "name": "keyword.operator.nullable-type.php" |
1042 | 1056 | }, |
1043 | 1057 | "2": { |
1044 | | - "name": "variable.other.php" |
| 1058 | + "name": "storage.type.php" |
1045 | 1059 | }, |
1046 | 1060 | "3": { |
1047 | | - "name": "storage.modifier.reference.php" |
| 1061 | + "name": "variable.other.php" |
1048 | 1062 | }, |
1049 | 1063 | "4": { |
1050 | | - "name": "punctuation.definition.variable.php" |
| 1064 | + "name": "storage.modifier.reference.php" |
1051 | 1065 | }, |
1052 | 1066 | "5": { |
1053 | | - "name": "keyword.operator.assignment.php" |
| 1067 | + "name": "punctuation.definition.variable.php" |
1054 | 1068 | }, |
1055 | 1069 | "6": { |
1056 | | - "name": "constant.language.php" |
| 1070 | + "name": "keyword.operator.assignment.php" |
1057 | 1071 | }, |
1058 | 1072 | "7": { |
1059 | | - "name": "punctuation.section.array.begin.php" |
| 1073 | + "name": "constant.language.php" |
1060 | 1074 | }, |
1061 | 1075 | "8": { |
| 1076 | + "name": "punctuation.section.array.begin.php" |
| 1077 | + }, |
| 1078 | + "9": { |
1062 | 1079 | "patterns": [ |
1063 | 1080 | { |
1064 | 1081 | "include": "#parameter-default-types" |
1065 | 1082 | } |
1066 | 1083 | ] |
1067 | 1084 | }, |
1068 | | - "9": { |
| 1085 | + "10": { |
1069 | 1086 | "name": "punctuation.section.array.end.php" |
1070 | 1087 | }, |
1071 | | - "10": { |
| 1088 | + "11": { |
1072 | 1089 | "name": "invalid.illegal.non-null-typehinted.php" |
1073 | 1090 | } |
1074 | 1091 | } |
1075 | 1092 | }, |
1076 | 1093 | { |
1077 | | - "begin": "(?xi)\n(\\\\?(?:[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)*) # Optional namespace\n([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Typehinted class name\n\\s+((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference", |
| 1094 | + "begin": "(?xi)\n(?:(\\?)\\s*)?\n(\\\\?(?:[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)*) # Optional namespace\n([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Typehinted class name\n\\s+((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference", |
1078 | 1095 | "beginCaptures": { |
1079 | 1096 | "1": { |
| 1097 | + "name": "keyword.operator.nullable-type.php" |
| 1098 | + }, |
| 1099 | + "2": { |
1080 | 1100 | "name": "support.other.namespace.php", |
1081 | 1101 | "patterns": [ |
1082 | 1102 | { |
|
1089 | 1109 | } |
1090 | 1110 | ] |
1091 | 1111 | }, |
1092 | | - "2": { |
| 1112 | + "3": { |
1093 | 1113 | "name": "storage.type.php" |
1094 | 1114 | }, |
1095 | | - "3": { |
| 1115 | + "4": { |
1096 | 1116 | "name": "variable.other.php" |
1097 | 1117 | }, |
1098 | | - "4": { |
| 1118 | + "5": { |
1099 | 1119 | "name": "storage.modifier.reference.php" |
1100 | 1120 | }, |
1101 | | - "5": { |
| 1121 | + "6": { |
1102 | 1122 | "name": "keyword.operator.variadic.php" |
1103 | 1123 | }, |
1104 | | - "6": { |
| 1124 | + "7": { |
1105 | 1125 | "name": "punctuation.definition.variable.php" |
1106 | 1126 | } |
1107 | 1127 | }, |
|
0 commit comments