Skip to content

Commit

Permalink
rename dump package to printer
Browse files Browse the repository at this point in the history
  • Loading branch information
xrstf committed Dec 23, 2023
1 parent e169f7a commit 287d550
Show file tree
Hide file tree
Showing 19 changed files with 518 additions and 709 deletions.
5 changes: 3 additions & 2 deletions cmd/rudi/cmd/script/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"go.xrstf.de/rudi/cmd/rudi/options"
"go.xrstf.de/rudi/cmd/rudi/types"
"go.xrstf.de/rudi/cmd/rudi/util"
"go.xrstf.de/rudi/pkg/debug"
"go.xrstf.de/rudi/pkg/printer"

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

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

Expand Down
77 changes: 0 additions & 77 deletions pkg/debug/dump.go

This file was deleted.

13 changes: 0 additions & 13 deletions pkg/debug/dump_bool.go

This file was deleted.

36 changes: 0 additions & 36 deletions pkg/debug/dump_expression.go

This file was deleted.

15 changes: 0 additions & 15 deletions pkg/debug/dump_identifier.go

This file was deleted.

12 changes: 0 additions & 12 deletions pkg/debug/dump_null.go

This file was deleted.

13 changes: 0 additions & 13 deletions pkg/debug/dump_number.go

This file was deleted.

178 changes: 0 additions & 178 deletions pkg/debug/dump_object.go

This file was deleted.

Loading

0 comments on commit 287d550

Please sign in to comment.