diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-11-05 16:52:37 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-11-05 16:52:37 +0900 |
commit | a6001b32cf805c4e72e05adc37ee60272a600bf1 (patch) | |
tree | bcee870f1008689adfa104fb1e97e6414201eb94 /driver/semantic_action.go | |
parent | Remove alias system (diff) | |
download | urubu-a6001b32cf805c4e72e05adc37ee60272a600bf1.tar.gz urubu-a6001b32cf805c4e72e05adc37ee60272a600bf1.tar.xz |
Remove anonymous symbol system
Remove unimportant features to tidy up the specification.
Diffstat (limited to 'driver/semantic_action.go')
-rw-r--r-- | driver/semantic_action.go | 6 |
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) |