validateProcAssignment(opts) {
        if (!opts.srcIdentifier || !opts.destIdentifier) {
            return;
        }
        let assignedProc = opts.destIdentifier.getAssignedProc();
        if (!assignedProc) {
            opts.destIdentifier.setAssignedProc(opts.srcIdentifier);
            return;
        }
        if (opts.srcIdentifier.getParamCount() !== assignedProc.getParamCount()) {
            throw errors.createError(
                err.PARAM_COUNT_MISMATCH,
                opts.srcExpression.tokens[0],
                'Parameter count mismatch, "' + assignedProc.getName() + '" and "' + opts.srcIdentifier.getName() + '" have different parameter counts.'
            );
        }
        let assignedVars = assignedProc.getVars();
        let srcVars      = opts.srcIdentifier.getVars();
        for (let i = 0; i < opts.srcIdentifier.getParamCount(); i++) {
            let assignedVar = assignedVars[2 + i]; // Skip the first two -return- values...
            let srcVar      = srcVars[2 + i];
            if (assignedVar.getType().type !== srcVar.getType().type) {
                throw errors.createError(
                    err.TYPE_MISMATCH,
                    opts.srcExpression.tokens[0],
                    'Type mismatch, parameter types of "' + assignedVar.getName() + '" and "' + srcVar.getName() + '" do not match.'
                );
            }
            if (JSON.stringify(assignedVar.getArraySize()) !== JSON.stringify(srcVar.getArraySize())) {
                throw errors.createError(
                    err.TYPE_MISMATCH,
                    opts.srcExpression.tokens[0],
                    'Type mismatch, parameter sizes of "' + assignedVar.getName() + '" and "' + srcVar.getName() + '" do not match.'
                );
            }
        }
    }
/**
     * Check if a proc var already has been assigned before,
     * if so then check if the new assigned proc interface matches the already
     * assigned interface...
    **/
Check if a proc var already has been assigned before,
if so then check if the new assigned proc interface matches the already
assigned interface
Check if a proc var already has been assigned before if so then check if the new assigned proc interface matches the already assigned interface
validateProcAssignment(opts) {
        if (!opts.srcIdentifier || !opts.destIdentifier) {
            return;
        }
        let assignedProc = opts.destIdentifier.getAssignedProc();
        if (!assignedProc) {
            opts.destIdentifier.setAssignedProc(opts.srcIdentifier);
            return;
        }
        if (opts.srcIdentifier.getParamCount() !== assignedProc.getParamCount()) {
            throw errors.createError(
                err.PARAM_COUNT_MISMATCH,
                opts.srcExpression.tokens[0],
                'Parameter count mismatch, "' + assignedProc.getName() + '" and "' + opts.srcIdentifier.getName() + '" have different parameter counts.'
            );
        }
        let assignedVars = assignedProc.getVars();
        let srcVars      = opts.srcIdentifier.getVars();
        for (let i = 0; i < opts.srcIdentifier.getParamCount(); i++) {
            let assignedVar = assignedVars[2 + i]; 
            let srcVar      = srcVars[2 + i];
            if (assignedVar.getType().type !== srcVar.getType().type) {
                throw errors.createError(
                    err.TYPE_MISMATCH,
                    opts.srcExpression.tokens[0],
                    'Type mismatch, parameter types of "' + assignedVar.getName() + '" and "' + srcVar.getName() + '" do not match.'
                );
            }
            if (JSON.stringify(assignedVar.getArraySize()) !== JSON.stringify(srcVar.getArraySize())) {
                throw errors.createError(
                    err.TYPE_MISMATCH,
                    opts.srcExpression.tokens[0],
                    'Type mismatch, parameter sizes of "' + assignedVar.getName() + '" and "' + srcVar.getName() + '" do not match.'
                );
            }
        }
    }
validateProcAssignment ( opts ) { if ( ! opts . srcIdentifier || ! opts . destIdentifier ) { return ; } let assignedProc = opts . destIdentifier . getAssignedProc ( ) ; if ( ! assignedProc ) { opts . destIdentifier . setAssignedProc ( opts . srcIdentifier ) ; return ; } if ( opts . srcIdentifier . getParamCount ( ) !== assignedProc . getParamCount ( ) ) { throw errors . createError ( err . PARAM_COUNT_MISMATCH , opts . srcExpression . tokens [ 0 ] , 'Parameter count mismatch, "' + assignedProc . getName ( ) + '" and "' + opts . srcIdentifier . getName ( ) + '" have different parameter counts.' ) ; } let assignedVars = assignedProc . getVars ( ) ; let srcVars = opts . srcIdentifier . getVars ( ) ; for ( let i = 0 ; i < opts . srcIdentifier . getParamCount ( ) ; i ++ ) { let assignedVar = assignedVars [ 2 + i ] ; let srcVar = srcVars [ 2 + i ] ; if ( assignedVar . getType ( ) . type !== srcVar . getType ( ) . type ) { throw errors . createError ( err . TYPE_MISMATCH , opts . srcExpression . tokens [ 0 ] , 'Type mismatch, parameter types of "' + assignedVar . getName ( ) + '" and "' + srcVar . getName ( ) + '" do not match.' ) ; } if ( JSON . stringify ( assignedVar . getArraySize ( ) ) !== JSON . stringify ( srcVar . getArraySize ( ) ) ) { throw errors . createError ( err . TYPE_MISMATCH , opts . srcExpression . tokens [ 0 ] , 'Type mismatch, parameter sizes of "' + assignedVar . getName ( ) + '" and "' + srcVar . getName ( ) + '" do not match.' ) ; } } }
Check if a proc var already has been assigned before,
 if so then check if the new assigned proc interface matches the already
 assigned interface...
Check if a proc var already has been assigned before if so then check if the new assigned proc interface matches the already assigned interface ...
// Skip the first two -return- values...