shapeExprDecl: shapeExprLabel (shapeExpression | KW_EXTERNAL)

def visitShapeExprDecl(self, ctx: ShExDocParser.ShapeExprDeclContext):
        """ shapeExprDecl: shapeExprLabel (shapeExpression | KW_EXTERNAL) """
        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)