Syntax highlighting
This commit is contained in:
26
deps.ts
26
deps.ts
@ -1,6 +1,30 @@
|
||||
// dwm
|
||||
export {
|
||||
createWindow,
|
||||
getProcAddress,
|
||||
mainloop,
|
||||
} from "https://deno.land/x/dwm@0.3.3/mod.ts";
|
||||
export * as gl from "https://deno.land/x/gluten@0.1.6/api/gles23.2.ts";
|
||||
export * as gl from "https://deno.land/x/gluten@0.1.6/api/gles23.2.ts";
|
||||
|
||||
// jsTokens
|
||||
import jsTokens from "npm:js-tokens";
|
||||
export function tokenize(input: string): Iterable<Token> {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
return (jsTokens as any)(input);
|
||||
};
|
||||
type Token =
|
||||
| { type: "StringLiteral"; value: string; closed: boolean }
|
||||
| { type: "NoSubstitutionTemplate"; value: string; closed: boolean }
|
||||
| { type: "TemplateHead"; value: string }
|
||||
| { type: "TemplateMiddle"; value: string }
|
||||
| { type: "TemplateTail"; value: string; closed: boolean }
|
||||
| { type: "RegularExpressionLiteral"; value: string; closed: boolean }
|
||||
| { type: "MultiLineComment"; value: string; closed: boolean }
|
||||
| { type: "SingleLineComment"; value: string }
|
||||
| { type: "IdentifierName"; value: string }
|
||||
| { type: "PrivateIdentifier"; value: string }
|
||||
| { type: "NumericLiteral"; value: string }
|
||||
| { type: "Punctuator"; value: string }
|
||||
| { type: "WhiteSpace"; value: string }
|
||||
| { type: "LineTerminatorSequence"; value: string }
|
||||
| { type: "Invalid"; value: string };
|
Reference in New Issue
Block a user