code: function getEnum (type, stateDefinitions, contractName) {
    var split = type.split('.')
    if (!split.length) {
      type = contractName + '.' + type
    } else {
      contractName = split[0]
    }
    var state = stateDefinitions[contractName]
    if (state) {
      for (var dec of state.stateDefinitions) {
        if (dec.attributes && dec.attributes.name && type === contractName + '.' + dec.attributes.name) {
          return dec
        }
      }
    }
    return null
  }
docs: retrieve enum declaration of the given @arg type
  
  @param {String} type - type given by the AST (e.g enum enumDef)
  @param {Object} stateDefinitions  - all state declarations given by the AST (including struct and enum type declaration) for all contracts
  @param {String} contractName - contract the @args typeName belongs to
  @return {Array} - containing all value declaration of the current enum type