All files / transform/transformers vslpreprocessor.js

100% Statements 1/1
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1
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 28 29 30                    3x                                      
import Transformer from '../transformer';
import * as pass from '../passes/';
 
/**
 * Preprocesses and simplifies VSL code (adds default initalizers and whatnot)
 * 
 * See: {@link Transformer}
 */
export default class VSLPreprocessor extends Transformer {
    constructor(context: TransformationContext) {
        super([
            pass.FoldFiniteIntegerRange,
            pass.FoldBinaryIntegerExpression,
            
            pass.VerifyFunctionAccessScope,
            pass.VerifyAnnotationSignature,
 
            pass.RegisterPrimitiveAnnotation,
            
            pass.ResolveTypePath,
            pass.ResolveGenericArgument,
            pass.ResolveFunctionDeclaration,
 
            pass.DescribeClassDeclaration,
            // pass.DescribeFunctionDeclaration,
            pass.DescribeVariableAssignment
        ], context);
    }
}