antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

Golang visitor example?

Open PaulCapestany opened this issue 8 years ago • 2 comments

I've been working through the ANTLR book, however, not knowing Java I'm a bit unsure how a Visitor implementation should look like in Go. Would be great to get a code snippet showing this (and maybe include in official documentation?) if it's not too much trouble.

PaulCapestany avatar Dec 21 '16 21:12 PaulCapestany

I would appreciate such an example too. I'm used to the visitor pattern with the Java target. but as novice in Go I got lot of SIGSEVS or compile errors...

Would be very nice if you may provide a simple example such as the TreeShapeListener provided in the go target Markdown.

Weltraumschaf avatar Jan 23 '17 21:01 Weltraumschaf

If you're still interested in this, can you see if PR #1807 helps? I had the same problem, and determined that the existing Visitor code was not quite done.

cyberfox avatar Apr 02 '17 17:04 cyberfox