Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SMEIL.Parser.AST.DataType"/> class.
 /// </summary>
 /// <param name="token">The source token.</param>
 /// <param name="parent">The enumeration type.</param>
 public DataType(ParseToken token, AST.EnumDeclaration parent)
     : base(token)
 {
     Type     = ILType.Enumeration;
     BitWidth = -1;
     EnumType = parent ?? throw new ArgumentNullException(nameof(parent));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SMEIL.Parser.AST.DataType"/> class.
 /// </summary>
 /// <param name="token">The source token.</param>
 /// <param name="parent">The array data type.</param>
 public DataType(ParseToken token, DataType parent)
     : base(token)
 {
     Type     = parent.Type;
     BitWidth = parent.BitWidth;
     Shape    = parent.Shape;
     EnumType = parent.EnumType;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new variable instnace
 /// </summary>
 /// <param name="source">The source item</param>
 public EnumTypeReference(AST.EnumDeclaration source)
 {
     Source = source ?? throw new ArgumentNullException(nameof(source));
 }