as;
await;
break;
case;
class;
const;
continue;
debugger;
default;
delete;
do;
else;
enum;
export;
extends;
for;
if;
implements;
import;
in;
instanceof;
interface;
let;
new;
null;
of;
package;
private;
protected;
public;
return;
static;
super;
switch;
this;
throw;
try;
typeof;
undefined;
var;
void;
while;
with;
yield;

// contextual keywords

try {} catch {} finally {}
try {} catch (e) {} finally {}
async function (){}
async a => {}
async (a,b,c) => {}
import {} from "foo"
import {} from 'foo'
class { get foo(){} set baz(){} get [value](){} }

// variables, not keywords

const { async, from, to } = bar;
promise.catch(foo).finally(bar);

// TypeScript keywords

abstract;
as;
declare;
implements;
is;
keyof;
readonly;
require;

// contextual keywords

asserts foo;
infer foo;
interface foo;
module foo;
namespace foo;
type foo;

import type { Component } from "react";
import type *, {}

----------------------------------------------------

[
	["keyword", "as"], ["punctuation", ";"],
	["keyword", "await"], ["punctuation", ";"],
	["keyword", "break"], ["punctuation", ";"],
	["keyword", "case"], ["punctuation", ";"],
	["keyword", "class"], ["punctuation", ";"],
	["keyword", "const"], ["punctuation", ";"],
	["keyword", "continue"], ["punctuation", ";"],
	["keyword", "debugger"], ["punctuation", ";"],
	["keyword", "default"], ["punctuation", ";"],
	["keyword", "delete"], ["punctuation", ";"],
	["keyword", "do"], ["punctuation", ";"],
	["keyword", "else"], ["punctuation", ";"],
	["keyword", "enum"], ["punctuation", ";"],
	["keyword", "export"], ["punctuation", ";"],
	["keyword", "extends"], ["punctuation", ";"],
	["keyword", "for"], ["punctuation", ";"],
	["keyword", "if"], ["punctuation", ";"],
	["keyword", "implements"], ["punctuation", ";"],
	["keyword", "import"], ["punctuation", ";"],
	["keyword", "in"], ["punctuation", ";"],
	["keyword", "instanceof"], ["punctuation", ";"],
	["keyword", "interface"], ["punctuation", ";"],
	["keyword", "let"], ["punctuation", ";"],
	["keyword", "new"], ["punctuation", ";"],
	["keyword", "null"], ["punctuation", ";"],
	["keyword", "of"], ["punctuation", ";"],
	["keyword", "package"], ["punctuation", ";"],
	["keyword", "private"], ["punctuation", ";"],
	["keyword", "protected"], ["punctuation", ";"],
	["keyword", "public"], ["punctuation", ";"],
	["keyword", "return"], ["punctuation", ";"],
	["keyword", "static"], ["punctuation", ";"],
	["keyword", "super"], ["punctuation", ";"],
	["keyword", "switch"], ["punctuation", ";"],
	["keyword", "this"], ["punctuation", ";"],
	["keyword", "throw"], ["punctuation", ";"],
	["keyword", "try"], ["punctuation", ";"],
	["keyword", "typeof"], ["punctuation", ";"],
	["keyword", "undefined"], ["punctuation", ";"],
	["keyword", "var"], ["punctuation", ";"],
	["keyword", "void"], ["punctuation", ";"],
	["keyword", "while"], ["punctuation", ";"],
	["keyword", "with"], ["punctuation", ";"],
	["keyword", "yield"], ["punctuation", ";"],

	["comment", "// contextual keywords"],

	["keyword", "try"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "catch"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "finally"],
	["punctuation", "{"],
	["punctuation", "}"],

	["keyword", "try"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "catch"],
	["punctuation", "("],
	"e",
	["punctuation", ")"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "finally"],
	["punctuation", "{"],
	["punctuation", "}"],

	["keyword", "async"],
	["keyword", "function"],
	["punctuation", "("],
	["punctuation", ")"],
	["punctuation", "{"],
	["punctuation", "}"],

	["keyword", "async"],
	" a ",
	["operator", "=>"],
	["punctuation", "{"],
	["punctuation", "}"],

	["keyword", "async"],
	["punctuation", "("],
	"a",
	["punctuation", ","],
	"b",
	["punctuation", ","],
	"c",
	["punctuation", ")"],
	["operator", "=>"],
	["punctuation", "{"],
	["punctuation", "}"],

	["keyword", "import"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "from"],
	["string", "\"foo\""],

	["keyword", "import"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "from"],
	["string", "'foo'"],

	["keyword", "class"],
	["punctuation", "{"],
	["keyword", "get"],
	["function", "foo"],
	["punctuation", "("],
	["punctuation", ")"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "set"],
	["function", "baz"],
	["punctuation", "("],
	["punctuation", ")"],
	["punctuation", "{"],
	["punctuation", "}"],
	["keyword", "get"],
	["punctuation", "["],
	"value",
	["punctuation", "]"],
	["punctuation", "("],
	["punctuation", ")"],
	["punctuation", "{"],
	["punctuation", "}"],
	["punctuation", "}"],

	["comment", "// variables, not keywords"],

	["keyword", "const"],
	["punctuation", "{"],
	" async",
	["punctuation", ","],
	" from",
	["punctuation", ","],
	" to ",
	["punctuation", "}"],
	["operator", "="],
	" bar",
	["punctuation", ";"],

	"\r\npromise",
	["punctuation", "."],
	["function", "catch"],
	["punctuation", "("],
	"foo",
	["punctuation", ")"],
	["punctuation", "."],
	["function", "finally"],
	["punctuation", "("],
	"bar",
	["punctuation", ")"],
	["punctuation", ";"],

	["comment", "// TypeScript keywords"],

	["keyword", "abstract"], ["punctuation", ";"],
	["keyword", "as"], ["punctuation", ";"],
	["keyword", "declare"], ["punctuation", ";"],
	["keyword", "implements"], ["punctuation", ";"],
	["keyword", "is"], ["punctuation", ";"],
	["keyword", "keyof"], ["punctuation", ";"],
	["keyword", "readonly"], ["punctuation", ";"],
	["keyword", "require"], ["punctuation", ";"],

	["comment", "// contextual keywords"],

	["keyword", "asserts"], " foo", ["punctuation", ";"],
	["keyword", "infer"], " foo", ["punctuation", ";"],
	["keyword", "interface"], ["class-name", ["foo"]], ["punctuation", ";"],
	["keyword", "module"], " foo", ["punctuation", ";"],
	["keyword", "namespace"], " foo", ["punctuation", ";"],
	["keyword", "type"], ["class-name", ["foo"]], ["punctuation", ";"],

	["keyword", "import"],
	["keyword", "type"],
	["punctuation", "{"],
	" Component ",
	["punctuation", "}"],
	["keyword", "from"],
	["string", "\"react\""],
	["punctuation", ";"],

	["keyword", "import"],
	["keyword", "type"],
	["operator", "*"],
	["punctuation", ","],
	["punctuation", "{"],
	["punctuation", "}"]
]

----------------------------------------------------

Checks for keywords.
