code: def visitShapeExprDecl(self, ctx: ShExDocParser.ShapeExprDeclContext):
          
          label = self.context.shapeexprlabel_to_IRI(ctx.shapeExprLabel())
          if self.context.schema.shapes is None:
              self.context.schema.shapes = []
          if ctx.KW_EXTERNAL():
              shape = ShapeExternal(id=label)
          else:
              shexpr = ShexShapeExpressionParser(self.context, label)
              shexpr.visit(ctx.shapeExpression())
              shape = shexpr.expr
          self.context.schema.shapes.append(shape)
docs: shapeExprDecl: shapeExprLabel (shapeExpression | KW_EXTERNAL)