Skip to content

Commit

Permalink
Fix RDT group visitor
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-palyanitsa committed Dec 10, 2024
1 parent 7725750 commit 8e20cd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rdt_visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ func (visitor *RdtVisitor) VisitUnion(ctx *rdt.UnionContext, target *UnknownShap
}

func (visitor *RdtVisitor) VisitGroup(ctx *rdt.GroupContext, target *UnknownShape) (Shape, error) {
return visitor.Visit(ctx.GetChildren()[0].(antlr.ParseTree), target)
// First and last nodes are terminal nodes
return visitor.Visit(ctx.GetChildren()[1].(antlr.ParseTree), target)
}

func (visitor *RdtVisitor) VisitReference(ctx *rdt.ReferenceContext, target *UnknownShape) (Shape, error) {
Expand Down

0 comments on commit 8e20cd4

Please sign in to comment.