aboutsummaryrefslogtreecommitdiff
path: root/driver/semantic_action.go
diff options
context:
space:
mode:
Diffstat (limited to 'driver/semantic_action.go')
-rw-r--r--driver/semantic_action.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/driver/semantic_action.go b/driver/semantic_action.go
index 54d3291..7e5a773 100644
--- a/driver/semantic_action.go
+++ b/driver/semantic_action.go
@@ -340,11 +340,7 @@ func printTree(w io.Writer, node *Node, ruledLine string, childRuledLinePrefix s
case NodeTypeError:
fmt.Fprintf(w, "%v%v\n", ruledLine, node.KindName)
case NodeTypeTerminal:
- if node.KindName == "" {
- fmt.Fprintf(w, "%v<anonymous> %v\n", ruledLine, strconv.Quote(node.Text))
- } else {
- fmt.Fprintf(w, "%v%v %v\n", ruledLine, node.KindName, strconv.Quote(node.Text))
- }
+ fmt.Fprintf(w, "%v%v %v\n", ruledLine, node.KindName, strconv.Quote(node.Text))
case NodeTypeNonTerminal:
fmt.Fprintf(w, "%v%v\n", ruledLine, node.KindName)