aboutsummaryrefslogtreecommitdiff
path: root/spec/test/tree_semantic_action.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-11-05 16:52:37 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-11-05 16:52:37 +0900
commita6001b32cf805c4e72e05adc37ee60272a600bf1 (patch)
treebcee870f1008689adfa104fb1e97e6414201eb94 /spec/test/tree_semantic_action.go
parentRemove alias system (diff)
downloadcotia-a6001b32cf805c4e72e05adc37ee60272a600bf1.tar.gz
cotia-a6001b32cf805c4e72e05adc37ee60272a600bf1.tar.xz
Remove anonymous symbol system
Remove unimportant features to tidy up the specification.
Diffstat (limited to 'spec/test/tree_semantic_action.go')
-rw-r--r--spec/test/tree_semantic_action.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/test/tree_semantic_action.go b/spec/test/tree_semantic_action.go
index c426183..c1d5a25 100644
--- a/spec/test/tree_semantic_action.go
+++ b/spec/test/tree_semantic_action.go
@@ -341,11 +341,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)