Skip to content

Commit 9492a2b

Browse files
Fix RDT group visitor (#56)
1 parent 32bdae4 commit 9492a2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rdt_visitor.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ func (visitor *RdtVisitor) VisitUnion(ctx *rdt.UnionContext, target *UnknownShap
145145
}
146146

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

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

0 commit comments

Comments
 (0)