public ScopeNode callMixin(String name, ArgumentsNode arguments) {
        List<ExpressionGroupNode> argumentList = (arguments != null) ? NodeTreeUtils.getChildren(arguments, ExpressionGroupNode.class) : Collections.<ExpressionGroupNode>emptyList();
        if (argumentList.size() > _parameterDefinitions.size()) {
            throw new IllegalMixinArgumentException(name, _parameterDefinitions.size());
        }

        // Clone scope and filter out any white space
        ScopeNode mixinScope = clone();
        NodeTreeUtils.filterLineBreaks(mixinScope);

        // If arguments were passed, apply them
        for (int i = 0; i < argumentList.size(); i++) {
            ExpressionGroupNode argument = argumentList.get(i);
            // Replace the value of the definition
            VariableDefinitionNode parameter = mixinScope._parameterDefinitions.get(i);
            parameter.clearChildren();
            parameter.addChild(argument);
        }

        // Mark this scope's containing rule set as invisible since it has been used as a mixin
        getParent().setVisible(false);

        return mixinScope;
    }
public ScopeNode callMixin ( String name , ArgumentsNode arguments ) { List < ExpressionGroupNode > argumentList = ( arguments != null ) ? NodeTreeUtils . getChildren ( arguments , ExpressionGroupNode . class ) : Collections . < ExpressionGroupNode > emptyList ( ) ; if ( argumentList . size ( ) > _parameterDefinitions . size ( ) ) { throw new IllegalMixinArgumentException ( name , _parameterDefinitions . size ( ) ) ; } ScopeNode mixinScope = clone ( ) ; NodeTreeUtils . filterLineBreaks ( mixinScope ) ; for ( int i = 0 ; i < argumentList . size ( ) ; i ++ ) { ExpressionGroupNode argument = argumentList . get ( i ) ; VariableDefinitionNode parameter = mixinScope . _parameterDefinitions . get ( i ) ; parameter . clearChildren ( ) ; parameter . addChild ( argument ) ; } getParent ( ) . setVisible ( false ) ; return mixinScope ; }
Creates a clone of this scope to be attached to the tree at the site of a mixin reference. If an ArgumentsNode is passed,
each of its values override those defined by the mixin's parameters.