Fix LRWithLabelsListener to call EList.String

This commit is contained in:
Will Faught 2016-07-06 10:18:15 -07:00
parent 53fab2c61c
commit edbf3225ef
2 changed files with 3 additions and 3 deletions

View File

@ -409,7 +409,7 @@ func NewLeafListener() *LeafListener {
}
func (*LeafListener) ExitCall(ctx *CallContext) {
fmt.Printf("%s %s", ctx.E().GetStart().GetText(), ctx.EList())
fmt.Printf("%s %s", ctx.E().GetStart().GetText(), ctx.EList().String(nil, nil))
}
func (*LeafListener) ExitInt(ctx *IntContext) {

View File

@ -120,7 +120,7 @@ public class TestListeners extends BaseTest {
@Test
public void testLRWithLabels() throws Exception {
mkdir(parserpkgdir);
StringBuilder grammarBuilder = new StringBuilder(709);
StringBuilder grammarBuilder = new StringBuilder(726);
grammarBuilder.append("grammar T;\n");
grammarBuilder.append("@parser::header {\n");
grammarBuilder.append("}\n");
@ -135,7 +135,7 @@ public class TestListeners extends BaseTest {
grammarBuilder.append("}\n");
grammarBuilder.append("\n");
grammarBuilder.append("func (*LeafListener) ExitCall(ctx *CallContext) {\n");
grammarBuilder.append(" fmt.Printf(\"%s %s\", ctx.E().GetStart().GetText(), ctx.EList())\n");
grammarBuilder.append(" fmt.Printf(\"%s %s\", ctx.E().GetStart().GetText(), ctx.EList().String(nil, nil))\n");
grammarBuilder.append("}\n");
grammarBuilder.append("\n");
grammarBuilder.append("func (*LeafListener) ExitInt(ctx *IntContext) {\n");