<commit_before>Canvas2D.Alias = {};

Canvas2D.Alias.getNames = function() {
    return [ "alias", "shape" ];
}

Canvas2D.Alias.mapper = {
    sheet : function(shape) { 
	return function(construct, parent) { 
	    var alias = Canvas2D.Sheet.from(construct,parent);
	    alias.getType = function() { return shape.name; }
	    return alias;
	}
    },

    connector : function(shape) {
	return function(construct, parent) { 
	    var modifier = new ADL.Modifier( "routing", 
		new ADL.String("vertical" ) );
	    construct.modifiers.set( modifier.key, modifier );
	    var alias = Canvas2D.Connector.from(construct,parent);
	    alias.getType = function() { return shape.name; }
	    return alias;
	}
    },

    image : function(shape) {
	var modifiers = shape.modifiers;
	return function( construct, parent ) {
	    modifiers.each(function(pair) {
		construct.modifiers.set(pair.key, pair.value); 
	    } );
	    var alias = Canvas2D.Image.from(construct,parent);
	    alias.getType = function() { return shape.name; }
	    return alias;
	}
    }
}

Canvas2D.Alias.from = function( construct, parent ) {
    Canvas2D.ADLVisitor.registerConstruct( 
	{ getNames : function() { return [ construct.name ] },
	  from     : Canvas2D.Alias.mapper[construct.zuper](construct) } );
}

Canvas2D.ADLVisitor.registerConstruct(Canvas2D.Alias);<commit_msg>fixes regression in Alias due to support for multiple supers<commit_after>Canvas2D.Alias = {};

Canvas2D.Alias.getNames = function() {
    return [ "alias", "shape" ];
}

Canvas2D.Alias.mapper = {
    sheet : function(shape) { 
	return function(construct, parent) { 
	    var alias = Canvas2D.Sheet.from(construct,parent);
	    alias.getType = function() { return shape.name; }
	    return alias;
	}
    },

    connector : function(shape) {
	return function(construct, parent) { 
	    var modifier = new ADL.Modifier( "routing", 
		new ADL.String("vertical" ) );
	    construct.modifiers.set( modifier.key, modifier );
	    var alias = Canvas2D.Connector.from(construct,parent);
	    alias.getType = function() { return shape.name; }
	    return alias;
	}
    },

    image : function(shape) {
	var modifiers = shape.modifiers;
	return function( construct, parent ) {
	    modifiers.each(function(pair) {
		construct.modifiers.set(pair.key, pair.value); 
	    } );
	    var alias = Canvas2D.Image.from(construct,parent);
	    alias.getType = function() { return shape.name; }
	    return alias;
	}
    }
}

Canvas2D.Alias.from = function( construct, parent ) {
    Canvas2D.ADLVisitor.registerConstruct( 
	{ getNames : function() { return [ construct.name ] },
	  from     : Canvas2D.Alias.mapper[construct.supers[0]](construct) } );
}

Canvas2D.ADLVisitor.registerConstruct(Canvas2D.Alias);
{'fraction_non_alphanumeric': 0.13611416026344675, 'fraction_numerical': 0.008415660446395901, 'mean_word_length': 3.438311688311688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3042497', 'n_tokens_mistral': 916, 'n_tokens_neox': 868, 'n_words': 164}