ParameterDeclaration
namespace CLanguage.Syntax
{
public class ParameterDeclaration
{
public string Name { get; set; }
public DeclarationSpecifiers DeclarationSpecifiers { get; set; }
public Declarator Declarator { get; set; }
public ParameterDeclaration(string name)
{
Name = name;
}
public ParameterDeclaration(DeclarationSpecifiers specs)
{
DeclarationSpecifiers = specs;
Name = "";
}
public ParameterDeclaration(DeclarationSpecifiers specs, Declarator dec)
{
DeclarationSpecifiers = specs;
Name = dec.DeclaredIdentifier;
Declarator = dec;
}
public override string ToString()
{
return DeclarationSpecifiers + " " + Declarator;
}
}
}