A .editorconfig => .editorconfig +10 -0
@@ 0,0 1,10 @@
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = tab
+indent_size = 4
A .gitignore => .gitignore +1 -0
@@ 0,0 1,1 @@
+node_modules
A JavaScript.plist => JavaScript.plist +1675 -0
@@ 0,0 1,1675 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>comment</key>
+ <string>JavaScript Syntax: version 2.0</string>
+ <key>fileTypes</key>
+ <array>
+ <string>js</string>
+ <string>_js</string>
+ <string>es</string>
+ <string>es6</string>
+ <string>gs</string>
+ <string>htc</string>
+ <string>pac</string>
+ <string>jsm</string>
+ <string>jslib</string>
+ <string>jspre</string>
+ <string>xsjs</string>
+ <string>xsjslib</string>
+ <string>jscad</string>
+ <string>json5</string>
+ <string>jsx</string>
+ </array>
+ <key>firstLineMatch</key>
+ <string>^#!.*\b(node|iojs|JavaScript)</string>
+ <key>keyEquivalent</key>
+ <string>^~J</string>
+ <key>name</key>
+ <string>JavaScript</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>Match the shebang for JavaScript executables</string>
+ <key>match</key>
+ <string>\A(#!).*$\n</string>
+ <key>name</key>
+ <string>comment.line.number-sign.shebang.js</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?<!\.)\b(import)(?!\s*:)\b</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.import.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(;)|\n|(?=//)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.terminator.statement.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.import.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>\{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.modules.begin.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>{ member1 , member2 as alias2 , [...] }</string>
+ <key>end</key>
+ <string>\}</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.modules.end.js</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.js</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module-alias.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>(default|name) as alias</string>
+ <key>match</key>
+ <string>(?x)
+ (?: \b(default)\b | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)
+ \s*
+ (\b as \b)
+ \s*
+ (?: (\b default \b | \*) | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>punctuation.separator.object.js</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b</string>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.language.import-all.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.js</string>
+ </dict>
+ <key>6</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module-alias.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>(default|*|name) as alias</string>
+ <key>match</key>
+ <string>(?x)
+ (?: \b(default)\b | (\*) | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)
+ \s*
+ (\b as \b)
+ \s*
+ (?: (\b default \b | \*) | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)
+ </string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\*</string>
+ <key>name</key>
+ <string>variable.language.import-all.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(default)\b</string>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#strings</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(from)\b</string>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b(?=.*\bfrom\b)</string>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>punctuation.separator.object.js</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>ES6 export: `export default (variable|class|function, etc.)`</string>
+ <key>match</key>
+ <string>(?x) \b(export)\b \s* \b(default)\b (?:\s*) \b((?!\bfunction\b|\bclass\b|\blet\b|\bvar\b|\bconst\b)[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)?\b</string>
+ <key>name</key>
+ <string>meta.export.js</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?<!\.)\b(export)(?!\s*:)\b</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.export.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>ES6 export, re-export: `export {member as alias, [...]} [from ...]`</string>
+ <key>end</key>
+ <string>(?=;|\bfunction\b|\bclass\b|\blet\b|\bvar\b|\bconst\b|$)</string>
+ <key>name</key>
+ <string>meta.export.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#numbers</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>\{(?=.*\bfrom\b)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.modules.begin.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>`{ member1 , member2 as alias2 , [...] }` inside re-export</string>
+ <key>end</key>
+ <string>\}</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.modules.end.js</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.js</string>
+ </dict>
+ <key>6</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module-alias.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>(default|name) as alias</string>
+ <key>match</key>
+ <string>(?x)
+ (?: \b(default)\b | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)
+ \s*
+ (\b as \b)
+ \s*
+ (?: \b(default)\b | (\*) | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)
+ </string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>meta.delimiter.object.comma.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b</string>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?![\p{L}\p{Nl}$_])\{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.modules.begin.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>{ member1 , member2 as alias2 , [...] }</string>
+ <key>end</key>
+ <string>\}</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.modules.end.js</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.js</string>
+ </dict>
+ <key>6</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.module-alias.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>name as (default|alias)</string>
+ <key>match</key>
+ <string>(?x)
+ (?: \b(default)\b | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)
+ \s*
+ (\b as \b)
+ \s*
+ (?: \b(default)\b | (\*) | \b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b)
+ </string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>meta.delimiter.object.comma.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b</string>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\*(?=.*\bfrom\b)</string>
+ <key>name</key>
+ <string>variable.language.import-all.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(default)\b</string>
+ <key>name</key>
+ <string>variable.language.default.js</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#strings</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(from)\b</string>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b</string>
+ <key>name</key>
+ <string>variable.other.module.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>meta.delimiter.object.comma.js</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#operators</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?x)
+ (?:
+ (?<!\w) # Ensure word boundry
+ ([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*) # Identifier
+ \s*(=)\s*
+ )? # Optional
+ \b(function)
+ (?:\s*
+ (\*) # Optional generator notation
+ )? # (ECMAScript 6)
+ (?:\s*
+ (?<=[\s\*])
+ ([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*) # Optional Name
+ )?
+ \s*(\()
+ </string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>meta.function.variable.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.operator.assignment.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>storage.type.function.js</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>storage.modifier.js</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.function.js</string>
+ </dict>
+ <key>6</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.parameters.begin.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>Match function, optional function name and optional function arguments</string>
+ <key>end</key>
+ <string>(\))</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.parameters.end.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.function.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#function-params</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?x)
+ \b
+ (?: (static) \s+ )? # Optional static keyword
+ (?! # Dont match known keywords
+ (?:async|await|break|case|catch|continue|do|else|finally|for|function|if|
+ export|import|package|return|switch|throw|try|while|with)
+ [\s\(]
+ )
+ ([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)
+ \s*
+ (\()
+ (?=(?:[^\(\)]*)?\)\s*\{)
+ </string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>storage.modifier.static.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.function.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.parameters.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.parameters.begin.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.method.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#function-params</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?x)
+ \b(class)(?=\s|$)
+ (?:
+ \s+
+ ([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)
+ )?
+ (?:
+ \s+
+ (extends)
+ \s+
+ (?:\b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}\.]*)\b(?![\(]))?
+ )?
+ </string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>storage.type.class.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.type.class.js</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>storage.modifier.js</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>entity.other.inherited-class.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\s*($|(?=\{))</string>
+ <key>name</key>
+ <string>meta.class.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#function-call</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?<=[\[=(?:+,!]|^|return|=>|&&|\|\|)\s*(?=/[^/*+?].*/)</string>
+ <key>comment</key>
+ <string>Dont scope preceding whitespace as string.regex</string>
+ <key>end</key>
+ <string>(?<=[/igmuy])</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>/</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(/)[igmuy]*</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.regexp.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.js.regexp</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>\?</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.operator.ternary.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>Matching as a capture group prevents false positives with other uses of :</string>
+ <key>end</key>
+ <string>([^:"'`\[\]{}()]*)(:)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.operator.ternary.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.ternary-if.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\w)[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?=\s*:\s*function\b)</string>
+ <key>name</key>
+ <string>entity.name.function.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\w)[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?=\s*:)</string>
+ <key>name</key>
+ <string>entity.name.type.attribute-name.js</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#numbers</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#strings</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#function-call</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#operators</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>=></string>
+ <key>name</key>
+ <string>storage.type.arrow.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(let|var)\b(?!\$)</string>
+ <key>name</key>
+ <string>storage.type.var.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(get|set|const)\b(?!\$)</string>
+ <key>name</key>
+ <string>storage.modifier.js</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>storage.modifier.js</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(?<!\.)\b(yield)(?!\s*:)\b(?:\s*(\*))?</string>
+ <key>name</key>
+ <string>meta.control.yield.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(async|await|break|case|catch|continue|default|do|else|export|finally|for|if|return|switch|throw|try|while|with)\b(?!\$)</string>
+ <key>name</key>
+ <string>keyword.control.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(delete|in|instanceof|new|of|typeof|void)\b(?!\$)</string>
+ <key>name</key>
+ <string>keyword.operator.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(debugger)\b(?!\$)</string>
+ <key>name</key>
+ <string>keyword.other.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(Array|Boolean|Date|Error|EvalError|Function|Map|Number|Object|Promise|Proxy|RangeError|ReferenceError|Reflect|RegExp|Set|String|SyntaxError|TypeError|URIError|WeakMap|WeakSet)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>DOM Core Level 4 (http://www.w3.org/TR/domcore/) and DOM Events Level 3 (http://www.w3.org/TR/DOM-Level-3-Events/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(Attr|CharacterData|Comment|CompositionEvent|CustomEvent|Document|DocumentFragment|DocumentType|DOMError|DOMException|DOMImplementation|DOMParser|DOMString|DOMTimestamp|DOMSettableTokenList|DOMStringList|DOMTokenList|Element|Event|EventTarget|FocusEvent|HTMLCollection|KeyboardEvent|MouseEvent|MutationObserver|MutationRecord|Node|NodeFilter|NodeIterator|NodeList|ProcessingInstruction|Range|Text|TextEvent|TreeWalker|UIEvent|WheelEvent|XMLDocument)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>DOM Core Level 4 (http://www.w3.org/TR/domcore/) and DOM Events Level 3 (http://www.w3.org/TR/DOM-Level-3-Events/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(CDATASection|DOMConfiguration|DOMErrorHandler|DOMImplementationList|DOMImplementationSource|DOMLocator|DOMObject|DOMUserData|Entity|EntityReference|MutationEvent|NamedNodeMap|NameList|Notation|TypeInfo|UserDataHandler)\b(?!\$)</string>
+ <key>name</key>
+ <string>invalid.deprecated.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>TypedArray specification used by HTML 5 (http://www.khronos.org/registry/typedarray/specs/latest/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(ArrayBuffer|DataView|Float32Array|Float64Array|Int8Array|Int16Array|Int32Array|TypedArray|Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>File specification used by HTML 5 (http://dev.w3.org/2006/webapi/FileAPI/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(Blob|File|FileList|FileReader)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>XMLHttpRequest specification used by HTML 5 (http://xhr.spec.whatwg.org/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(FormData|ProgressEvent|XMLHttpRequest|XMLHttpRequestUpload)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>EventSource specification used by HTML 5 (http://www.w3.org/TR/eventsource/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(EventSource)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>CSSOM specification used by HTML 5 (http://dev.w3.org/csswg/cssom/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(CSS|CSSCharsetRule|CSSImportRule|CSSPageRule|CSSRule|CSSRuleList|CSSStyleDeclaration|CSSStyleRule|CSSStyleSheet|MediaList|Stylesheet|StyleSheetList)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>CSSOM View specification used by HTML 5 (http://dev.w3.org/csswg/cssom-view/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(Screen)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>CSS Font specification used by HTML 5 (http://dev.w3.org/csswg/css-fonts/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(CSSFontFaceRule)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>SVG specification used by HTML 5 (http://www.w3.org/TR/SVG/single-page.html)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(SVGAElement|SVGAltGlyphDefElement|SVGAltGlyphElement|SVGAltGlyphItemElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength|SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPreserveAspectRatio|SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement|SVGColor|SVGComponentTransferFunctionElement|SVGCursorElement|SVGDefsElement|SVGDescElement|SVGDocument|SVGElement|SVGElementInstance|SVGElementInstanceList|SVGEllipseElement|SVGFEBlendElement|SVGFEColorMatrixElement|SVGFEComponentTransferElement|SVGFECompositeElement|SVGFEConvolveMatrixElement|SVGFEDiffuseLightingElement|SVGFEDisplacementMapElement|SVGFEDistantLightElement|SVGFEFloodElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEGaussianBlurElement|SVGFEImageElement|SVGFEMergeElement|SVGFEMergeNodeElement|SVGFEMorphologyElement|SVGFEOffsetElement|SVGFEPointLightElement|SVGFESpecularLightingElement|SVGFESpotLightElement|SVGFETileElement|SVGFETurbulenceElement|SVGFilterElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGlyphRefElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength|SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMarkerElement|SVGMaskElement|SVGMatrix|SVGMetadataElement|SVGMissingGlyphElement|SVGNumber|SVGNumberList|SVGPaint|SVGPathElement|SVGPathSeg|SVGPathSegArcAbs|SVGPathSegArcRel|SVGPathSegClosePath|SVGPathSegCurvetoCubicAbs|SVGPathSegCurvetoCubicRel|SVGPathSegCurvetoCubicSmoothAbs|SVGPathSegCurvetoCubicSmoothRel|SVGPathSegCurvetoQuadraticAbs|SVGPathSegCurvetoQuadraticRel|SVGPathSegCurvetoQuadraticSmoothAbs|SVGPathSegCurvetoQuadraticSmoothRel|SVGPathSegLinetoAbs|SVGPathSegLinetoHorizontalAbs|SVGPathSegLinetoHorizontalRel|SVGPathSegLinetoRel|SVGPathSegLinetoVerticalAbs|SVGPathSegLinetoVerticalRel|SVGPathSegList|SVGPathSegMovetoAbs|SVGPathSegMovetoRel|SVGPatternElement|SVGPoint|SVGPointList|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio|SVGRadialGradientElement|SVGRect|SVGRectElement|SVGRenderingIntent|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTextContentElement|SVGTextElement|SVGTextPathElement|SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGUnitTypes|SVGUseElement|SVGUseElement|SVGVKernElement|SVGViewElement|SVGViewSpec|SVGZoomEvent)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>WebGL specification used by HTML 5 (http://www.khronos.org/registry/webgl/specs/latest/1.0/)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(WebGLActiveInfo|WebGLBuffer|WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat|WebGLTexture|WebGLUniformLocation)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>HTML 5 (http://www.w3.org/TR/html5/single-page.html)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(Audio|BarProp|DOMStringMap|ErrorEvent|FileError|HTMLAllCollection|HTMLAnchorElement|HTMLAppletElement|HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement|HTMLFrameElement|HTMLFrameSetElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMediaElement|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement|HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLSour|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement|HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|Image|Location|MediaController|MediaError|MouseEvent|Navigator|Option|PageTransitionEvent|PopStateEvent|TextTrack|TextTrackCue|TextTrackCueList|TextTrackList|TimeRanges|TrackEvent|UIEvent|ValidityState|Window)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.class.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>HTML 5 (http://www.w3.org/TR/html5/single-page.html#window)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(applicationCache|closed|console|crypto|document|external|frameElement|frames|history|innerHeight|innerWidth|length|location|locationbar|menubar|name|navigator|offscreenBuffering|onabort|onafterprint|onbeforeprint|onbeforeunload|onblur|oncancel|oncanplay|oncanplaythrough|onchange|onclick|onclose|oncuechange|ondblclick|ondrag|ondragend|ondragenter|ondragexit|ondragleave|ondragover|ondragstart|ondrop|ondurationchange|onemptied|onended|onerror|onfocus|onhashchange|oninput|oninvalid|onkeydown|onkeypress|onkeyup|onload|onloadeddata|onloadedmetadata|onloadstart|onmessage|onmousedown|onmouseenter|onmouseleave|onmousemove|onmouseout|onmouseover|onmouseup|onmousewheel|onoffline|ononline|onpagehide|onpageshow|onpause|onplay|onplaying|onpopstate|onprogress|onratechange|onreset|onresize|onscroll|onseeked|onseeking|onselect|onshow|onstalled|onstorage|onsubmit|onsuspend|ontimeupdate|onunload|onvolumechange|onwaiting|opener|outerHeight|outerWidth|pageXOffset|pageYOffset|parent|personalbar|postMessage|screen|screenX|screenY|scrollbars|scrollX|scrollY|self|status|statusbar|toolbar|top|window)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.constant.dom.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>HTML 5 (http://www.w3.org/TR/html5/single-page.html#window)</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(addEventListener|alert|atob|blur|btoa|clearInterval|clearTimeout|close|confirm|dispatchEvent|doNotTrack|find|focus|getComputedStyle|getMatchedCSSRules|getSelection|matchMedia|moveBy|moveTo|open|openDatabase|print|prompt|removeEventListener|resizeBy|resizeTo|scroll|scrollBy|scrollTo|setInterval|setTimeout|showModalDialog|stop)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.function.dom.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(captureEvents|defaultStatus|defaultstatus|releaseEvents)\b(?!\$)</string>
+ <key>name</key>
+ <string>invalid.deprecated.dom.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(JSON|Math)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.constant.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|uneval)\b(?!\$)</string>
+ <key>name</key>
+ <string>support.function.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>Keywords reserved for future use but now are unused.</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(enum|await)\b(?!\$)</string>
+ <key>name</key>
+ <string>invalid.illegal.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>Keywords reserved for future use in strict mode but now are unused.</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(implements|interface|package|private|protected|public)\b(?!\$)</string>
+ <key>name</key>
+ <string>invalid.deprecated.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>Keywords used in an invalid context</string>
+ <key>match</key>
+ <string>(?<!\.|\$)\b(class|function|static|extends)\b(?!\$)</string>
+ <key>name</key>
+ <string>invalid.illegal.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\b(false|Infinity|NaN|null|true|undefined)\b</string>
+ <key>name</key>
+ <string>constant.language.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.)\b(super|this)(?!\s*:)\b</string>
+ <key>name</key>
+ <string>variable.language.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\;</string>
+ <key>name</key>
+ <string>punctuation.terminator.statement.js</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.scope.begin.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.scope.end.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>Allows the special return snippet to fire.</string>
+ <key>match</key>
+ <string>(\[)(\])</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>\{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.scope.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\}</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.scope.end.js</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>\(</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.scope.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.scope.end.js</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\[|\]</string>
+ <key>name</key>
+ <string>meta.brace.square.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>Match classes based on the usage of the "new" operator.</string>
+ <key>match</key>
+ <string>(?<=new )([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)(?!\w)</string>
+ <key>name</key>
+ <string>support.class.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>Match classes based on the usage of the "instanceof" operator.</string>
+ <key>match</key>
+ <string>(?<= instanceof )([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)(?!\w)</string>
+ <key>name</key>
+ <string>support.class.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>Match classes based on the usage of the "prototype" property.</string>
+ <key>match</key>
+ <string>(?<!\w)([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)(?=\.prototype\b)</string>
+ <key>name</key>
+ <string>support.class.js</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>Matches the "prototype" keyword. Even though it is not a valid keyword, it is a special constant of sorts.</string>
+ <key>match</key>
+ <string>(?<=\.)(prototype)\b</string>
+ <key>name</key>
+ <string>keyword.other.js</string>
+ </dict>
+ </array>
+ <key>repository</key>
+ <dict>
+ <key>comments</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>/\*\*(?!/|\*)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\*/</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.end.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>comment.block.documentation.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>(?<!\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</string>
+ <key>name</key>
+ <string>keyword.other.documentation.js.jsdoc</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>/\*</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\*/</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.end.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>comment.block.js</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=//)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.whitespace.comment.leading.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>//</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.double-slash.js</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <key>function-call</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>(?<!\w)([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)(\()</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>meta.function-call.js</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.function-call.begin.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>Matches the function calls.</string>
+ <key>end</key>
+ <string>\)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.function-call.end.js</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <key>function-params</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>(?=[\p{L}\p{Nl}$_])|(\.\.\.)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.operator.rest-parameters.js</string>
+ </dict>
+ </dict>
+ <key>comment</key>
+ <string>Matches valid argument, function and variable names. To be thorough: https://github.com/mathiasbynens/mothereff.in/tree/master/js-variables</string>
+ <key>end</key>
+ <string>(?=[,)/])</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\G[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*</string>
+ <key>name</key>
+ <string>variable.parameter.function.js</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#function-call</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#numbers</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#strings</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#operators</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\.)\b(super|this)(?!\s*:)\b</string>
+ <key>name</key>
+ <string>variable.language.js</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#comments</string>
+ </dict>
+ </array>
+ </dict>
+ <key>numbers</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>(?<!\w|\$)0[xX]\h+\b</string>
+ <key>name</key>
+ <string>constant.numeric.hex.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\w|\$)0[bB][01]+\b</string>
+ <key>name</key>
+ <string>constant.numeric.binary.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?<!\w|\$)0[oO][0-7]+\b</string>
+ <key>name</key>
+ <string>constant.numeric.octal.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>(?x)
+ (?<!\w|\$) # Ensure word boundry
+ [+-]? # Optional sign
+ (?>
+ (
+ (0|[1-9][0-9]*)(\.[0-9]*)? # 0 or 1 or 1. or 1.0
+ | \.[0-9]+ # .1
+ )
+ ([eE][+-]?[0-9]+)? # Exponent
+ )
+ (?!\w) # Ensure word boundry
+ </string>
+ <key>name</key>
+ <string>constant.numeric.js</string>
+ </dict>
+ </array>
+ </dict>
+ <key>operators</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>%=|\+=|\-=|\*=|(?<!\()/=</string>
+ <key>name</key>
+ <string>keyword.operator.assignment.compound.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>&=|\^=|<<=|>>=|>>>=|\|=</string>
+ <key>name</key>
+ <string>keyword.operator.assignment.compound.bitwise.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>!==|!=|<=|>=|===|==|<|></string>
+ <key>name</key>
+ <string>keyword.operator.comparison.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>&&|!|\|\|</string>
+ <key>name</key>
+ <string>keyword.operator.logical.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>&|\||\^|~</string>
+ <key>name</key>
+ <string>keyword.operator.bitwise.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\:</string>
+ <key>name</key>
+ <string>keyword.operator.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>!</string>
+ <key>name</key>
+ <string>keyword.operator.logical.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>=|\:</string>
+ <key>name</key>
+ <string>keyword.operator.assignment.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\-\-</string>
+ <key>name</key>
+ <string>keyword.operator.decrement.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\+\+</string>
+ <key>name</key>
+ <string>keyword.operator.increment.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>%|\*|/|\-|\+</string>
+ <key>name</key>
+ <string>keyword.operator.arithmetic.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\.\.\.</string>
+ <key>name</key>
+ <string>keyword.operator.spread.js</string>
+ </dict>
+ </array>
+ </dict>
+ <key>strings</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>'</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>'</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.single.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#escapes</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\\\n</string>
+ <key>name</key>
+ <string>constant.character.escape.newline.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>invalid.illegal.character-not-allowed-here.js</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>"</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>"</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.double.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#escapes</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\\\n</string>
+ <key>name</key>
+ <string>constant.character.escape.newline.js</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>invalid.illegal.character-not-allowed-here.js</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>`</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>`</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.other.template.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#escapes</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#interpolation</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ <key>repository</key>
+ <dict>
+ <key>escapes</key>
+ <dict>
+ <key>match</key>
+ <string>\\(x\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)</string>
+ <key>name</key>
+ <string>constant.character.escape.js</string>
+ </dict>
+ <key>interpolation</key>
+ <dict>
+ <key>begin</key>
+ <string>\$\{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.embedded.begin.js</string>
+ </dict>
+ </dict>
+ <key>contentName</key>
+ <string>source.js</string>
+ <key>end</key>
+ <string>(\})</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.embedded.end.js</string>
+ </dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>source.js</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.embedded.line.js</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>\{</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>meta.brace.curly.js</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\}</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>meta.brace.curly.js</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ </dict>
+ </dict>
+ <key>scopeName</key>
+ <string>source.js</string>
+ <key>uuid</key>
+ <string>93E017CC-6F27-11D9-90EB-000D93589AF6</string>
+</dict>
+</plist>
M index.js => index.js +30 -0
@@ 0,0 1,30 @@
+const vsctm = require( 'vscode-textmate' );
+const fs = require( 'fs' );
+const oniguruma = require( 'oniguruma' );
+
+const readFile = path => {
+ return new Promise( ( resolve, reject ) => {
+ fs.readFile( path, ( error, data ) => error ? reject( error ) : resolve( data ) );
+ } );
+};
+
+const registry = new vsctm.Registry( {
+ onigLib: Promise.resolve( {
+ createOnigScanner: sources => new oniguruma.OnigScanner( sources ),
+ createOnigString: str => new oniguruma.OnigString( str ),
+ } ),
+ loadGrammar: scopeName => {
+ if ( scopeName !== 'source.js' ) {
+ console.log( `Unkown scope name: ${ scopeName }` );
+ return null;
+ }
+ return readFile( './JavaScript.plist' ).then( data => vsctm.parseRawGrammar( data.toString() ) );
+ }
+} );
+
+registry.loadGrammar( 'source.js' ).then( grammar => {
+ const code = 'const double = x => 2 * x;';
+
+ const lineTokens = grammar.tokenizeLine( code, vsctm.INITIAL );
+ console.log( lineTokens.tokens );
+} ).catch( e => console.log( e ) );
A package-lock.json => package-lock.json +26 -0
@@ 0,0 1,26 @@
+{
+ "name": "qode-textmate",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "nan": {
+ "version": "2.14.1",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
+ "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw=="
+ },
+ "oniguruma": {
+ "version": "7.2.1",
+ "resolved": "https://registry.npmjs.org/oniguruma/-/oniguruma-7.2.1.tgz",
+ "integrity": "sha512-WPS/e1uzhswPtJSe+Zls/kAj27+lEqZjCmRSjnYk/Z4L2Mu+lJC2JWtkZhPJe4kZeTQfz7ClcLyXlI4J68MG2w==",
+ "requires": {
+ "nan": "^2.14.0"
+ }
+ },
+ "vscode-textmate": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.1.1.tgz",
+ "integrity": "sha512-5VHjF+Fglf9d2JI5OyQ7FHutK6/29G0qYyD920K0SWO7uY8JTWbqyKAHEtfB/ZDk2fOe/E23n3wz9fHXKi63yg=="
+ }
+ }
+}
M package.json => package.json +5 -1
@@ 7,5 7,9 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "git.sr.ht/~reykjalin",
- "license": "MIT"
+ "license": "MIT",
+ "dependencies": {
+ "oniguruma": "^7.2.1",
+ "vscode-textmate": "^5.1.1"
+ }
}