code: function struct (type, stateDefinitions, contractName, location) {
    var match = type.match(/struct (\S*?)( storage ref| storage pointer| memory| calldata)?$/)
    if (match) {
      if (!location) {
        location = match[2].trim()
      }
      var memberDetails = getStructMembers(match[1], stateDefinitions, contractName, location) // type is used to extract the ast struct definition
      if (!memberDetails) return null
      return new StructType(memberDetails, location, match[1])
    } else {
      return null
    }
  }
docs: Struct decode the given @arg type
  
  @param {String} type - type given by the AST (e.g struct structDef storage ref)
  @param {Object} stateDefinitions - all state definitions given by the AST (including struct and enum type declaration) for all contracts
  @param {String} contractName - contract the @args typeName belongs to
  @param {String} location - location of the data (storage ref| storage pointer| memory| calldata)
  @return {Object} returns decoded info about the current type: { storageBytes, typeName, members}