def visitShapeDefinition(self, ctx: ShExDocParser.ShapeDefinitionContext):
if ctx.qualifier():<EOL><INDENT>for q in ctx.qualifier():<EOL><INDENT>self.visit(q)<EOL><DEDENT><DEDENT>if ctx.oneOfShape():<EOL><INDENT>oneof_parser = ShexOneOfShapeParser(self.context)<EOL>oneof_parser.visit(ctx.oneOfShape())<EOL>self.shape.expression = oneof_parser.expression<EOL><DEDENT>if ctx.annotation() or ctx.semanticActions():<EOL><INDENT>ansem_parser = ShexAnnotationAndSemactsParser(self.context)<EOL>for annot in ctx.annotation():<EOL><INDENT>ansem_parser.visit(annot)<EOL><DEDENT>ansem_parser.visit(ctx.semanticActions())<EOL>if ansem_parser.semacts:<EOL><INDENT>self.shape.semActs = ansem_parser.semacts<EOL><DEDENT>if ansem_parser.annotations:<EOL><INDENT>self.shape.annotations = ansem_parser.annotations<EOL><DEDENT><DEDENT>
shapeDefinition: qualifier* '{' oneOfShape? '}' annotation* semanticActions