All files / vsl/transform transform.js

0% Statements 0/2
100% Branches 0/0
0% Functions 0/1
0% Lines 0/2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16                               
import VSLPreprocessor from './transformers/vslpreprocessor';
import VSLTransformer from './transformers/vslpreprocessor';
 
/**
 * Performs transformation on a given AST root array. By default the parser will
 * output the top-level AST result as a `CodeBlock[]`, so you can just pass the
 * parser output into here safely.
 * 
 * @param {CodeBlock[]} ast - The AST 
 * @param {boolean} [disableSTL=false] - Whether the STL should be disabled. 99%
 *     of the time you probably don't want this
 */
export default function transform(ast: CodeBlock[]) {
    new VSLPreprocessor().queue(ast);
    new VSLTransformer().queue(ast);
}