├── README.md ├── tests ├── quote between tags.jsx ├── close p crash.jsx └── quote in html comment.html ├── package.json ├── Pull changes from TextMate.command ├── snippets └── language-javascript-jsx.cson └── grammars ├── html with jsx textcontent.cson ├── jsx attribute values.cson ├── JavaScript with JSX.cson └── javascript.cson /README.md: -------------------------------------------------------------------------------- 1 | # JavaScript, ES6, ES7, React JSX, Flow, etc… 2 | ## by SubtleGradient of Facebook 3 | -------------------------------------------------------------------------------- /tests/quote between tags.jsx: -------------------------------------------------------------------------------- 1 | var myAwesomeThing = ( 2 | 3 | don't? 4 | 5 | {[1,2,3]} 6 | 7 | lulz 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /tests/close p crash.jsx: -------------------------------------------------------------------------------- 1 | 2 |

3 | 4 |

5 | 6 |

7 |

8 | 9 |

10 |

11 | 12 |

{lulz}

13 | 14 | var myAwesomeThing = ( 15 | {[1,2,3]} 16 | ); 17 | -------------------------------------------------------------------------------- /tests/quote in html comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-javascript-jsx", 3 | "version": "0.3.7", 4 | "description": "JavaScript, ES6, ES7, React JSX, Flow, etc… by SubtleGradient of Facebook", 5 | "repository": "https://github.com/subtlegradient/language-javascript-jsx", 6 | "license": "MIT", 7 | "engines": { 8 | "atom": ">0.50.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Pull changes from TextMate.command: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash -l 2 | ThisPackage="$(cd "$(dirname "$0")";pwd)" 3 | AtomRoot="$HOME/.atom" 4 | rm -rf "$TMPDIR/language-javascript-jsx" 5 | apm init --convert "$HOME/Library/Application Support/Avian/Bundles/JavaScript with JSX.tmbundle" --package "$TMPDIR/language-javascript-jsx" 6 | opendiff "$TMPDIR/language-javascript-jsx" "$ThisPackage" -merge "$ThisPackage" 7 | -------------------------------------------------------------------------------- /snippets/language-javascript-jsx.cson: -------------------------------------------------------------------------------- 1 | '.text.html': 2 | 'React Boilerplate': 3 | 'prefix': 'react' 4 | 'body': '\n\n\n\n
\n\n\n' 5 | -------------------------------------------------------------------------------- /grammars/html with jsx textcontent.cson: -------------------------------------------------------------------------------- 1 | fileTypes: [] 2 | injectionSelector: "source.js.jsx meta.tag.block.begin, meta.scope.jsx" 3 | name: "HTML with JSX textContent" 4 | patterns: [ 5 | { 6 | begin: "\\{" 7 | beginCaptures: 8 | "0": 9 | name: "punctuation.section.embedded.begin.jsx" 10 | contentName: "source.js.jsx" 11 | end: "}" 12 | endCaptures: 13 | "0": 14 | name: "punctuation.section.embedded.end.jsx" 15 | name: "meta.embedded.expression.jsx" 16 | patterns: [ 17 | { 18 | include: "source.js.jsx" 19 | } 20 | ] 21 | } 22 | ] 23 | scopeName: "source.js.jsx.react" 24 | -------------------------------------------------------------------------------- /grammars/jsx attribute values.cson: -------------------------------------------------------------------------------- 1 | fileTypes: [] 2 | injectionSelector: "source.js.jsx meta.tag.block.begin" 3 | name: "JSX attribute values" 4 | patterns: [ 5 | { 6 | begin: "\\s*([_$a-zA-Z0-9][-_$a-zA-Z0-9]*)(=)(\\{)" 7 | beginCaptures: 8 | "1": 9 | name: "entity.other.attribute-name.jsx" 10 | "2": 11 | name: "punctuation.separator.key-value.attribute.jsx" 12 | "3": 13 | name: "punctuation.section.embedded.begin.jsx" 14 | contentName: "source.js.jsx" 15 | end: "}" 16 | endCaptures: 17 | "0": 18 | name: "punctuation.section.embedded.end.jsx" 19 | name: "meta.embedded.expression.$1.jsx" 20 | patterns: [ 21 | { 22 | include: "source.js.jsx" 23 | } 24 | ] 25 | } 26 | { 27 | match: "([_$a-zA-Z0-9][-_$a-zA-Z0-9]*)" 28 | name: "entity.other.attribute-name.jsx" 29 | } 30 | { 31 | begin: "\"" 32 | beginCaptures: 33 | "0": 34 | name: "punctuation.definition.string.begin.jsx" 35 | contentName: "meta.scope.inner" 36 | end: "\"" 37 | endCaptures: 38 | "0": 39 | name: "punctuation.definition.string.end.jsx" 40 | name: "string.quoted.double.jsx" 41 | } 42 | { 43 | begin: "'" 44 | beginCaptures: 45 | "0": 46 | name: "punctuation.definition.string.begin.jsx" 47 | contentName: "meta.scope.inner" 48 | end: "'" 49 | endCaptures: 50 | "0": 51 | name: "punctuation.definition.string.end.jsx" 52 | name: "string.quoted.single.jsx" 53 | } 54 | ] 55 | scopeName: "source.js.jsx.attribute-values" 56 | -------------------------------------------------------------------------------- /grammars/JavaScript with JSX.cson: -------------------------------------------------------------------------------- 1 | fileTypes: [ 2 | "js" 3 | "jsx" 4 | "msx" 5 | "react.js" 6 | ] 7 | name: "JavaScript with JSX" 8 | patterns: [ 9 | { 10 | begin: "`" 11 | beginCaptures: 12 | "0": 13 | name: "punctuation.definition.string.begin.es6" 14 | end: "`" 15 | endCaptures: 16 | "0": 17 | name: "punctuation.definition.string.end.es6" 18 | name: "string.quoted.other.es6" 19 | patterns: [ 20 | { 21 | match: "\\\\[\\s\\S]" 22 | name: "constant.character.escape.es" 23 | } 24 | { 25 | begin: "\\$\\{" 26 | beginCaptures: 27 | "0": 28 | name: "punctuation.section.embedded.begin.es6" 29 | contentName: "source.js.jsx" 30 | end: "}" 31 | endCaptures: 32 | "0": 33 | name: "punctuation.section.embedded.begin.es6" 34 | name: "meta.embedded.expression.es6" 35 | patterns: [ 36 | { 37 | include: "$self" 38 | } 39 | ] 40 | } 41 | ] 42 | } 43 | { 44 | captures: 45 | "1": 46 | name: "variable.other.readwrite.js" 47 | "2": 48 | name: "storage.type.class.typescriptish" 49 | "3": 50 | name: "punctuation.separator.continuation.typescriptish" 51 | "4": 52 | name: "storage.type.function.name" 53 | "5": 54 | name: "meta.something" 55 | disabled: 1 56 | match: "([_$a-zA-Z][_$a-zA-Z0-9]*)(\\s*(:)\\s*([_$a-zA-Z][_$a-zA-Z0-9]*)(?:<([^>]*)>)?)" 57 | } 58 | { 59 | captures: 60 | "1": 61 | name: "variable.other.readwrite.js" 62 | "2": 63 | name: "storage.type.class.typescriptish" 64 | match: "([_$a-zA-Z][_$a-zA-Z0-9]*)(<[^>]*>)" 65 | } 66 | { 67 | captures: 68 | "1": 69 | name: "punctuation.definition.preprocessor.begin.hack" 70 | "2": 71 | name: "punctuation.definition.preprocessor.end.hack" 72 | match: "(/\\*)(?:\\??[_$a-zA-Z0-9]+(?:<[^>]+>)?\\|?)+(\\*/ )" 73 | name: "storage.type.class.hack" 74 | } 75 | { 76 | match: "(?<=[_$a-zA-Z0-9\\)\\]\\}>])\\s*<" 77 | name: "keyword.operator.comparison.js" 78 | } 79 | { 80 | include: "#block_tag" 81 | } 82 | { 83 | begin: "(?=<(\\w+))" 84 | disabled: 1 85 | end: "(?<=/>)|(?<=)" 86 | endCaptures: 87 | "0": 88 | name: "punctuation.definition.tag.html.jsx" 89 | name: "text.html.embedded.jsx" 90 | patterns: [ 91 | { 92 | include: "text.html.5" 93 | } 94 | ] 95 | } 96 | { 97 | begin: "{" 98 | beginCaptures: 99 | "0": 100 | name: "punctuation.section.group.begin.es" 101 | comment: "12.1 Block http://es5.github.com/#x12.1" 102 | contentName: "meta.block.es" 103 | end: "}" 104 | endCaptures: 105 | "0": 106 | name: "punctuation.section.group.end.es" 107 | patterns: [ 108 | { 109 | include: "$self" 110 | } 111 | ] 112 | } 113 | { 114 | begin: "\\b(function|(?:get|set)(?=\\s+[_$a-zA-Z]))\\b(?:\\s+((?i)[_$a-z][_$a-z0-9]*))?" 115 | beginCaptures: 116 | "1": 117 | name: "keyword.control.def.es" 118 | "2": 119 | name: "entity.name.function.es" 120 | comment: "13 Function Definition http://es5.github.com/#x13" 121 | end: "(?<=})" 122 | name: "meta" 123 | patterns: [ 124 | { 125 | begin: "\\G" 126 | end: "(?<=\\))" 127 | patterns: [ 128 | { 129 | begin: "\\G(?!\\()" 130 | comment: "function name" 131 | end: "(?=\\()" 132 | patterns: [ 133 | { 134 | include: "#comments" 135 | } 136 | { 137 | match: "\\b(?i)[_$a-z][_$a-z0-9]*\\b" 138 | name: "entity.name.function.es" 139 | } 140 | ] 141 | } 142 | { 143 | begin: "\\(" 144 | beginCaptures: 145 | "0": 146 | name: "punctuation.definition.parameters.begin.function.es" 147 | comment: "function parameters" 148 | contentName: "meta.function.parameters" 149 | end: "\\)" 150 | endCaptures: 151 | "0": 152 | name: "punctuation.definition.parameters.end.function.es" 153 | name: "meta.function.parameters" 154 | patterns: [ 155 | { 156 | include: "#comments" 157 | } 158 | { 159 | match: "\\b(?i)[_$a-z][_$a-z0-9]*\\b" 160 | name: "variable.parameter.function.es" 161 | } 162 | { 163 | match: "," 164 | name: "punctuation.separator.parameters.function.es" 165 | } 166 | ] 167 | } 168 | ] 169 | } 170 | { 171 | include: "#comments" 172 | } 173 | { 174 | begin: "{" 175 | beginCaptures: 176 | "0": 177 | name: "punctuation.definition.function.begin.es" 178 | comment: "function body" 179 | contentName: "meta.function.body" 180 | end: "}" 181 | endCaptures: 182 | "0": 183 | name: "punctuation.definition.function.end.es" 184 | patterns: [ 185 | { 186 | include: "$self" 187 | } 188 | ] 189 | } 190 | ] 191 | } 192 | { 193 | include: "source.js.subtlegradient" 194 | } 195 | ] 196 | repository: 197 | block_tag: 198 | patterns: [ 199 | { 200 | match: "]*)>" 201 | name: "invalid.illegal.tag.end.jsx" 202 | } 203 | { 204 | begin: "(?=(<)([a-zA-Z0-9_$][^\\s]*))" 205 | end: "()|(/>)" 206 | endCaptures: 207 | "0": 208 | name: "meta.tag.block.end.jsx" 209 | "2": 210 | name: "entity.name.tag.jsx" 211 | "4": 212 | name: "meta.tag.block.begin.jsx" 213 | name: "meta.scope.tag.block.jsx" 214 | patterns: [ 215 | { 216 | begin: "\\G(<)([^\\s]+)" 217 | beginCaptures: 218 | "2": 219 | name: "entity.name.tag.jsx" 220 | end: "(>)|(?=/>)" 221 | name: "meta.tag.block.begin.jsx" 222 | patterns: [ 223 | { 224 | include: "#attr" 225 | } 226 | ] 227 | } 228 | { 229 | match: "]*)>" 230 | name: "invalid.illegal.tag.end.jsx" 231 | } 232 | { 233 | match: "<(/[a-zA-Z0-9_$.]*)?($|\\s)" 234 | name: "invalid.illegal.tag.end.jsx" 235 | } 236 | { 237 | begin: "(?<=>)(?!<$)(?!<\\s)(?! \\g*+ \\[ (? (?!.) |//.*+|/\\*((?!\\*/).)++(\\*/|$)|(^)((?!/\\*).)*(\\*/)| (?[^\\[\\]\'"/]) | (? \'(\\\\\'|[^\'])*+\' | "(\\\\"|[^"])*+" | /(\\\\/|[^/])*+/) | (? \\[ \\g*+ \\] ) )*+\n\t\t\t| \\g*+ \\( (? (?!.) |//.*+|/\\*((?!\\*/).)++(\\*/|$)|(^)((?!/\\*).)*(\\*/)| (?[^\\(\\)\'"/]) | \\g | (? \\( \\g*+ \\) ) )*+\n\t\t\t| \\g*+ \\{ (? (?!.) |//.*+|/\\*((?!\\*/).)++(\\*/|$)|(^)((?!/\\*).)*(\\*/)| (?[^\\{\\}\'"/]) | \\g | (? \\{ \\g*+ \\} ) )*+\n\t\t)$' 10 | 'foldingStopMarker': '(?x)^\n\t\t\t# ( Blank |Comments | (No Paren | String) | String | (Nested Parens ) )*+ Close Yes *+\n\t\t\t(?> (? (?!.) |//.*+|/\\*((?!\\*/).)++(\\*/|$)|(^)((?!/\\*).)*(\\*/)| (?[^\\[\\]\'"/]) | (? \'(\\\\\'|[^\'])*+\' | "(\\\\"|[^"])*+" | /(\\\\/|[^/])*+/) | (? \\[ \\g*+ \\] ) )*+ \\] \\g*+\n\t\t\t| (? (?!.) |//.*+|/\\*((?!\\*/).)++(\\*/|$)|(^)((?!/\\*).)*(\\*/)| (?[^\\(\\)\'"/]) | \\g | (? \\( \\g*+ \\) ) )*+ \\) \\g*+\n\t\t\t| (? (?!.) |//.*+|/\\*((?!\\*/).)++(\\*/|$)|(^)((?!/\\*).)*(\\*/)| (?[^\\{\\}\'"/]) | \\g | (? \\{ \\g*+ \\} ) )*+ \\} \\g*+\n\t\t)$' 11 | 'patterns': [ 12 | { 13 | 'include': '#everything' 14 | } 15 | ] 16 | 'repository': 17 | 'comments': 18 | 'patterns': [ 19 | { 20 | 'include': '#special-comments-conditional-compilation' 21 | } 22 | { 23 | 'begin': '/\\*\\*' 24 | 'captures': 25 | '0': 26 | 'name': 'punctuation.definition.comment.js' 27 | 'end': '\\*/' 28 | 'name': 'comment.block.documentation.js' 29 | } 30 | { 31 | 'begin': '/\\*' 32 | 'captures': 33 | '0': 34 | 'name': 'punctuation.definition.comment.js' 35 | 'end': '\\*/' 36 | 'name': 'comment.block.js' 37 | } 38 | { 39 | 'captures': 40 | '1': 41 | 'name': 'punctuation.definition.comment.js' 42 | 'match': '(//).*$\\n?' 43 | 'name': 'comment.line.double-slash.js' 44 | } 45 | { 46 | 'captures': 47 | '0': 48 | 'name': 'punctuation.definition.comment.html.js' 49 | '2': 50 | 'name': 'punctuation.definition.comment.html.js' 51 | 'match': '()' 52 | 'name': 'comment.block.html.js' 53 | } 54 | ] 55 | 'core': 56 | 'patterns': [ 57 | { 58 | 'include': '#literal-function-constructor' 59 | } 60 | { 61 | 'include': '#literal-number' 62 | } 63 | { 64 | 'include': '#literal-string' 65 | } 66 | { 67 | 'include': '#literal-regex' 68 | } 69 | { 70 | 'include': '#literal-keywords' 71 | } 72 | { 73 | 'include': '#literal-function-call' 74 | } 75 | { 76 | 'include': '#literal-labels' 77 | } 78 | { 79 | 'include': '#literal-variable' 80 | } 81 | { 82 | 'include': '#literal-punctuation' 83 | } 84 | ] 85 | 'es5-block': 86 | 'begin': '{' 87 | 'beginCaptures': 88 | '0': 89 | 'name': 'punctuation.section.group.begin.es' 90 | 'comment': '12.1 Block http://es5.github.com/#x12.1' 91 | 'contentName': 'meta.block.es' 92 | 'end': '}' 93 | 'endCaptures': 94 | '0': 95 | 'name': 'punctuation.section.group.end.es' 96 | 'patterns': [ 97 | { 98 | 'include': '$self' 99 | } 100 | ] 101 | 'es5-comments': 102 | 'comment': '7.4 Comments http://es5.github.com/#x7.4' 103 | 'patterns': [ 104 | { 105 | 'begin': '/\\*' 106 | 'beginCaptures': 107 | '0': 108 | 'name': 'punctuation.definition.comment.begin.es.ecmascript' 109 | 'end': '\\*/' 110 | 'endCaptures': 111 | '0': 112 | 'name': 'punctuation.definition.comment.end.es.ecmascript' 113 | 'name': 'comment.block.es.ecmascript' 114 | } 115 | { 116 | 'begin': '//' 117 | 'beginCaptures': 118 | '0': 119 | 'name': 'punctuation.definition.comment.es.ecmascript' 120 | 'end': '$' 121 | 'name': 'comment.line.double-slash.es.ecmascript' 122 | } 123 | ] 124 | 'es5-expression-left-hand-side': 125 | 'comment': '11.2 Left-Hand-Side Expressions http://es5.github.com/#x11.2' 126 | 'es5-expression-primary': 127 | 'comment': '11.1 Primary Expressions http://es5.github.com/#x11.1' 128 | 'es5-expression-statement': 129 | 'comment': '12.4 Expression Statement http://es5.github.com/#x12.4' 130 | 'es5-function-definition': 131 | 'begin': '\\b(function|(?:get|set|static)(?=\\s+[_$a-zA-Z]))\\b(?:\\s+((?i)[_$a-z][_$a-z0-9]*))?' 132 | 'beginCaptures': 133 | '1': 134 | 'name': 'keyword.control.def.es' 135 | '2': 136 | 'name': 'entity.name.function.$1.es' 137 | 'comment': '13 Function Definition http://es5.github.com/#x13' 138 | 'end': '(?<=})' 139 | 'name': 'meta.$1' 140 | 'patterns': [ 141 | { 142 | 'begin': '\\G' 143 | 'end': '(?<=\\))' 144 | 'patterns': [ 145 | { 146 | 'begin': '\\G(?!\\()' 147 | 'comment': 'function name' 148 | 'end': '(?=\\()' 149 | 'patterns': [ 150 | { 151 | 'include': '#comments' 152 | } 153 | { 154 | 'match': '\\b(?i)[_$a-z][_$a-z0-9]*\\b' 155 | 'name': 'entity.name.function.$1.es' 156 | } 157 | ] 158 | } 159 | { 160 | 'begin': '\\(' 161 | 'beginCaptures': 162 | '0': 163 | 'name': 'punctuation.definition.parameters.begin.function.es' 164 | 'comment': 'function parameters' 165 | 'contentName': 'meta.function.parameters' 166 | 'end': '\\)' 167 | 'endCaptures': 168 | '0': 169 | 'name': 'punctuation.definition.parameters.end.function.es' 170 | 'name': 'meta.function.parameters' 171 | 'patterns': [ 172 | { 173 | 'include': '#comments' 174 | } 175 | { 176 | 'match': '\\b(?i)[_$a-z][_$a-z0-9]*\\b' 177 | 'name': 'variable.parameter.function.es' 178 | } 179 | { 180 | 'match': ',' 181 | 'name': 'punctuation.separator.parameters.function.es' 182 | } 183 | ] 184 | } 185 | ] 186 | } 187 | { 188 | 'include': '#comments' 189 | } 190 | { 191 | 'begin': '{' 192 | 'beginCaptures': 193 | '0': 194 | 'name': 'punctuation.definition.function.begin.es' 195 | 'comment': 'function body' 196 | 'contentName': 'meta.function.body' 197 | 'end': '}' 198 | 'endCaptures': 199 | '0': 200 | 'name': 'punctuation.definition.function.end.es' 201 | 'patterns': [ 202 | { 203 | 'include': '$self' 204 | } 205 | ] 206 | } 207 | ] 208 | 'es5-identifiers': 209 | 'comment': '7.6 Identifier Names and Identifiers http://es5.github.com/#x7.6' 210 | 'patterns': [ 211 | { 212 | 'include': '#identifiers-keywords' 213 | } 214 | { 215 | 'include': '#identifiers-future-reserved-words' 216 | } 217 | { 218 | 'include': '#identifiers-future-reserved-words-strict' 219 | } 220 | ] 221 | 'es5-identifiers-future-reserved-words': 222 | 'comment': '7.6.1.2a Future Reserved Words http://es5.github.com/#x7.6.1.2' 223 | 'match': '\\b(super|c(onst|lass)|import|from|as|e(num|x(tends|port)))\\b' 224 | 'name': 'invalid.illegal.reserved.keyword.$1.es.ecmascript' 225 | 'es5-identifiers-future-reserved-words-strict': 226 | 'comment': '7.6.1.2b Future Reserved Words http://es5.github.com/#x7.6.1.2' 227 | 'match': '\\b(static|yield|i(nterface|mplements)|p(ublic|ackage|r(ivate|otected))|let)\\b' 228 | 'name': 'invalid.illegal.reserved.keyword.$1.es.ecmascript.strict' 229 | 'es5-identifiers-keywords': 230 | 'comment': '7.6.1.1 Keywords http://es5.github.com/#x7.6.1.1' 231 | 'match': '\\b(switch|new|c(ontinue|a(se|tch))|t(h(is|row)|ypeof|ry)|i(n(stanceof)?|f)|d(o|e(fault|lete|bugger))|else|v(oid|ar)|f(inally|or|unction)|w(hile|ith)|return|break)\\b' 232 | 'name': 'keyword.other.$1.es.ecmascript' 233 | 'es5-initialiser-array': 234 | 'comment': '11.1.4 Array Initialiser http://es5.github.com/#x11.1.4' 235 | 'es5-initialiser-object': 236 | 'comment': '11.1.5 Object Initialiser http://es5.github.com/#x11.1.5' 237 | 'es5-line-terminators': 238 | 'comment': '7.3 Line Terminators http://es5.github.com/#x7.3' 239 | 'es5-literal-numeric': 240 | 'comment': '7.8.3 Numeric Literals http://es5.github.com/#x7.8.3' 241 | 'es5-literal-string': 242 | 'comment': '7.8.4 String Literals http://es5.github.com/#x7.8.4' 243 | 'patterns': [ 244 | { 245 | 'begin': '"' 246 | 'beginCaptures': 247 | '0': 248 | 'name': 'punctuation.definition.string.begin.es' 249 | 'end': '"|(\\n)' 250 | 'endCaptures': 251 | '0': 252 | 'name': 'punctuation.definition.string.end.es' 253 | '1': 254 | 'name': 'invalid.illegal.character.newline.es' 255 | 'name': 'string.quoted.double.es' 256 | 'patterns': [ 257 | { 258 | 'include': '#string-escape' 259 | } 260 | ] 261 | } 262 | { 263 | 'begin': '\'' 264 | 'beginCaptures': 265 | '0': 266 | 'name': 'punctuation.definition.string.begin.es' 267 | 'end': '\'|(\\n)' 268 | 'endCaptures': 269 | '0': 270 | 'name': 'punctuation.definition.string.begin.es' 271 | '1': 272 | 'name': 'invalid.illegal.character.newline.es' 273 | 'name': 'string.quoted.single.es' 274 | 'patterns': [ 275 | { 276 | 'include': '#string-escape' 277 | } 278 | ] 279 | } 280 | ] 281 | 'repository': 282 | 'string-escape': 283 | 'patterns': [ 284 | { 285 | 'match': '(?i)\\\\u[0-9A-F]{4}' 286 | 'name': 'constant.character.escape.unicode.es' 287 | } 288 | { 289 | 'match': '(?i)\\\\x[0-9A-F]{2}' 290 | 'name': 'constant.character.escape.hex.es' 291 | } 292 | { 293 | 'match': '\\\\"' 294 | 'name': 'constant.character.escape.quote.double.newline.es' 295 | } 296 | { 297 | 'match': '\\\\\'' 298 | 'name': 'constant.character.escape.quote.single.newline.es' 299 | } 300 | { 301 | 'match': '(?i)\\\\\\n' 302 | 'name': 'punctuation.separator.continuation.string.es' 303 | } 304 | { 305 | 'match': '(?i)\\\\[\'"\\\\bfnrtv]' 306 | 'name': 'constant.character.escape.es' 307 | } 308 | { 309 | 'captures': 310 | '0': 311 | 'name': 'invalid.deprecated.unnecessary.escape.es' 312 | 'match': '\\\\.' 313 | 'name': 'constant.character.escape.es' 314 | } 315 | ] 316 | 'es5-literals': 317 | 'comment': '7.8 Literals http://es5.github.com/#x7.8' 318 | 'patterns': [ 319 | { 320 | 'comment': '7.8.1 Null Literals http://es5.github.com/#x7.8.1' 321 | 'match': '\\bnull\\b' 322 | 'name': 'constant.language.null.es' 323 | } 324 | { 325 | 'comment': '7.8.2 Boolean Literals http://es5.github.com/#x7.8.2' 326 | 'match': '\\b(true|false)\\b' 327 | 'name': 'constant.language.boolean.$1.es' 328 | } 329 | { 330 | 'include': '#literal-numeric' 331 | } 332 | { 333 | 'include': '#literal-string' 334 | } 335 | ] 336 | 'es5-operator': 337 | 'comment': '11 Operators http://es5.github.com/#x11' 338 | 'patterns': [ 339 | { 340 | 'comment': '10.6 Arguments Object http://es5.github.com/#x10.6' 341 | 'match': '\\barguments\\b' 342 | 'name': 'variable.language.arguments.es' 343 | } 344 | { 345 | 'comment': '11.1.1 The this Keyword http://es5.github.com/#x11.1.1' 346 | 'match': '\\bthis\\b' 347 | 'name': 'variable.language.this.es' 348 | } 349 | { 350 | 'comment': '11.2.2 The new Operator http://es5.github.com/#x11.2.2' 351 | 'match': '\\bnew\\b' 352 | 'name': 'keyword.operator.new.es' 353 | } 354 | { 355 | 'captures': 356 | '1': 357 | 'name': 'keyword.operator.assignment.arithmetic.postfix.es' 358 | 'comment': '11.3 Postfix Expressions http://es5.github.com/#x11.3' 359 | 'match': '\\b\\s*(\\+\\+|--)' 360 | } 361 | { 362 | 'comment': '11.9 Equality Operators http://es5.github.com/#x11.9' 363 | 'patterns': [ 364 | { 365 | 'match': '!==|!=|===|==' 366 | 'name': 'keyword.operator.equality.es' 367 | } 368 | ] 369 | } 370 | { 371 | 'comment': '11.13 Assignment Operators http://es5.github.com/#x11.13' 372 | 'patterns': [ 373 | { 374 | 'match': '[-+*/%]=' 375 | 'name': 'keyword.operator.assignment.arithmetic.es' 376 | } 377 | { 378 | 'match': '(>>>|>>|<<|[&^|])=' 379 | 'name': 'keyword.operator.assignment.bitwise.es' 380 | } 381 | ] 382 | } 383 | { 384 | 'comment': '11.4 Unary Operators http://es5.github.com/#x11.4' 385 | 'patterns': [ 386 | { 387 | 'match': '\\b(delete|void|typeof)\\b' 388 | 'name': 'keyword.operator.$1.unary.es' 389 | } 390 | { 391 | 'match': '(\\+\\+|--)' 392 | 'name': 'keyword.operator.assignment.arithmetic.prefix.unary.es' 393 | } 394 | { 395 | 'match': '[-+~](?!\\s)' 396 | 'name': 'keyword.operator.unary.es' 397 | } 398 | { 399 | 'match': '!' 400 | 'name': 'keyword.operator.logical.not.unary.es' 401 | } 402 | { 403 | 'match': '~' 404 | 'name': 'keyword.operator.bitwise.not.unary.es' 405 | } 406 | ] 407 | } 408 | { 409 | 'comment': '11.5 Multiplicative Operators http://es5.github.com/#x11.5' 410 | 'match': '[*/%]' 411 | 'name': 'keyword.operator.arithmetic.multiplicative.es' 412 | } 413 | { 414 | 'comment': '11.6 Additive Operators http://es5.github.com/#x11.6' 415 | 'match': '[-+]' 416 | 'name': 'keyword.operator.arithmetic.additive.es' 417 | } 418 | { 419 | 'comment': '11.7 Bitwise Shift Operators http://es5.github.com/#x11.7' 420 | 'match': '>>>|>>|<<' 421 | 'name': 'keyword.operator.bitwise.shift.es' 422 | } 423 | { 424 | 'comment': '11.10 Binary Bitwise Operators http://es5.github.com/#x11.10' 425 | 'match': '[&^|]' 426 | 'name': 'keyword.operator.bitwise.binary.es' 427 | } 428 | { 429 | 'comment': '11.11 Binary Logical Operators http://es5.github.com/#x11.11' 430 | 'match': '' 431 | 'name': 'keyword.operator.logical.binary.es' 432 | } 433 | { 434 | 'comment': '11.12 Conditional Operator http://es5.github.com/#x11.12' 435 | 'match': '' 436 | 'name': 'keyword.operator.conditional.es' 437 | } 438 | { 439 | 'comment': '11.8 Relational Operators http://es5.github.com/#x11.8' 440 | 'patterns': [ 441 | { 442 | 'match': '\\b(instanceof|in)\\b' 443 | 'name': 'keyword.operator.comparison.$1.es' 444 | } 445 | { 446 | 'match': '>=|<=|>|<' 447 | 'name': 'keyword.operator.comparison.es' 448 | } 449 | { 450 | 'match': '=>' 451 | 'name': 'keyword.operator.assignment.function.es' 452 | } 453 | { 454 | 'match': '=>|=<' 455 | 'name': 'invalid.illegal.operator.comparison.es' 456 | } 457 | { 458 | 'match': '\\.\\.\\.\\s*(?=[_$a-z])' 459 | 'name': 'keyword.other.rest-args.es' 460 | } 461 | ] 462 | } 463 | { 464 | 'comment': '11.13 Assignment Operators http://es5.github.com/#x11.13' 465 | 'patterns': [ 466 | { 467 | 'match': '=' 468 | 'name': 'keyword.operator.assignment.simple.es' 469 | } 470 | ] 471 | } 472 | ] 473 | 'es5-program': 474 | 'patterns': [ 475 | { 476 | 'include': '#es5-function-definition' 477 | } 478 | { 479 | 'include': '#es5-comments' 480 | } 481 | { 482 | 'include': '#es5-operator' 483 | } 484 | { 485 | 'include': '#es5-identifiers' 486 | } 487 | { 488 | 'include': '#es5-literals' 489 | } 490 | { 491 | 'include': '#es5-block' 492 | } 493 | { 494 | 'comment': 'Not sure where else to put this, yet' 495 | 'patterns': [ 496 | { 497 | 'match': ';' 498 | 'name': 'punctuation.terminator.statement.es' 499 | } 500 | ] 501 | } 502 | ] 503 | 'es5-punctuators': 504 | 'comment': '7.7 Punctuators http://es5.github.com/#x7.7' 505 | 'es5-statement': 506 | 'comment': '12 Statements http://es5.github.com/#x12' 507 | 'es5-statement-break': 508 | 'comment': '12.8 The Break Statement http://es5.github.com/#x12.8' 509 | 'es5-statement-continue': 510 | 'comment': '12.7 The Continue Statement http://es5.github.com/#x12.7' 511 | 'es5-statement-debugger': 512 | 'comment': '12.15 The Debugger Statement http://es5.github.com/#x12.15' 513 | 'es5-statement-empty': 514 | 'comment': '12.3 Empty Statement http://es5.github.com/#x12.3' 515 | 'es5-statement-if': 516 | 'comment': '12.5 If Statement http://es5.github.com/#x12.5' 517 | 'es5-statement-iteration': 518 | 'comment': '12.6 Iteration Statements http://es5.github.com/#x12.6' 519 | 'es5-statement-labelled': 520 | 'comment': '12.12 Labelled Statements http://es5.github.com/#x12.12' 521 | 'es5-statement-return': 522 | 'comment': '12.9 The Return Statement http://es5.github.com/#x12.9' 523 | 'es5-statement-throw': 524 | 'comment': '12.13 The Throw Statement http://es5.github.com/#x12.13' 525 | 'es5-statement-try': 526 | 'comment': '12.14 The try Statement http://es5.github.com/#x12.14' 527 | 'es5-statement-variable': 528 | 'comment': '12.2 Variable Statement http://es5.github.com/#x12.2' 529 | 'es5-statement-with': 530 | 'comment': '12.10 The With Statement http://es5.github.com/#x12.10' 531 | 'es5-white-space': 532 | 'comment': '7.2 White Space http://es5.github.com/#x7.2' 533 | 'everything': 534 | 'patterns': [ 535 | { 536 | 'include': '#comments' 537 | } 538 | { 539 | 'include': '#literal-regex' 540 | } 541 | { 542 | 'include': '#es5-program' 543 | } 544 | { 545 | 'include': '#support' 546 | } 547 | { 548 | 'include': '#core' 549 | } 550 | { 551 | 'include': '#special' 552 | } 553 | ] 554 | 'function-definition': 555 | 'begin': '\\b(function)(?:\\s+((?i)[_$a-z][_$a-z0-9]*))?' 556 | 'beginCaptures': 557 | '1': 558 | 'name': 'keyword.control.def.js' 559 | '2': 560 | 'name': 'entity.name.function.$1.js' 561 | 'comment': '13 Function Definition http://es5.github.com/#x13' 562 | 'end': '(?<=})' 563 | 'name': 'meta.$1' 564 | 'patterns': [ 565 | { 566 | 'begin': '\\G' 567 | 'end': '(?<=\\))' 568 | 'patterns': [ 569 | { 570 | 'begin': '\\G(?!\\()' 571 | 'comment': 'function name' 572 | 'end': '(?=\\()' 573 | 'patterns': [ 574 | { 575 | 'include': '#comments' 576 | } 577 | { 578 | 'match': '(?i)[_$a-z][_$a-z0-9]*' 579 | 'name': 'entity.name.function.$0.js' 580 | } 581 | ] 582 | } 583 | { 584 | 'begin': '\\(' 585 | 'beginCaptures': 586 | '0': 587 | 'name': 'punctuation.definition.parameters.begin.function.js' 588 | 'comment': 'function parameters' 589 | 'contentName': 'meta.function.parameters' 590 | 'end': '\\)' 591 | 'endCaptures': 592 | '0': 593 | 'name': 'punctuation.definition.parameters.end.function.js' 594 | 'name': 'meta.function.parameters' 595 | 'patterns': [ 596 | { 597 | 'include': '#comments' 598 | } 599 | { 600 | 'match': '\\b(?i)[_$a-z][_$a-z0-9]*\\b' 601 | 'name': 'variable.parameter.function.js' 602 | } 603 | { 604 | 'match': ',' 605 | 'name': 'punctuation.separator.parameters.function.js' 606 | } 607 | ] 608 | } 609 | ] 610 | } 611 | { 612 | 'include': '#comments' 613 | } 614 | { 615 | 'begin': '{' 616 | 'beginCaptures': 617 | '0': 618 | 'name': 'punctuation.definition.function.begin.js' 619 | 'comment': 'function body' 620 | 'contentName': 'meta.function.body' 621 | 'end': '}' 622 | 'endCaptures': 623 | '0': 624 | 'name': 'punctuation.definition.function.end.js' 625 | 'patterns': [ 626 | { 627 | 'include': '#core' 628 | } 629 | ] 630 | } 631 | ] 632 | 'literal-function-call': 633 | 'patterns': [ 634 | { 635 | 'begin': '(?=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=' 761 | 'name': 'keyword.operator.js' 762 | } 763 | { 764 | 'disabled': 1 765 | 'match': ':' 766 | 'name': 'punctuation.separator.key-value' 767 | } 768 | { 769 | 'match': '(?x)\n\t\t\t\t\t!(?!=)| # logical-not right-to-left right\n\t\t\t\t\t&& | # logical-and left-to-right both\n\t\t\t\t\t\\|\\| # logical-or left-to-right both\n\t\t\t\t\t' 770 | 'name': 'keyword.operator.logical.js' 771 | } 772 | { 773 | 'match': '(?x)\n\t\t\t\t\t %= | # assignment right-to-left both\n\t\t\t\t\t &= | # assignment right-to-left both\n\t\t\t\t\t \\*= | # assignment right-to-left both\n\t\t\t\t\t \\+= | # assignment right-to-left both\n\t\t\t\t\t -= | # assignment right-to-left both\n\t\t\t\t\t /= | # assignment right-to-left both\n\t\t\t\t\t \\^= | # assignment right-to-left both\n\t\t\t\t\t \\|= | # assignment right-to-left both\n\t\t\t\t\t <<= | # assignment right-to-left both\n\t\t\t\t\t >>= | # assignment right-to-left both\n\t\t\t\t\t>>>= # assignment right-to-left both\n\t\t\t\t\t' 774 | 'name': 'keyword.operator.assignment.augmented.js' 775 | } 776 | { 777 | 'match': '(?x)\n\t\t\t\t\t~ | # bitwise-not right-to-left right\n\t\t\t\t\t<< | # bitwise-shift left-to-right both\n\t\t\t\t\t>>> | # bitwise-shift left-to-right both\n\t\t\t\t\t>> | # bitwise-shift left-to-right both\n\t\t\t\t\t& | # bitwise-and left-to-right both\n\t\t\t\t\t\\^ | # bitwise-xor left-to-right both\n\t\t\t\t\t\\| # bitwise-or left-to-right both\n\t\t\t\t\t' 778 | 'name': 'keyword.operator.bitwise.js' 779 | } 780 | { 781 | 'match': '(?x)\n\t\t\t\t\t<= | # relational left-to-right both\n\t\t\t\t\t>= | # relational left-to-right both\n\t\t\t\t\t< | # relational left-to-right both\n\t\t\t\t\t> # relational left-to-right both\n\t\t\t\t\t' 782 | 'name': 'keyword.operator.relational.js' 783 | } 784 | { 785 | 'match': '(?x)\n\t\t\t\t\t=== | # equality left-to-right both\n\t\t\t\t\t!== | # equality left-to-right both\n\t\t\t\t\t == | # equality left-to-right both\n\t\t\t\t\t!= # equality left-to-right both\n\t\t\t\t\t' 786 | 'name': 'keyword.operator.comparison.js' 787 | } 788 | { 789 | 'match': '(?x)\n\t\t\t\t\t= # assignment right-to-left both\n\t\t\t\t\t' 790 | 'name': 'keyword.operator.assignment.js' 791 | } 792 | { 793 | 'match': '(?x)\n\t\t\t\t\t-- | # decrement n/a right-or-left\n\t\t\t\t\t\\+\\+ | # increment n/a right-or-left\n\t\t\t\t\t/ | # division left-to-right both\n\t\t\t\t\t% | # modulus left-to-right both\n\t\t\t\t\t\\* | # multiplication left-to-right both\n\t\t\t\t\t\\+ | # addition left-to-right both\n\t\t\t\t\t- # subtraction left-to-right both\n\t\t\t\t\t' 794 | 'name': 'keyword.operator.arithmetic.js' 795 | } 796 | ] 797 | 'literal-labels': 798 | 'patterns': [ 799 | { 800 | 'captures': 801 | '2': 802 | 'name': 'punctuation.separator.key-value.js' 803 | 'match': '(?<=[\'"])(\\s*)(:)' 804 | } 805 | { 806 | 'captures': 807 | '1': 808 | 'name': 'string.unquoted.js-label.js' 809 | '2': 810 | 'name': 'punctuation.separator.key-value.js' 811 | 'match': '(?\\s*\\n)|(?<=[^\\\\]\\n)' 876 | 'endCaptures': 877 | '1': 878 | 'name': 'string.regexp.js' 879 | '2': 880 | 'name': 'punctuation.definition.string.end.js' 881 | '3': 882 | 'name': 'keyword.other.js' 883 | 'patterns': [ 884 | { 885 | 'match': '\\\\\\n' 886 | 'name': 'constant.character.escape.newline.js' 887 | } 888 | { 889 | 'match': '\\n' 890 | 'name': 'invalid.illegal.newline.js' 891 | } 892 | { 893 | 'match': '\\\\.' 894 | 'name': 'constant.character.escape.js' 895 | } 896 | ] 897 | } 898 | ] 899 | 'literal-string': 900 | 'patterns': [ 901 | { 902 | 'begin': '\'' 903 | 'beginCaptures': 904 | '0': 905 | 'name': 'punctuation.definition.string.begin.js' 906 | 'end': '(?i)\'|(?=\\s*\\n)|(?<=[^\\\\]\\n)' 907 | 'endCaptures': 908 | '0': 909 | 'name': 'punctuation.definition.string.end.js' 910 | 'name': 'string.quoted.single.js' 911 | 'patterns': [ 912 | { 913 | 'include': '#string-single-innards' 914 | } 915 | ] 916 | } 917 | { 918 | 'begin': '"' 919 | 'beginCaptures': 920 | '0': 921 | 'name': 'punctuation.definition.string.begin.js' 922 | 'end': '(?i)"|(?=\\s*\\n)|(?<=[^\\\\]\\n)' 923 | 'endCaptures': 924 | '0': 925 | 'name': 'punctuation.definition.string.end.js' 926 | 'name': 'string.quoted.double.js' 927 | 'patterns': [ 928 | { 929 | 'include': '#string-double-innards' 930 | } 931 | ] 932 | } 933 | ] 934 | 'literal-variable': 935 | 'patterns': [ 936 | { 937 | 'match': '(?' 1034 | 'name': 'invalid.deprecated.inconsistent.js' 1035 | } 1036 | ] 1037 | 'string-single-innards': 1038 | 'patterns': [ 1039 | { 1040 | 'match': '\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' 1041 | 'name': 'constant.character.escape.js' 1042 | } 1043 | { 1044 | 'match': '\\\\\\n' 1045 | 'name': 'constant.character.escape.newline.js' 1046 | } 1047 | { 1048 | 'match': '\\n' 1049 | 'name': 'invalid.illegal.newline.js' 1050 | } 1051 | { 1052 | 'match': '(?i)' 1053 | 'name': 'invalid.deprecated.inconsistent.js' 1054 | } 1055 | ] 1056 | 'support': 1057 | 'patterns': [ 1058 | { 1059 | '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|Math|MimeType|Number|navigator|netscape|Object|Option|Packages|Password|Plugin|Radio|RegExp|Reset|Select|String|Style|Submit|screen|sun|Text|Textarea|window|XMLHttpRequest)\\b' 1060 | 'name': 'support.class.js' 1061 | } 1062 | { 1063 | 'match': '\\b(R(e(ferenceError|gExp)|ange(E(rror|xception))?)|X(ML(Serializer|HttpRequest(Upload|Exception)?|Document)|SLTProcessor|Path(Result|E(valuator|xception)))|M(imeTypeArray|ouseEvent|utationEvent|e(ssage(Port|Event)|dia(Error|List)))|B(oolean|eforeLoadEvent)|S(yntaxError|t(yleSheetList|orage(Event)?|ring)|VG(Re(nderingIntent|ctElement)|G(Element|radientElement)|Ma(skElement|trix|rkerElement)|S(ymbolElement|t(opElement|ringList)|witchElement|VGElement)|NumberList|C(ircleElement|olor|ursorElement|lipPathElement)|T(itleElement|ext(ContentElement|PathElement|Element)|ransform(List)?)|ImageElement|D(ocument|e(scElement|fsElement))|U(seElement|nitTypes)|P(o(int(List)?|ly(lineElement|gonElement))|a(t(h(Seg(List)?|Element)|ternElement)|int)|reserveAspectRatio)|E(l(ementInstance(List)?|lipseElement)|xception)|ViewElement|ForeignObjectElement|L(ineElement|ength(List)?)|A(ngle|Element))|QLException)|H(TML(M(ediaElement|arqueeElement)|ButtonElement|SelectElement|C(ollection|anvasElement)|T(extAreaElement|able(RowElement|SectionElement|Element))|I(nputElement|FrameElement)|O(utputElement|bjectElement)|Document|E(lement|mbedElement)|VideoElement|KeygenElement|F(ieldSetElement|ormElement|rameElement)|A(nchorElement|llCollection))|ashChangeEvent)|N(ode(Filter|List)?|umber|amedNodeMap)|C(haracterData|SS(Rule(List)?|MediaRule|Style(Sheet|Declaration)|PrimitiveValue|Value(List)?)|l(i(pboard|entRectList)|oseEvent)|anvas(RenderingContext2D|Gradient))|T(ypeError|imeRanges|ext(Event)?)|Int(16Array|8Array|32Array)|O(verflowEvent|bject)|D(ocument(Fragment)?|OM(StringList|TokenList|Implementation|Parser|Exception)|at(e|aView))|U(RIError|int(16Array|8Array|32Array)|IEvent)|P(lugin(Array)?|ageTransitionEvent|rogressEvent)|E(v(ent(Source|Exception)?|alError)|lement|rror)|KeyboardEvent|F(ileList|ormData|unction|loat32Array)|W(heelEvent|orker|eb(GLRenderingContext|Socket|Kit(CSS(Matrix|TransformValue|KeyframesRule)|TransitionEvent|AnimationEvent)))|Array)\\b' 1064 | 'name': 'support.class.js' 1065 | } 1066 | { 1067 | 'captures': 1068 | '0': 1069 | 'name': 'support.function.js' 1070 | 'match': '\\b(s(hift|ort|plice)|unshift|p(op|ush)|reverse)\\b(?=\\()' 1071 | 'name': 'entity.name.function.mutator.js' 1072 | } 1073 | { 1074 | 'captures': 1075 | '0': 1076 | 'name': 'support.function.js' 1077 | 'match': '\\b(s(h(ift|ow(Mod(elessDialog|alDialog)|Help))|croll(X|By(Pages|Lines)?|Y|To)?|t(op|rike)|i(n|zeToContent|debar|gnText)|ort|u(p|b(str(ing)?)?)|pli(ce|t)|e(nd|t(Re(sizable|questHeader)|M(i(nutes|lliseconds)|onth)|Seconds|Ho(tKeys|urs)|Year|Cursor|Time(out)?|Interval|ZOptions|Date|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(ome|andleEvent)|navigate|c(har(CodeAt|At)|o(s|n(cat|textual|firm)|mpile)|eil|lear(Timeout|Interval)?|a(ptureEvents|ll)|reate(StyleSheet|Popup|EventObject))|t(o(GMTString|S(tring|ource)|U(TCString|pperCase)|Lo(caleString|werCase))|est|a(n|int(Enabled)?))|i(s(NaN|Finite)|ndexOf|talics)|d(isableExternalCapture|ump|etachEvent)|u(n(shift|taint|escape|watch)|pdateCommands)|j(oin|avaEnabled)|p(o(p|w)|ush|lugins.refresh|a(ddings|rse(Int|Float)?)|r(int|ompt|eference))|e(scape|nableExternalCapture|val|lementFromPoint|x(p|ec(Script|Command)?))|valueOf|UTC|queryCommand(State|Indeterm|Enabled|Value)|f(i(nd|le(ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(nt(size|color)|rward)|loor|romCharCode)|watch|l(ink|o(ad|g)|astIndexOf)|a(sin|nchor|cos|t(tachEvent|ob|an(2)?)|pply|lert|b(s|ort))|r(ou(nd|teEvents)|e(size(By|To)|calc|turnValue|place|verse|l(oad|ease(Capture|Events)))|andom)|g(o|et(ResponseHeader|M(i(nutes|lliseconds)|onth)|Se(conds|lection)|Hours|Year|Time(zoneOffset)?|Da(y|te)|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear)|FullYear|A(ttention|llResponseHeaders)))|m(in|ove(B(y|elow)|To(Absolute)?|Above)|ergeAttributes|a(tch|rgins|x))|b(toa|ig|o(ld|rderWidths)|link|ack))\\b(?=\\()' 1078 | 'name': 'entity.name.function.js' 1079 | } 1080 | { 1081 | 'match': '\\b(is(NaN|Finite)|decodeURI(Component)?|unescape|parse(Int|Float)|e(scape|ncodeURI(Component)?|val))\\b' 1082 | 'name': 'support.function.other.js' 1083 | } 1084 | { 1085 | 'match': '\\b(s(ub(stringData|mit)|plitText|e(t(NamedItem|Attribute(Node)?)|lect))|has(ChildNodes|Feature)|namedItem|c(l(ick|o(se|neNode))|reate(C(omment|DATASection|aption)|T(Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(ntityReference|lement)|Attribute))|tabIndex|i(nsert(Row|Before|Cell|Data)|tem)|open|delete(Row|C(ell|aption)|T(Head|Foot)|Data)|focus|write(ln)?|a(dd|ppend(Child|Data))|re(set|place(Child|Data)|move(NamedItem|Child|Attribute(Node)?)?)|get(NamedItem|Element(sBy(Name|TagName)|ById)|Attribute(Node)?)|blur)\\b(?=\\()' 1086 | 'name': 'support.function.dom.js' 1087 | } 1088 | { 1089 | 'match': '(?<=\\.)(h(space|idden|eight)|s(croll(Height|Top|Left|Width)|t(yle|andby)|pellcheck)|n(ode(Name|Type|Value)|ext(Sibling|ElementSibling)|ame(spaceURI)?)|c(hild(Nodes|ElementCount|ren)|o(ntent(Document|Editable)|de(Base|Type)?)|l(ient(Height|Top|Left|Width)|ass(Name|List)))|i(sContentEditable|nner(HTML|Text)|d)|t(ype|itle|extContent|a(gName|bIndex)|ranslate)|o(n(s(croll|ubmit|e(arch|lect(start)?))|c(hange|o(ntextmenu|py)|ut|lick)|in(put|valid)|d(r(op|ag(start|over|en(ter|d)|leave)?)|blclick)|error|paste|key(down|up|press)|focus|abort|load|webkitfullscreen(change|error)|reset|mouse(down|o(ut|ver)|up|wheel|move)|b(efore(c(opy|ut)|paste)|lur))|uter(HTML|Text)|ffset(Height|Top|Parent|Left|Width)|wnerDocument)|d(ir|eclare|ata(set)?|raggable)|useMap|p(arent(Node|Element)|re(vious(Sibling|ElementSibling)|fix))|v(space|alid(ity|ationMessage))|f(irst(Child|ElementChild)|orm)|l(ocalName|a(st(Child|ElementChild)|ng))|a(ccessKey|ttributes|lign|rchive)|w(i(dth|llValidate)|ebkit(ShadowRoot|dropzone|Pseudo))|b(order|aseURI))\\b' 1090 | 'name': 'support.variable.property.js' 1091 | } 1092 | { 1093 | 'match': '(?<=\\.)(s(ystemLanguage|cr(ipts|ollbars|een(X|Y|Top|Left))|t(yle(Sheets)?|atus(Text|bar)?)|ibling(Below|Above)|ource|uffixes|e(curity(Policy)?|l(ection|f)))|h(istory|ost(name)?|as(h|Focus))|y|n(ext|ame(space(s|URI)|Prop))|c(haracterSet|o(ntrollers|okieEnabled|lorDepth|mp(onents|lete))|urrent|puClass|l(i(p(boardData)?|entInformation)|osed|asses)|alle(e|r)|rypto)|X(MLDocument|SLDocument)|M(IN_VALUE|AX_VALUE)|t(o(olbar|p)|ext(Transform|Indent|Decoration|Align)|ags)|i(n(ner(Height|Width)|put)|ds|gnoreCase)|SQRT(1_2|2)|zIndex|o(scpu|n(readystatechange|Line)|uter(Height|Width)|p(sProfile|ener)|ffscreenBuffering)|d(i(splay|alog(Height|Top|Width|Left|Arguments)|rectories)|e(scription|fault(Status|Ch(ecked|arset)|View)))|NEGATIVE_INFINITY|u(ser(Profile|Language|Agent)|niqueID|pdateInterval)|_content|p(ixelDepth|ort|ersonalbar|kcs11|l(ugins|atform)|a(thname|dding(Right|Bottom|Top|Left)|rent(Window|Layer)?|ge(X(Offset)?|Y(Offset)?))|r(o(tocol|duct(Sub)?|mpter)|e(vious|fix)))|e(n(coding|abledPlugin)|x(ternal|pando)|mbeds)|v(isibility|endor(Sub)?|Linkcolor)|URLUnencoded|f(ilename|o(nt(Size|Family|Weight)|rmName)|rame(s|Element)|gColor)|P(I|OSITIVE_INFINITY)|E|whiteSpace|l(i(stStyleType|n(eHeight|kColor))|o(ca(tion(bar)?|lName)|wsrc)|e(ngth|ft(Context)?)|a(st(M(odified|atch)|Index|Paren)|yer(s|X)|nguage))|a(pp(MinorVersion|Name|Co(deName|re)|Version)|vail(Height|Top|Width|Left)|ll|rity|bove|Linkcolor)|r(ight(Context)?|e(sponse(XML|Text)|adyState))|global|x|m(imeTypes|ultiline|enubar|argin(Right|Bottom|Top|Left))|b(o(ttom|rder(RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(Color|Image))|L(N(10|2)|OG(10E|2E)))\\b' 1094 | 'name': 'support.variable.property.js' 1095 | } 1096 | { 1097 | 'match': '(?<=\\.)on(s(croll|ubmit|e(lect(start)?|arch))|c(hange|o(ntextmenu|py)|ut|lick)|touch(start|cancel|end|move)|in(put|valid)|d(r(op|ag(start|over|en(ter|d)|leave)?)|blclick)|paste|error|key(down|up|press)|focus|load|abort|reset|mouse(o(ut|ver)|down|up|enter|wheel|leave|move)|b(efore(c(opy|ut)|paste)|lur))\\b' 1098 | 'name': 'support.variable.property.js' 1099 | } 1100 | { 1101 | 'match': '(?<=\\.)(s(hape|ystemId|c(heme|ope|rolling)|ta(ndby|rt)|ize|ummary|pecified|e(ctionRowIndex|lected(Index)?)|rc)|h(space|t(tpEquiv|mlFor)|e(ight|aders)|ref(lang)?)|n(o(Resize|tation(s|Name)|Shade|Href|de(Name|Type|Value)|Wrap)|extSibling|ame)|c(h(ildNodes|Off|ecked|arset)?|ite|o(ntent|o(kie|rds)|de(Base|Type)?|l(s|Span|or)|mpact)|ell(s|Spacing|Padding)|l(ear|assName)|aption)|t(ype|Bodies|itle|Head|ext|a(rget|gName)|Foot)|i(sMap|ndex|d|m(plementation|ages))|o(ptions|wnerDocument|bject)|d(i(sabled|r)|o(c(type|umentElement)|main)|e(clare|f(er|ault(Selected|Checked|Value)))|at(eTime|a))|useMap|p(ublicId|arentNode|r(o(file|mpt)|eviousSibling))|e(n(ctype|tities)|vent|lements)|v(space|ersion|alue(Type)?|Link|Align)|URL|f(irstChild|orm(s)?|ace|rame(Border)?)|width|l(ink(s)?|o(ngDesc|wSrc)|a(stChild|ng|bel))|a(nchors|c(ce(ssKey|pt(Charset)?)|tion)|ttributes|pplets|l(t|ign)|r(chive|eas)|xis|Link|bbr)|r(ow(s|Span|Index)|ules|e(v|ferrer|l|adOnly))|m(ultiple|e(thod|dia)|a(rgin(Height|Width)|xLength))|b(o(dy|rder)|ackground|gColor))\\b' 1102 | 'name': 'support.constant.dom.js' 1103 | } 1104 | { 1105 | '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' 1106 | 'name': 'support.constant.dom.js' 1107 | } 1108 | { 1109 | 'match': '\\bon(R(ow(s(inserted|delete)|e(nter|xit))|e(s(ize(start|end)?|et)|adystatechange))|Mouse(o(ut|ver)|down|up|move)|B(efore(cut|deactivate|u(nload|pdate)|p(aste|rint)|editfocus|activate)|lur)|S(croll|top|ubmit|elect(start|ionchange)?)|H(over|elp)|C(hange|ont(extmenu|rolselect)|ut|ellchange|l(ick|ose))|D(eactivate|ata(setc(hanged|omplete)|available)|r(op|ag(start|over|drop|en(ter|d)|leave)?)|blclick)|Unload|P(aste|ropertychange)|Error(update)?|Key(down|up|press)|Focus|Load|A(ctivate|fter(update|print)|bort))\\b' 1110 | 'name': 'support.function.event-handler.js' 1111 | } 1112 | { 1113 | 'match': '\\b(s(hift|trike|o(rt|me)|u(p|b(str(ing)?)?)|pli(ce|t)|e(t(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Year|Time|Date|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear)|a(l|rch))|lice|mall)|hasOwnProperty|now|c(har(CodeAt|At)|o(n(structor|cat)|mpile)|all|reate)|t(o(GMTString|String|TimeString|ISOString|DateString|U(TCString|pperCase)|JSON|Precision|Exponential|Fixed|Lo(cale(String|TimeString|DateString|UpperCase|LowerCase)|werCase))|est|rim(Right|Left)?)|i(s(Sealed|PrototypeOf|Extensible|Frozen|Array)|ndexOf|talics)|definePropert(y|ies)|unshift|join|__(define(Getter__|Setter__)|lookup(Getter__|Setter__))|p(op|ush|arse|r(o(totype|pertyIsEnumerable)|eventExtensions))|e(very|xec)|valueOf|keys|f(i(lter|xed)|o(nt(size|color)|rEach)|r(omCharCode|eeze))|l(ink|ocaleCompare|astIndexOf)|a(nchor|pply)|re(duce(Right)?|place|verse)|get(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Year|Time(zoneOffset)?|OwnProperty(Names|Descriptor)|Da(y|te)|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear)|PrototypeOf|FullYear)|ma(tch|p)|b(ig|old|link))\\b' 1114 | 'name': 'support.function.js' 1115 | } 1116 | ] 1117 | --------------------------------------------------------------------------------