class IDL::AST::Port

def attributes

def attributes
  case @porttype
  when :port, :mirrorport
    @idltype.resolved_type.node.attributes.collect { |att|
      exp_a = att.expanded_copy(self.name, self.enclosure)
      exp_a.annotations << Annotation.new(EXTPORTDEF_ANNOTATION, { extended_port_name: self.name, base_name: att.name, mirror: (@porttype == :mirrorport) })
      exp_a # return expanded copy
    }
  else
    []
  end
end