package de.dhbwstuttgart.strucTypes4.syntaxtree;

import de.dhbwstuttgart.strucTypes4.typeVars.TypeVarStore;

/**
 * Created by sebastian on 09.04.17.
 */
public class Argument extends SyntaxNode {

    String name;

    public Argument(String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String toString() {
        return name;
    }



    @Override
    public String toCodeTyped(TypeVarStore typeVarStore) {
        return String.format("%s : %s " , name , typeVarStore.getTypeVarByTPH(getTypePlaceHolder()) );
    }


    @Override
    public String toCodeTPH() {
        return String.format("%s : %s " , name , getTypePlaceHolder() );
    }




}
