DeclarationSpecifiers
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace CLanguage.Syntax
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class DeclarationSpecifiers
{
public StorageClassSpecifier StorageClassSpecifier { get; set; }
public List<TypeSpecifier> TypeSpecifiers { get; set; }
public FunctionSpecifier FunctionSpecifier { get; set; }
public TypeQualifiers TypeQualifiers { get; set; }
public DeclarationSpecifiers()
{
TypeSpecifiers = new List<TypeSpecifier>();
}
public override string ToString()
{
if (StorageClassSpecifier != StorageClassSpecifier.Auto)
return string.Join(" ", TypeSpecifiers);
return "auto";
}
}
}