|
20 | 20 | 'name': 'JavaScript' |
21 | 21 | 'patterns': [ |
22 | 22 | { |
23 | | - 'comment': 'ES6 import' |
| 23 | + # ES6 import |
24 | 24 | 'begin': '(?<!\\.)\\b(import)(?!\\s*:)\\b' |
25 | 25 | 'beginCaptures': |
26 | 26 | '1': |
27 | 27 | 'name': 'keyword.control.js' |
| 28 | + 'end': '(?=;|$)' |
| 29 | + 'name': 'meta.import.js' |
28 | 30 | 'patterns': [ |
29 | 31 | { |
30 | | - 'comment': '{ member1 , member2 as alias2 , [...] }' |
| 32 | + # { member1 , member2 as alias2 , [...] } |
31 | 33 | 'begin': '\\{' |
32 | 34 | 'beginCaptures': |
33 | 35 | 0: |
|
38 | 40 | 'name': 'punctuation.definition.modules.end.js' |
39 | 41 | 'patterns': [ |
40 | 42 | { |
41 | | - 'comment': '(default|name) as alias' |
| 43 | + # (default|name) as alias |
| 44 | + 'match': '''(?x) |
| 45 | + (?: \\b(default)\\b | \\b([a-zA-Z_$][\\w$]*)\\b) |
| 46 | + \\s* |
| 47 | + (\\b as \\b) |
| 48 | + \\s* |
| 49 | + (?: (\\b default \\b | \\*) | \\b([a-zA-Z_$][\\w$]*)\\b) |
| 50 | + ''' |
42 | 51 | 'captures': |
43 | 52 | '1': |
44 | 53 | 'name': 'variable.language.default.js' |
|
50 | 59 | 'name': 'invalid.illegal.js' |
51 | 60 | '5': |
52 | 61 | 'name': 'variable.other.module-alias.js' |
53 | | - 'match': '(?x) |
54 | | - (?: \\b(default)\\b | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
55 | | - \\s* |
56 | | - (\\b as \\b) |
57 | | - \\s* |
58 | | - (?: (\\b default \\b | \\*) | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
59 | | - ' |
60 | 62 | } |
61 | 63 | { |
62 | 64 | 'match': ',' |
|
66 | 68 | 'include': '#comments' |
67 | 69 | } |
68 | 70 | { |
69 | | - 'match': '\\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b' |
| 71 | + 'match': '\\b([a-zA-Z_$][\\w$]*)\\b' |
70 | 72 | 'name': 'variable.other.module.js' |
71 | 73 | } |
72 | 74 | ] |
73 | 75 | } |
74 | 76 | { |
75 | | - 'comment': '(default|*|name) as alias' |
| 77 | + # (default|*|name) as alias |
| 78 | + 'match': '''(?x) |
| 79 | + (?: \\b(default)\\b | (\\*) | \\b([a-zA-Z_$][\\w$]*)\\b) |
| 80 | + \\s* |
| 81 | + (\\b as \\b) |
| 82 | + \\s* |
| 83 | + (?: (\\b default \\b | \\*) | \\b([a-zA-Z_$][\\w$]*)\\b) |
| 84 | + ''' |
76 | 85 | 'captures': |
77 | 86 | '1': |
78 | 87 | 'name': 'variable.language.default.js' |
|
86 | 95 | 'name': 'invalid.illegal.js' |
87 | 96 | '6': |
88 | 97 | 'name': 'variable.other.module-alias.js' |
89 | | - 'match': '(?x) |
90 | | - (?: \\b(default)\\b | (\\*) | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
91 | | - \\s* |
92 | | - (\\b as \\b) |
93 | | - \\s* |
94 | | - (?: (\\b default \\b | \\*) | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
95 | | - ' |
96 | 98 | } |
97 | 99 | { |
98 | 100 | 'match': '\\*' |
|
113 | 115 | 'name': 'keyword.control.js' |
114 | 116 | } |
115 | 117 | { |
116 | | - 'match': '\\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b(?=.*\\bfrom\\b)' |
| 118 | + 'match': '\\b([a-zA-Z_$][\\w$]*)\\b(?=.*\\bfrom\\b)' |
117 | 119 | 'name': 'variable.other.module.js' |
118 | 120 | } |
119 | 121 | { |
120 | 122 | 'match': ',' |
121 | 123 | 'name': 'meta.delimiter.object.comma.js' |
122 | 124 | } |
123 | 125 | ] |
124 | | - 'end': '(?=;|$)' |
125 | | - 'name': 'meta.import.js' |
126 | 126 | } |
127 | 127 | { |
128 | | - 'comment': 'ES6 export: `export default (variable|class|function, etc.)`' |
129 | | - 'match': '(?x) \\b(export)\\b \\s* \\b(default)\\b (?:\\s*) \\b((?!\\bfunction\\b|\\bclass\\b|\\blet\\b|\\bvar\\b|\\bconst\\b)[a-zA-Z_$][a-zA-Z_$0-9]*)?\\b' |
| 128 | + # ES6 export: export default (variable|class|function, etc.) |
| 129 | + 'match': '''(?x) |
| 130 | + \\b(export)\\b\\s* |
| 131 | + \\b(default)\\b\\s* |
| 132 | + \\b((?!\\b(?:function|class|let|var|const)\\b)[a-zA-Z_$][\\w$]*)?\\b |
| 133 | + ''' |
130 | 134 | 'captures': |
131 | 135 | '0': |
132 | 136 | 'name': 'meta.export.js' |
|
138 | 142 | 'name': 'variable.other.module.js' |
139 | 143 | } |
140 | 144 | { |
141 | | - 'comment': 'ES6 export, re-export: `export {member as alias, [...]} [from ...]`' |
| 145 | + # ES6 export, re-export: export {member as alias, [...]} [from ...] |
142 | 146 | 'begin': '(?<!\\.)\\b(export)(?!\\s*:)\\b' |
143 | 147 | 'beginCaptures': |
144 | 148 | '1': |
145 | 149 | 'name': 'keyword.control.js' |
| 150 | + 'end': '(?=;|\\bfunction\\b|\\bclass\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|$)' |
| 151 | + 'name': 'meta.export.js' |
146 | 152 | 'patterns': [ |
147 | 153 | { |
148 | 154 | 'include': '#numbers' |
149 | 155 | } |
150 | 156 | { |
151 | | - 'comment': '`{ member1 , member2 as alias2 , [...] }` inside re-export' |
| 157 | + # { member1 , member2 as alias2 , [...] } inside re-export |
152 | 158 | 'begin': '\\{(?=.*\\bfrom\\b)' |
153 | 159 | 'beginCaptures': |
154 | 160 | 0: |
|
159 | 165 | 'name': 'punctuation.definition.modules.end.js' |
160 | 166 | 'patterns': [ |
161 | 167 | { |
162 | | - 'comment': '(default|name) as alias' |
| 168 | + # (default|name) as alias |
| 169 | + 'match': '''(?x) |
| 170 | + (?: \\b(default)\\b | \\b([a-zA-Z_$][\\w$]*)\\b) |
| 171 | + \\s* |
| 172 | + (\\b as \\b) |
| 173 | + \\s* |
| 174 | + (?: \\b(default)\\b | (\\*) | \\b([a-zA-Z_$][\\w$]*)\\b) |
| 175 | + ''' |
163 | 176 | 'captures': |
164 | 177 | '1': |
165 | 178 | 'name': 'variable.language.default.js' |
|
173 | 186 | 'name': 'invalid.illegal.js' |
174 | 187 | '6': |
175 | 188 | 'name': 'variable.other.module-alias.js' |
176 | | - 'match': '(?x) |
177 | | - (?: \\b(default)\\b | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
178 | | - \\s* |
179 | | - (\\b as \\b) |
180 | | - \\s* |
181 | | - (?: \\b(default)\\b | (\\*) | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
182 | | - ' |
183 | 189 | } |
184 | 190 | { |
185 | 191 | 'match': ',' |
|
189 | 195 | 'include': '#comments' |
190 | 196 | } |
191 | 197 | { |
192 | | - 'match': '\\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b' |
| 198 | + 'match': '\\b([a-zA-Z_$][\\w$]*)\\b' |
193 | 199 | 'name': 'variable.other.module.js' |
194 | 200 | } |
195 | 201 | ] |
196 | 202 | } |
197 | 203 | { |
198 | | - 'comment': '{ member1 , member2 as alias2 , [...] }' |
| 204 | + # { member1 , member2 as alias2 , [...] } |
199 | 205 | 'begin': '(?![a-zA-Z_$0-9])\\{' |
200 | 206 | 'beginCaptures': |
201 | 207 | 0: |
|
206 | 212 | 'name': 'punctuation.definition.modules.end.js' |
207 | 213 | 'patterns': [ |
208 | 214 | { |
209 | | - 'comment': 'name as (default|alias)' |
| 215 | + # name as (default|alias) |
210 | 216 | 'captures': |
211 | 217 | '1': |
212 | 218 | 'name': 'invalid.illegal.js' |
|
220 | 226 | 'name': 'invalid.illegal.js' |
221 | 227 | '6': |
222 | 228 | 'name': 'variable.other.module-alias.js' |
223 | | - 'match': '(?x) |
224 | | - (?: \\b(default)\\b | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
| 229 | + 'match': '''(?x) |
| 230 | + (?: \\b(default)\\b | \\b([a-zA-Z_$][\\w$]*)\\b) |
225 | 231 | \\s* |
226 | 232 | (\\b as \\b) |
227 | 233 | \\s* |
228 | | - (?: \\b(default)\\b | (\\*) | \\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b) |
229 | | - ' |
| 234 | + (?: \\b(default)\\b | (\\*) | \\b([a-zA-Z_$][\\w$]*)\\b) |
| 235 | + ''' |
230 | 236 | } |
231 | 237 | { |
232 | 238 | 'include': '#comments' |
|
236 | 242 | 'name': 'meta.delimiter.object.comma.js' |
237 | 243 | } |
238 | 244 | { |
239 | | - 'match': '\\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b' |
| 245 | + 'match': '\\b([a-zA-Z_$][\\w$]*)\\b' |
240 | 246 | 'name': 'variable.other.module.js' |
241 | 247 | } |
242 | 248 | ] |
|
260 | 266 | 'name': 'keyword.control.js' |
261 | 267 | } |
262 | 268 | { |
263 | | - 'match': '\\b([a-zA-Z_$][a-zA-Z_$0-9]*)\\b' |
| 269 | + 'match': '\\b([a-zA-Z_$][\\w$]*)\\b' |
264 | 270 | 'name': 'variable.other.module.js' |
265 | 271 | } |
266 | 272 | { |
|
271 | 277 | 'include': '#operators' |
272 | 278 | } |
273 | 279 | ] |
274 | | - 'end': '(?=;|\\bfunction\\b|\\bclass\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|$)' |
275 | | - 'name': 'meta.export.js' |
276 | 280 | } |
277 | 281 | { |
278 | 282 | 'match': '''(?x) |
|
812 | 816 | 'include': '#comments' |
813 | 817 | } |
814 | 818 | { |
| 819 | + 'match': '(<!--|-->)' |
815 | 820 | 'captures': |
816 | 821 | '0': |
817 | 822 | 'name': 'punctuation.definition.comment.html.js' |
818 | 823 | '2': |
819 | 824 | 'name': 'punctuation.definition.comment.html.js' |
820 | | - 'match': '(<!--|-->)' |
821 | 825 | 'name': 'comment.block.html.js' |
822 | 826 | } |
823 | 827 | { |
|
963 | 967 | 'name': 'keyword.other.js' |
964 | 968 | } |
965 | 969 | { |
966 | | - 'match': '(?<!\\$)\\b(Anchor|Applet|Area|Array|Boolean|Button|Checkbox|Date|document|event|FileUpload|Form|Frame|Function|Hidden|History|Image|JavaArray|JavaClass|JavaObject|JavaPackage|java|Layer|Link|Location|Map|MimeType|Number|navigator|netscape|Object|Option|Packages|Password|Plugin|performance|Radio|RegExp|Reset|Select|Set|String|Style|Submit|Symbol|screen|sun|Text|Textarea|WeakMap|WeakSet|window|XMLHttpRequest)\\b' |
| 970 | + 'match': '''(?x) (?<!\\$) \\b |
| 971 | + (Anchor|Applet|Area|Array|Boolean|Button|Checkbox|Date|document|event|FileUpload|Form|Frame|Function|Hidden |
| 972 | + |History|Image|JavaArray|JavaClass|JavaObject|JavaPackage|java|Layer|Link|Location|Map|MimeType|Number |
| 973 | + |navigator|netscape|Object|Option|Packages|Password|Plugin|performance|Radio|RegExp|Reset|Select|Set|String |
| 974 | + |Style|Submit|Symbol|screen|sun|Text|Textarea|WeakMap|WeakSet|window|XMLHttpRequest) |
| 975 | + \\b |
| 976 | + ''' |
967 | 977 | 'name': 'support.class.js' |
968 | 978 | } |
969 | 979 | { |
970 | | - 'match': '(\\.)(systemLanguage|scripts|scrollbars|screenX|screenY|screenTop|screenLeft|style|styleSheets|status|statusText|statusbar|siblingBelow|siblingAbove|source|suffixes|security|securityPolicy|selection|self|history|host|hostname|hash|hasFocus|XMLDocument|XSLDocument|next|namespaces|namespaceURI|nameProp|MIN_VALUE|MAX_VALUE|characterSet|constructor|controllers|cookieEnabled|colorDepth|components|complete|current|cpuClass|clip|clipBoardData|clientInformation|closed|classes|callee|caller|crypto|toolbar|top|textTransform|textIndent|textDecoration|textAlign|tags|innerHeight|innerWidth|input|ids|ignoreCase|zIndex|oscpu|onreadystatechange|onLine|outerHeight|outerWidth|opsProfile|opener|offscreenBuffering|NEGATIVE_INFINITY|display|dialogHeight|dialogTop|dialogWidth|dialogLeft|dialogArguments|directories|description|defaultStatus|defaultChecked|defaultCharset|defaultView|userProfile|userLanguage|userAgent|uniqueID|undefined|updateInterval|_content|pixelDepth|port|personalbar|pkcs11|plugins|platform|pathname|paddingRight|paddingBottom|paddingTop|paddingLeft|parent|parentWindow|parentLayer|pageX|pageXOffset|pageY|pageYOffset|protocol|prototype|product|productSub|prompter|previous|prefix|encoding|enabledPlugin|external|expando|embeds|visiblity|vendor|vendorSub|vLinkcolor|URLUnencoded|POSITIVE_INFINITY|filename|fontSize|fontFamily|fontWeight|formName|frames|frameElement|fgColor|whiteSpace|listStyleType|lineHeight|linkColor|location|locationbar|localName|lowsrc|length|left|leftContext|lastModified|lastMatch|lastIndex|lastParen|layers|layerX|language|appMinorVersion|appName|appCodeName|appCore|appVersion|availHeight|availTop|availWidth|availLeft|all|arity|arguments|aLinkcolor|above|right|rightContext|responseXML|responeText|readyState|global|x|y|z|mimeTypes|multiline|menubar|marginRight|marginBottom|marginTop|marginLeft|bottom|border(Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth)|bufferDepth|below|backgroundColor|backgroundImage)\\b' |
| 980 | + 'match': '''(?x) (\\.) |
| 981 | + (MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY|URLUnencoded|X[MS]LDocument|[xyz]|_content|aLinkcolor |
| 982 | + |above|all|appCodeName|appCore|appMinorVersion|appName|appVersion|arguments|arity|availHeight|availLeft|availTop |
| 983 | + |availWidth|backgroundColor|backgroundImage|below|borderBottomWidth|borderColor|borderLeftWidth|borderRightWidth |
| 984 | + |borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|characterSet|classes|clientInformation |
| 985 | + |clip|clipBoardData|closed|colorDepth|complete|components|constructor|controllers|cookieEnabled|cpuClass|crypto |
| 986 | + |current|defaultCharset|defaultChecked|defaultStatus|defaultView|description|dialogArguments|dialogHeight |
| 987 | + |dialogLeft|dialogTop|dialogWidth|directories|display|embeds|enabledPlugin|encoding|expando|external|fgColor |
| 988 | + |filename|fontFamily|fontSize|fontWeight|formName|frameElement|frames|global|hasFocus|hash|history|host|hostname |
| 989 | + |ids|ignoreCase|innerHeight|innerWidth|input|language|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left |
| 990 | + |leftContext|length|lineHeight|linkColor|listStyleType|localName|location|locationbar|lowsrc|marginBottom|marginLeft |
| 991 | + |marginRight|marginTop|menubar|mimeTypes|multiline|nameProp|namespaceURI|namespaces|next|offscreenBuffering|onLine |
| 992 | + |onreadystatechange|opener|opsProfile|oscpu|outerHeight|outerWidth|paddingBottom|paddingLeft|paddingRight|paddingTop |
| 993 | + |page[XY]|page[XY]Offset|parent|parentLayer|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins |
| 994 | + |port|prefix|previous|product|productSub|prompter|protocol|prototype|readyState|responeText|responseXML|right |
| 995 | + |rightContext|screenLeft|screenTop|screen[XY]|scripts|scrollbars|security|securityPolicy|selection|self|siblingAbove |
| 996 | + |siblingBelow|source|status|statusText|statusbar|style|styleSheets|suffixes|systemLanguage|tags|textAlign |
| 997 | + |textDecoration|textIndent|textTransform|toolbar|top|undefined|uniqueID|updateInterval|userAgent|userLanguage |
| 998 | + |userProfile|vLinkcolor|vendor|vendorSub|visibility|whiteSpace|zIndex) |
| 999 | + \\b |
| 1000 | + ''' |
971 | 1001 | 'captures': |
972 | 1002 | '1': |
973 | 1003 | 'name': 'meta.delimiter.property.period.js' |
974 | 1004 | '2': |
975 | 1005 | 'name': 'support.constant.js' |
976 | 1006 | } |
977 | 1007 | { |
978 | | - 'match': '(\\.)(shape|systemId|scheme|scope|scrolling|standby|start|size|summary|specified|sectionRowIndex|selected|selectedIndex|hspace|httpEquiv|htmlFor|height|headers|href|hreflang|noResize|notations|notationName|noShade|noHref|nodeName|nodeType|nodeValue|noWrap|nextSibling|name|ch|childNodes|chOff|checked|charset|cite|content|cookie|cords|code|codeBase|codeType|cols|colSpan|color|compact|cells|cellSpacing|cellPadding|clear|className|caption|type|tBodies|title|tHead|text|target|tagName|tFoot|isMap|index|id|implementation|images|options|ownerDocument|object|disabled|dir|doctype|documentElement|docmain|declare|defer|defaultSelected|defaultChecked|defaultValue|dateTime|data|useMap|publicId|parentNode|profile|profileend|prompt|previousDibling|enctype|entities|event|elements|vspace|version|value|valueType|vLink|vAlign|URL|firstChild|form|forms|face|frame|frameBorder|width|link|links|longDesc|lowSrc|lastChild|lang|label|anchors|accessKey|accept|acceptCharset|action|attributes|applets|alt|align|archive|areas|axis|aLink|abbr|rows|rowSpan|rowIndex|rules|rev|referrer|rel|readOnly|multiple|method|media|marginHeight|marginWidth|maxLength|body|border|background|bgColor)\\b' |
| 1008 | + 'match': '''(?x) (\\.) |
| 1009 | + (abbr|accept|acceptCharset|accessKey|action|align|aLink|alt|anchors|applets|archive|areas|attributes|axis|background |
| 1010 | + |bgColor|body|border|caption|cells|cellPadding|cellSpacing|ch|charset|checked|childNodes|chOff|cite|className|clear |
| 1011 | + |code|codeBase|codeType|color|cols|colSpan|compact|content|cookie|cords|data|dateTime|declare|defaultChecked |
| 1012 | + |defaultSelected|defaultValue|defer|dir|disabled|docmain|doctype|documentElement|elements|enctype|entities|event |
| 1013 | + |face|firstChild|form|forms|frame|frameBorder|headers|height|href|hreflang|hspace|htmlFor|httpEquiv|id|images |
| 1014 | + |implementation|index|isMap|label|lang|lastChild|link|links|longDesc|lowSrc|marginHeight|marginWidth|maxLength |
| 1015 | + |media|method|multiple|name|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName|notations |
| 1016 | + |noWrap|object|options|ownerDocument|parentNode|previousDibling|profile|profileend|prompt|publicId|readOnly|referrer |
| 1017 | + |rel|rev|rowIndex|rows|rowSpan|rules|scheme|scope|scrolling|sectionRowIndex|selected|selectedIndex|shape|size|specified |
| 1018 | + |standby|start|summary|systemId|tagName|target|tBodies|text|tFoot|tHead|title|type|URL|useMap|vAlign|value|valueType |
| 1019 | + |version|vLink|vspace|width) |
| 1020 | + \\b |
| 1021 | + ''' |
979 | 1022 | 'captures': |
980 | 1023 | '1': |
981 | 1024 | 'name': 'meta.delimiter.property.period.js' |
982 | 1025 | '2': |
983 | 1026 | 'name': 'support.constant.dom.js' |
984 | 1027 | } |
985 | 1028 | { |
986 | | - 'match': '\\b(ELEMENT_NODE|ATTRIBUTE_NODE|TEXT_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|INDEX_SIZE_ERR|DOMSTRING_SIZE_ERR|HIERARCHY_REQUEST_ERR|WRONG_DOCUMENT_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR|NOT_SUPPORTED_ERR|INUSE_ATTRIBUTE_ERR)\\b' |
| 1029 | + 'match': '''(?x) \\b |
| 1030 | + (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE |
| 1031 | + |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR |
| 1032 | + |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR |
| 1033 | + |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR) |
| 1034 | + \\b |
| 1035 | + ''' |
987 | 1036 | 'name': 'support.constant.dom.js' |
988 | 1037 | } |
989 | 1038 | { |
|
1065 | 1114 | 'name': 'meta.delimiter.method.period.js' |
1066 | 1115 | } |
1067 | 1116 | { |
| 1117 | + # Allows the special return snippet to fire. |
| 1118 | + 'match': '({)(})' |
1068 | 1119 | 'captures': |
1069 | 1120 | '1': |
1070 | 1121 | 'name': 'punctuation.section.scope.begin.js' |
1071 | 1122 | '2': |
1072 | 1123 | 'name': 'punctuation.section.scope.end.js' |
1073 | | - 'comment': 'Allows the special return snippet to fire.' |
1074 | | - 'match': '({)(})' |
1075 | 1124 | } |
1076 | 1125 | { |
1077 | 1126 | 'begin': '{' |
|
1673 | 1722 | 'docblock': |
1674 | 1723 | 'patterns': [ |
1675 | 1724 | { |
1676 | | - 'match': '(?<!\\w)@(abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file|fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects|override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b' |
| 1725 | + 'match': '''(?x) (?<!\\w)@ |
| 1726 | + (abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class |
| 1727 | + |classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc |
| 1728 | + |description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file |
| 1729 | + |fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind |
| 1730 | + |lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects |
| 1731 | + |override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds] |
| 1732 | + |returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted |
| 1733 | + |uses|var|variation|version|virtual|writeOnce)\\b |
| 1734 | + ''' |
1677 | 1735 | 'name': 'storage.type.class.jsdoc' |
1678 | 1736 | } |
1679 | 1737 | { |
|
1715 | 1773 | 'patterns': [ |
1716 | 1774 | { |
1717 | 1775 | 'begin': '/\\*\\*(?!/)' |
1718 | | - 'captures': |
| 1776 | + 'beginCaptures': |
1719 | 1777 | '0': |
1720 | 1778 | 'name': 'punctuation.definition.comment.js' |
| 1779 | + 'end': '\\*/' |
| 1780 | + 'endCaptures': |
| 1781 | + '0': |
| 1782 | + 'name': 'punctuation.definition.comment.js' |
| 1783 | + 'name': 'comment.block.documentation.js' |
1721 | 1784 | 'patterns': [ |
1722 | 1785 | { |
1723 | 1786 | 'include': '#docblock' |
1724 | 1787 | } |
1725 | 1788 | ] |
1726 | | - 'end': '\\*/' |
1727 | | - 'name': 'comment.block.documentation.js' |
1728 | 1789 | } |
1729 | 1790 | { |
1730 | 1791 | 'begin': '/\\*' |
1731 | | - 'captures': |
| 1792 | + 'beginCaptures': |
1732 | 1793 | '0': |
1733 | 1794 | 'name': 'punctuation.definition.comment.js' |
1734 | 1795 | 'end': '\\*/' |
| 1796 | + 'endCaptures': |
| 1797 | + '0': |
| 1798 | + 'name': 'punctuation.definition.comment.js' |
1735 | 1799 | 'name': 'comment.block.js' |
1736 | 1800 | } |
1737 | 1801 | { |
|
0 commit comments