def shapeRef_to_iriref(self, ref: ShExDocParser.ShapeRefContext) -> ShExJ.IRIREF:
if ref.ATPNAME_NS():<EOL><INDENT>return ShExJ.IRIREF(self._lookup_prefix(ref.ATPNAME_NS().getText()[<NUM_LIT:1>:]))<EOL><DEDENT>elif ref.ATPNAME_LN():<EOL><INDENT>prefix, local = ref.ATPNAME_LN().getText()[<NUM_LIT:1>:].split('<STR_LIT::>', <NUM_LIT:1>)<EOL>return ShExJ.IRIREF(self._lookup_prefix(prefix + '<STR_LIT::>') + (local if local else "<STR_LIT>"))<EOL><DEDENT>else:<EOL><INDENT>return self.shapeexprlabel_to_IRI(ref.shapeExprLabel())<EOL><DEDENT>
shapeRef: ATPNAME_NS | ATPNAME_LN | '@' shapeExprLabel