Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit 287d550

Browse files
committed
rename dump package to printer
1 parent e169f7a commit 287d550

19 files changed

Lines changed: 518 additions & 709 deletions

cmd/rudi/cmd/script/command.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"go.xrstf.de/rudi/cmd/rudi/options"
1616
"go.xrstf.de/rudi/cmd/rudi/types"
1717
"go.xrstf.de/rudi/cmd/rudi/util"
18-
"go.xrstf.de/rudi/pkg/debug"
18+
"go.xrstf.de/rudi/pkg/printer"
1919

2020
"github.com/BurntSushi/toml"
2121
"gopkg.in/yaml.v3"
@@ -55,7 +55,8 @@ func Run(handler *util.SignalHandler, opts *options.Options, args []string) erro
5555

5656
// show AST and quit if desired
5757
if opts.PrintAst {
58-
if err := debug.Dump(program, os.Stdout); err != nil {
58+
renderer := printer.AST{}
59+
if err := renderer.WriteMultiline(program, os.Stdout); err != nil {
5960
return fmt.Errorf("failed to dump AST: %w", err)
6061
}
6162

pkg/debug/dump.go

Lines changed: 0 additions & 77 deletions
This file was deleted.

pkg/debug/dump_bool.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

pkg/debug/dump_expression.go

Lines changed: 0 additions & 36 deletions
This file was deleted.

pkg/debug/dump_identifier.go

Lines changed: 0 additions & 15 deletions
This file was deleted.

pkg/debug/dump_null.go

Lines changed: 0 additions & 12 deletions
This file was deleted.

pkg/debug/dump_number.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

pkg/debug/dump_object.go

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)