4 using System.Collections;
5 using System.Collections.Generic;
8 namespace SiliconStudio.Shaders.Ast.Hlsl
15 #region Constructors and Destructors
33 Qualifiers = Qualifier.None;
38 #region Public Properties
46 public List<Typedef> SubDeclarators {
get; set; }
66 return SubDeclarators != null && SubDeclarators.Count > 0;
72 #region Public Methods
78 ChildrenList.Add(Type);
80 ChildrenList.AddRange(SubDeclarators);
87 var type = TypeInference.TargetType ?? Type;
88 return type.ResolveType();
94 var builder =
new StringBuilder();
97 for (
int i = 0; i < SubDeclarators.Count; i++)
99 var typedefDeclarator = SubDeclarators[i];
101 builder.Append(
", ");
102 builder.Append(typedefDeclarator.Name);
107 builder.Append(Name);
110 return string.Format(
"typedef{0} {1} {2}", Qualifiers, Type, builder);
Typedef(TypeBase typeBase)
Initializes a new instance of the Typedef class.
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
Typedef()
Initializes a new instance of the Typedef class.
override TypeBase ResolveType()
Resolves the type. The resolved type.
override string ToString()
Toplevel interface for a declaration.