forked from TypeScriptToLua/TypeScriptToLua
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugins.ts
More file actions
27 lines (24 loc) · 684 Bytes
/
plugins.ts
File metadata and controls
27 lines (24 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import * as ts from "typescript";
import { Printer } from "../LuaPrinter";
import { Visitors } from "../transformation/context";
export interface Plugin {
/**
* An augmentation to the map of visitors that transform TypeScript AST to Lua AST.
*
* Key is a `SyntaxKind` of a processed node.
*/
visitors?: Visitors;
/**
* A function that converts Lua AST to a string.
*
* At most one custom printer can be provided across all plugins.
*/
printer?: Printer;
}
export function getPlugins(
_program: ts.Program,
_diagnostics: ts.Diagnostic[],
pluginsFromOptions: Plugin[]
): Plugin[] {
return pluginsFromOptions;
}