public VarFixedBytes(AstElementaryTypeName type) : base(type) { // Determine the size of our fixed array. int sizeBytes = VarParser.GetFixedArraySizeInBytes(BaseType); // Initialize our bounds InitializeBounds(1, sizeBytes); }
public VarInt(AstElementaryTypeName type) : base(type) { // Obtain our size in bytes int sizeBytes = VarTypes.GetIntegerSizeInBytes(BaseType, GenericType); // Initialize our bounds InitializeBounds(1, sizeBytes); }
protected void Initialize(string name, AstElementaryTypeName astTypeName) { // Set our properties Name = name; AstTypeName = astTypeName; BaseType = VarParser.ParseTypeComponents(AstTypeName.TypeDescriptions.TypeString).baseType; GenericType = VarParser.GetGenericType(BaseType); ValueParser = VarParser.GetVariableObject(AstTypeName, VariableLocation); }
public VarBase(AstElementaryTypeName type) { // Set our type Type = type; // Obtain the components of our type and set them. BaseType = VarTypes.ParseTypeComponents(type.TypeDescriptions.TypeString).baseType; // Obtain our generic type. GenericType = VarTypes.GetGenericType(BaseType); }
protected void Initialize(string name, AstElementaryTypeName astTypeName, AstTypeDescriptions astTypeDescriptions = null) { // Set our generic var status. _isUndefinedType = astTypeName?.TypeDescriptions == null; // Override our optionally provided type descriptions with one from the ast type name, if available. TypeDescriptions = _isUndefinedType ? astTypeDescriptions : astTypeName.TypeDescriptions; // Initialize using whatever type provider is available Initialize(name, TypeDescriptions.TypeString); }
public VarRefBase(AstElementaryTypeName type) : base(type) { }
public VarAddress(AstElementaryTypeName type) : base(type) { // Initialize our bounds InitializeBounds(1, Address.SIZE); }
public VarBoolean(AstElementaryTypeName type) : base(type) { // Initialize our bounds InitializeBounds(1, 1); }
public VarString(AstElementaryTypeName type, VarLocation location) : base(type, location) { }
public VarDynamicBytes(AstElementaryTypeName type, VarLocation location) : base(type) { // Initialize our bounds. InitializeBounds(1, UInt256.SIZE, location); }
public StateVariable(string name, AstElementaryTypeName astTypeName) { // Initialize by name and type Initialize(name, astTypeName); }