From a5de7231edd4b6f52cab82f4695c61f4be40c6d5 Mon Sep 17 00:00:00 2001 From: just-do-halee Date: Fri, 25 Nov 2022 14:42:51 +0900 Subject: [PATCH] Add builder.go: BuildForDebugging --- builder.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/builder.go b/builder.go index a352b02..65d4784 100644 --- a/builder.go +++ b/builder.go @@ -28,3 +28,10 @@ func (b *builder) Build(opt any) error { _, err := internal.Parse(opt, b.args, b.options) return err } + +type Tree = *internal.Tree + +func (b *builder) BuildForDebugging(opt any) (error, Tree) { + tree, err := internal.Parse(opt, b.args, b.options) + return err, tree +}